> ## 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.

# Free slots for a doctor on a day



## OpenAPI

````yaml /openapi.json get /availability
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:
  /availability:
    get:
      tags:
        - Availability
      summary: Free slots for a doctor on a day
      operationId: getAvailability
      parameters:
        - name: doctor_id
          in: query
          required: true
          schema:
            type: string
        - name: date
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: branch_id
          in: query
          schema:
            type: string
          description: Defaults to the branch the doctor works at that day.
        - name: duration_minutes
          in: query
          schema:
            type: integer
            minimum: 5
            maximum: 480
            multipleOf: 5
      responses:
        '200':
          description: Availability
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Availability'
components:
  schemas:
    Availability:
      type: object
      properties:
        doctor_id:
          type: string
        date:
          type: string
          format: date
        branch_id:
          type:
            - string
            - 'null'
        duration_minutes:
          type: integer
        mode:
          type: string
          enum:
            - time
            - queue
            - closed
        slots:
          type: array
          items:
            type: string
            format: date-time
          description: Free start times (mode time).
        available:
          type: boolean
          description: mode queue
        next_number:
          type:
            - integer
            - 'null'
          description: mode queue
        remaining:
          type:
            - integer
            - 'null'
          description: mode queue; null = no limit
        reason:
          type: string
          description: 'Why the day is closed: off_override, not_working_day, ...'
        week_closed_online:
          type: boolean
          description: >-
            The clinic closed this week to online booking (the API can still
            book).
        day_ended:
          type: boolean
          description: Reception ended today's day at this branch.
  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.