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

# List patient appointments

> This endpoint will search the appointment for patient for rescheduling etc. purposes.

- Ai Agent will just have to hit on search end point as above to search the patients appointment.
- Patient id will come from patients search.
- If patient say find appointment greater than or equal to some date we will pass params in body :
- `"q": { "appointment_at_gteq": "2023-02-07T11:00:00.000Z" }`
- The apointment Type id will be returned in finding available slots in case of rescheduling.
- Response
- Content-Type: application/json
- Data attribute returned just to give you insights, it has nothing to do with patient.
- And In case of appointment not found,



## OpenAPI

````yaml https://app.teamcaredental.com/openapi-ai-voice.json get /organizations/{organization_id}/patients/{patient_id}/appointments
openapi: 3.1.0
info:
  title: TeamCare AI Voice API
  version: 1.0.0
  description: AI Agent APIs for appointment scheduling, patient lookup and availability.
servers:
  - url: https://app.teamcaredental.com/api/v1/ai_voice
security:
  - bearerAuth: []
paths:
  /organizations/{organization_id}/patients/{patient_id}/appointments:
    get:
      tags:
        - Patient
      summary: List patient appointments
      description: >-
        This endpoint will search the appointment for patient for rescheduling
        etc. purposes.


        - Ai Agent will just have to hit on search end point as above to search
        the patients appointment.

        - Patient id will come from patients search.

        - If patient say find appointment greater than or equal to some date we
        will pass params in body :

        - `"q": { "appointment_at_gteq": "2023-02-07T11:00:00.000Z" }`

        - The apointment Type id will be returned in finding available slots in
        case of rescheduling.

        - Response

        - Content-Type: application/json

        - Data attribute returned just to give you insights, it has nothing to
        do with patient.

        - And In case of appointment not found,
      operationId: organization_patient_appointments
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
        - name: q
          in: query
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              appointment_at_gteq:
                type: string
                format: date-time
                example: '2023-02-07T11:00:00.000Z'
          example:
            appointment_at_gteq: '2023-02-07T11:00:00.000Z'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Missing, invalid or expired token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: not authorized
        '403':
          description: The credential may not access this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: access Denied
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Appointment not found
        '422':
          description: The request could not be processed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: ...
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT returned by POST /auth/token. Valid for six hours.

````