> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oclulearn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Editar / reprogramar turno

> Requiere permiso write. Todos los campos son opcionales; cambiar fecha/hora reprograma.



## OpenAPI

````yaml /api-reference/openapi.json put /appointments/{id}
openapi: 3.1.0
info:
  title: OCLÜ API Pública
  description: >-
    API para integrar OCLÜ con sistemas externos (n8n, Make, Zapier, CRMs).
    Autenticación por API key. Las fechas y horas son hora local de la clínica.
    La API nunca expone datos clínicos.
  version: 1.0.0
servers:
  - url: https://{tenant}.oclucrm.com/api/v1
    description: Reemplazá {tenant} por el subdominio de tu clínica
    variables:
      tenant:
        default: tu-clinica
security:
  - apiKey: []
paths:
  /appointments/{id}:
    put:
      tags:
        - Turnos
      summary: Editar / reprogramar turno
      description: >-
        Requiere permiso write. Todos los campos son opcionales; cambiar
        fecha/hora reprograma.
      parameters:
        - $ref: '#/components/parameters/CurrentOrgId'
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppointmentUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Appointment'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/BusinessRule'
components:
  parameters:
    CurrentOrgId:
      name: Current-Org-Id
      in: header
      required: true
      description: ID de la sede (ver GET /me)
      schema:
        type: integer
        example: 1
  schemas:
    AppointmentUpdate:
      type: object
      properties:
        doctor_id:
          type: integer
        patient_id:
          type: integer
        date:
          type: string
        start:
          type: string
        end:
          type: string
        modality:
          type: string
          enum:
            - presencial
            - virtual
        box_id:
          type: integer
        appointment_status_id:
          type: integer
        description:
          type: string
    Appointment:
      type: object
      properties:
        id:
          type: integer
        start:
          type: string
          example: '2026-06-23 09:00:00'
        end:
          type: string
        duration_minutes:
          type: integer
        modality:
          type: string
          enum:
            - presencial
            - virtual
        description:
          type: string
        status:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
        patient:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
        doctor:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
        box_id:
          type: integer
        google_meet_link:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
  responses:
    NotFound:
      description: No encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BusinessRule:
      description: Regla de negocio (horario fuera de agenda, solapamiento, etc.)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key de la clínica. Header: Authorization: Bearer oclu_live_...'

````