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

# Get the clinic's open, partially closed and closed days for a date range

> A day is closed when the weekly working hours keep the clinic shut or a full-day closure
blocks appointments, and partially closed when a closure covers only part of it. Feeds the
appointment form's date strip and calendar so closed days can be shown dimmed.



## OpenAPI

````yaml /api-referansi/openapi.json get /v1/appointments/day-availability
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/appointments/day-availability:
    get:
      tags:
        - Appointment
      summary: Get the clinic's open, partially closed and closed days for a date range
      description: >-
        A day is closed when the weekly working hours keep the clinic shut or a
        full-day closure

        blocks appointments, and partially closed when a closure covers only
        part of it. Feeds the

        appointment form's date strip and calendar so closed days can be shown
        dimmed.
      operationId: appointment.dayAvailability
      parameters:
        - name: from
          in: query
          required: true
          description: The first day of the range, in `YYYY-MM-DD`.
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: true
          description: >-
            The last day of the range (inclusive), in `YYYY-MM-DD`; at most 62
            days after `from`.
          schema:
            type: string
            format: date
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      timezone:
                        type: string
                      days:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            status:
                              type: string
                              enum:
                                - open
                                - partially_closed
                                - closed
                            working_hours:
                              type:
                                - object
                                - 'null'
                              properties:
                                start:
                                  type: string
                                end:
                                  type: string
                              required:
                                - start
                                - end
                            closed_periods:
                              type: array
                              items:
                                type: object
                                properties:
                                  start_at:
                                    type: string
                                  end_at:
                                    type: string
                                  reason:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - start_at
                                  - end_at
                                  - reason
                          required:
                            - date
                            - status
                            - working_hours
                            - closed_periods
                    required:
                      - timezone
                      - days
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.flextell.ai/oauth/authorize
          tokenUrl: https://app.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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