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

# Retrieve Practitioner availability

> Returns recurring synthetic weekly hours. Requires `availability:read`.



## OpenAPI

````yaml /openapi/heyrafiki.openapi.yaml get /practitioners/{practitioner_id}/availability
openapi: 3.1.0
info:
  title: Heyrafiki API
  version: 1.0.0
  description: Build Care, Cover and Payment workflows on Heyrafiki.
  contact:
    name: Heyrafiki
    url: https://heyrafiki.space
    email: developers@heyrafiki.space
  license:
    name: All rights reserved
    identifier: LicenseRef-Heyrafiki-Proprietary
servers:
  - url: https://api.heyrafiki.space/v1
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /practitioners/{practitioner_id}/availability:
    get:
      summary: Retrieve Practitioner availability
      description: Returns recurring synthetic weekly hours. Requires `availability:read`.
      operationId: getPractitionerAvailability
      parameters:
        - $ref: '#/components/parameters/PractitionerId'
      responses:
        '200':
          description: Practitioner availability
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PractitionerAvailability'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    PractitionerId:
      name: practitioner_id
      in: path
      required: true
      description: A public Practitioner identifier.
      schema:
        type: string
        maxLength: 100
        pattern: ^prc_[A-Za-z0-9_-]+$
  headers:
    RateLimitLimit:
      description: Maximum requests allowed in the current minute.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests remaining in the current minute.
      schema:
        type: integer
    RateLimitReset:
      description: Unix timestamp when the current limit resets.
      schema:
        type: integer
  schemas:
    PractitionerAvailability:
      type: object
      additionalProperties: false
      required:
        - object
        - practitioner_id
        - timezone
        - weekly_hours
      properties:
        object:
          type: string
          const: availability
        practitioner_id:
          type: string
          maxLength: 100
          pattern: ^prc_[A-Za-z0-9_-]+$
        timezone:
          type: string
          example: Africa/Nairobi
        weekly_hours:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - weekday
              - start
              - end
              - formats
            properties:
              weekday:
                type: integer
                minimum: 0
                maximum: 6
                description: Day of week, where Sunday is 0.
              start:
                type: string
                pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
              end:
                type: string
                pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
              formats:
                type: array
                items:
                  type: string
                  enum:
                    - online
                    - in_person
                    - phone
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
            - docs
          properties:
            code:
              type: string
            message:
              type: string
            docs:
              type: string
              format: uri
  responses:
    BadRequest:
      description: The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: The API key is missing or invalid.
      headers:
        WWW-Authenticate:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The API key does not permit this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The requested resource does not exist or is not visible to this project.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    TooManyRequests:
      description: The project exceeded its request limit.
      headers:
        Retry-After:
          description: Seconds until another request should be attempted.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServiceUnavailable:
      description: The service is temporarily unavailable.
      headers:
        Retry-After:
          schema:
            type: integer
            example: 5
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A sandbox or production secret key.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: An alternative for clients that cannot set Authorization.

````