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

# Doctor running late

> Every reserved timed visit still ahead that day moves later by `minutes`; queue visits keep their number and are only told. Each patient is messaged unless `notify_patient` is false.



## OpenAPI

````yaml /openapi.json post /doctors/{id}/delay
openapi: 3.1.0
info:
  title: Docistra API
  version: 1.0.0
  description: >-
    Connect your software to Docistra in both directions. All times are ISO
    8601; Docistra's clinics run on Cairo time (Africa/Cairo). Every path {id}
    takes Docistra's id or `ext:<your id>`.
servers:
  - url: https://docistra.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Organization
  - name: Patients
  - name: Appointments
  - name: Availability
  - name: Doctors
  - name: Doctor schedule
  - name: Branches
  - name: Reference data
  - name: Webhooks
paths:
  /doctors/{id}/delay:
    parameters:
      - $ref: '#/components/parameters/Id'
    post:
      tags:
        - Doctor schedule
      summary: Doctor running late
      description: >-
        Every reserved timed visit still ahead that day moves later by
        `minutes`; queue visits keep their number and are only told. Each
        patient is messaged unless `notify_patient` is false.
      operationId: doctorDelay
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - minutes
              properties:
                minutes:
                  type: integer
                  minimum: 5
                  maximum: 240
                date:
                  type: string
                  format: date
                  description: Defaults to today (Cairo).
                reason:
                  type: string
                  maxLength: 200
                notify_patient:
                  type: boolean
                  default: true
      responses:
        '200':
          description: Done
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DelayResult'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Docistra's id, or `ext:<your id>`.
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      schema:
        type: string
        maxLength: 255
      description: >-
        A unique value (e.g. a UUID) per operation. A retry with the same key
        returns the first response for 24 hours.
  schemas:
    DelayResult:
      type: object
      properties:
        doctor_id:
          type: string
        date:
          type: string
        minutes:
          type: integer
        results:
          type: array
          items:
            type: object
            properties:
              appointment_id:
                type: string
              moved:
                type: boolean
              error:
                type: string
              patient_notified:
                $ref: '#/components/schemas/PatientNotified'
    PatientNotified:
      type:
        - object
        - 'null'
      description: How the patient was told. null = not asked to.
      properties:
        via:
          type:
            - string
            - 'null'
          enum:
            - whatsapp_text
            - whatsapp_template
            - sms
            - null
        reason:
          type:
            - string
            - 'null'
          description: >-
            Why nothing was sent: no_phone, consent, test_org (the clinic is in
            test mode), no_channel, ...
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key (dk_live_...), from Settings > Integrations > API in
        Docistra.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.