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

# Get Patients

> Gets the details of a patient



## OpenAPI

````yaml GET /v1/patients
openapi: 3.0.1
info:
  title: Penciled API
  description: Penciled - Generative Voice AI Agents for Healthcare
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.penciled.com
security:
  - bearerAuth: []
paths:
  /v1/patients:
    get:
      description: Gets the details of a patient
      parameters:
        - name: patient_id
          in: query
          description: The ID of the patient
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Patient response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Patient'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Patient:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/SubPatient'
            - type: object
              properties:
                group_id:
                  type: string
                  example: '1234567890'
                group_name:
                  type: string
                  example: Group Name
        - $ref: '#/components/schemas/SubPatient'
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    SubPatient:
      type: object
      properties:
        patient_id:
          type: string
          example: '123456789'
        healthie_patient_id:
          type: string
          example: '123456789'
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
        provider_ids:
          type: array
          items:
            type: string
          example:
            - '1234'
            - '5678'
        provider_names:
          type: array
          items:
            type: string
          example:
            - Provider 1
            - Provider 2
        available_dates:
          type: array
          items:
            oneOf:
              - type: string
              - type: object
          example:
            - '2024-12-05T00:00:00.000-08:00'
            - startDate: '2024-12-05T09:00:00.000-08:00'
              endDate: '2024-12-05T12:00:00.000-08:00'
        appointment_type_ids:
          type: array
          items:
            type: string
          example:
            - '1234'
            - '5678'
        appointment_type_names:
          type: array
          items:
            type: string
          example:
            - Appointment Type 1
            - Appointment Type 2
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````