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

# Retrieve a client



## OpenAPI

````yaml GET /clients/{client}
openapi: 3.1.0
info:
  title: Caspen
  version: 0.0.1
servers:
  - url: https://api.caspen.com/v1
    description: Production
security: []
paths:
  /clients/{client}:
    get:
      tags:
        - Client
      operationId: client.show
      parameters:
        - name: client
          in: path
          required: true
          description: The client ID
          schema:
            type: string
      responses:
        '200':
          description: '`ClientResource`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientResource'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ClientResource:
      type: object
      properties:
        id:
          type: string
          description: The client's unique identifier.
          examples:
            - cli_01HQFQ9QWTNNPY58FZ8CB3FWWK
        title:
          type:
            - string
            - 'null'
          description: The client's honorific title.
          examples:
            - Ms
        first_name:
          type: string
          description: The client's given name.
          examples:
            - Helen
        last_name:
          type: string
          description: The client's family name.
          examples:
            - Keller
        preferred_name:
          type:
            - string
            - 'null'
          description: The client's preferred name.
          examples:
            - Nell
        profession:
          type:
            - string
            - 'null'
          description: The client's profession or occupation.
          examples:
            - Teacher
        email:
          type:
            - string
            - 'null'
          description: The client's email address.
          examples:
            - helen.keller@example.com
        date_of_birth:
          type:
            - string
            - 'null'
          description: The client's date of birth (ISO 8601).
          examples:
            - '1987-06-27'
        sex:
          type:
            - string
            - 'null'
          description: The client's sex assigned at birth.
          examples:
            - female
        gender_identity:
          type:
            - string
            - 'null'
          description: The client's gender identity.
          examples:
            - Woman
        pronouns:
          type:
            - string
            - 'null'
          description: The client's pronouns.
          examples:
            - she/her
        privacy_policy_consent:
          anyOf:
            - $ref: '#/components/schemas/PrivacyPolicyConsent'
              description: The client's privacy policy consent status.
              examples:
                - accepted
            - type: 'null'
        medications:
          type:
            - array
            - 'null'
          description: The client's medications.
          items:
            type: object
            properties:
              name:
                type: string
              dosage:
                type:
                  - string
                  - 'null'
        allergies:
          type:
            - array
            - 'null'
          description: The client's allergies.
          items:
            type: object
            properties:
              name:
                type: string
              reaction:
                type:
                  - string
                  - 'null'
        intolerances:
          type:
            - array
            - 'null'
          description: The client's intolerances.
          examples:
            - - Gluten
              - Lactose
          items:
            type: string
        emergency_contact_id:
          type:
            - string
            - 'null'
          description: The contact identifier for the emergency contact.
          examples:
            - con_01HQFQ9QWTNNPY58FZ8CB3FWWK
        emergency_contact_relationship:
          type:
            - string
            - 'null'
          description: The client's relationship to the emergency contact.
          examples:
            - Guardian
        notes:
          type:
            - string
            - 'null'
          description: The client's practitioner or admin notes.
          examples:
            - Client prefers morning appointments.
        alert:
          type:
            - string
            - 'null'
          description: The client's alert message for staff.
          examples:
            - Requires wheelchair access.
        referral_type_id:
          type:
            - string
            - 'null'
          description: The client's referral type identifier.
          examples:
            - ret_01J11QXSM53YENWF114C0MWGDJ
        referral_description:
          type:
            - string
            - 'null'
          description: The client's referral description.
          examples:
            - Referred by GP at City Clinic.
        referred_by_id:
          type:
            - string
            - 'null'
          description: The client's referring entity identifier.
          examples:
            - cli_01HQQZCM1VDNHXDFEHX4X4KK52
        phone_number:
          type:
            - string
            - 'null'
          description: The client's primary phone number.
          examples:
            - '+61400123456'
        phone_numbers:
          type: array
          description: A list of the client's additional phone numbers.
          examples:
            - - id: pho_01HQR12PABCD1234EFGH56789
                code: '+61'
                number: '400123456'
                type: mobile
          items:
            type: object
            properties:
              id:
                type: string
              code:
                type: string
              number:
                type: string
              type:
                type:
                  - string
                  - 'null'
        address:
          type:
            - object
            - 'null'
          description: The client's address details.
          examples:
            - line1: 123 Sample Street
              line2: null
              city: Sydney
              state: NSW
              postal_code: '2000'
              country_code: AU
          properties:
            line1:
              type:
                - string
                - 'null'
            line2:
              type:
                - string
                - 'null'
            city:
              type:
                - string
                - 'null'
            state:
              type:
                - string
                - 'null'
            postal_code:
              type:
                - string
                - 'null'
            country_code:
              type:
                - string
                - 'null'
        tag_ids:
          type: array
          description: The IDs of tags attached to the client.
          examples:
            - - tag_01HYHYQHA682J0K1RW7B2HVA9F
              - tag_01HYHYW37MTYJPMT5JV4RN99GK
          items:
            type: string
        created_at:
          type: string
          description: The timestamp when the client was created (ISO 8601).
          examples:
            - '2024-01-01T12:00:00Z'
      title: ClientResource
    PrivacyPolicyConsent:
      type: string
      enum:
        - accepted
        - rejected
      title: PrivacyPolicyConsent
  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
    ModelNotFoundException:
      description: Not found
      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

````