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

# List related persons

> List the related persons attached to one patient. `patient_id` is required.



## OpenAPI

````yaml /openapi.json get /related-persons
openapi: 3.1.0
info:
  title: OpenLoop API
  version: 0.1.0
  description: >-
    Unified reference for the OpenLoop Patient (clinical) and Payments & Revenue
    APIs.
servers:
  - url: https://api.openloophealth.com/v0.1
    description: Production partner edge
  - url: https://api-staging.openloophealth.com/v0.1
    description: Staging partner edge (sandbox credentials)
security: []
paths:
  /related-persons:
    get:
      tags:
        - Related Persons
      summary: List related persons
      description: >-
        List the related persons attached to one patient. `patient_id` is
        required.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
          required: true
          name: patient_id
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
                enum:
                  - 'true'
              - type: string
                enum:
                  - 'false'
          required: false
          name: active
          in: query
        - schema:
            type: string
            maxLength: 2048
            pattern: ^[A-Za-z0-9_-]+$
          required: false
          name: cursor
          in: query
          description: >-
            Opaque pagination token. Pass back the `after` (next page) or
            `before` (previous page) value from a prior response's envelope to
            fetch that page. Do not construct or decode it.
        - schema:
            anyOf:
              - type: integer
              - type: string
                pattern: ^\d+$
          required: false
          name: limit
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/RelatedPerson'
                  after:
                    type: string
                    description: >-
                      Forward pagination cursor. Present when more results
                      follow; absent on the last page. To fetch the next page,
                      send this exact value back as the `cursor` query parameter
                      (note the different name) — do not send it as `after`.
                      Opaque; do not construct or decode it.
                  before:
                    type: string
                    description: >-
                      Backward pagination cursor for the previous page, when
                      available. Send this value back as the `cursor` query
                      parameter (same `cursor` param as forward paging; there is
                      no separate `before` parameter). Opaque; do not construct
                      or decode it.
                  request_id:
                    type: string
                required:
                  - items
                  - request_id
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - serviceToken: []
        - userToken: []
components:
  schemas:
    RelatedPerson:
      type: object
      properties:
        id:
          type: string
        active:
          type: boolean
        patient_id:
          type: string
        first_name:
          type: string
        middle_name:
          type: string
        last_name:
          type: string
        email:
          type: string
        phone:
          type: string
        gender:
          type: string
          enum:
            - male
            - female
            - other
            - unknown
        birth_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        relationships:
          type: array
          items:
            type: object
            properties:
              system:
                type: string
                format: uri
              code:
                type: string
                minLength: 1
              display:
                type: string
                maxLength: 500
            required:
              - code
        addresses:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                  - home
                  - work
                  - temp
                  - old
                  - billing
              type:
                type: string
                enum:
                  - postal
                  - physical
                  - both
              text:
                type: string
              line:
                type: array
                items:
                  type: string
              city:
                type: string
              district:
                type: string
              state:
                type: string
              postal_code:
                type: string
              country:
                type: string
        period_start:
          type: string
          format: date-time
        period_end:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - active
        - patient_id
        - relationships
        - addresses
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            error_code:
              type: string
          required:
            - message
            - error_code
        request_id:
          type: string
      required:
        - error
        - request_id
  securitySchemes:
    serviceToken:
      type: oauth2
      description: >-
        Service (M2M) access token issued by POST /auth/token using the
        client_credentials grant. Required scopes, where known, are listed on
        each operation below.
      flows:
        clientCredentials:
          tokenUrl: https://api.openloophealth.com/v0.1/auth/token
          scopes: {}
    userToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User access token issued by POST /auth/token via the verification-code
        grant (after Verify a one-time code) or the refresh_token grant.

````

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