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

# Show an authorized consultation detail

> Returns an authorized visit with its recorded organization and branch, including inactive branches. The branch includes its current address and contact details when available. Use appointment.starts_at for the scheduled time and starts_at for the clinical start time. Send include=encounter to receive the nullable encounter_id.



## OpenAPI

````yaml /openapi/nimbo_patient_portal.yml get /api/v1/patient_portal/consultations/{id}
openapi: 3.1.0
info:
  title: Nimbo patient portal
  version: 1.0.0
  description: >-
    Nimbo API reference. Use the API host and integration access provided by
    Nimbo.
servers:
  - url: https://api.example.test
security: []
tags:
  - name: Patient Portal
  - name: Patient portal authentication
paths:
  /api/v1/patient_portal/consultations/{id}:
    get:
      tags:
        - Patient Portal
      summary: Show an authorized consultation detail
      description: >-
        Returns an authorized visit with its recorded organization and branch,
        including inactive branches. The branch includes its current address and
        contact details when available. Use appointment.starts_at for the
        scheduled time and starts_at for the clinical start time. Send
        include=encounter to receive the nullable encounter_id.
      operationId: showPatientPortalConsultation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: '123'
        - name: include
          in: query
          description: >-
            Exact encounter opt-in adds nullable encounter_id. Omitted or
            unrecognized values preserve the existing response field set and all
            existing IDs and meanings.
          required: false
          schema:
            type: string
          example: encounter
      responses:
        '200':
          description: >-
            Non-deleted consultation detail with kept nested notes, lab orders,
            and lab results.
          content:
            application/json:
              schema:
                type: object
                required:
                  - consultation
                additionalProperties: false
                properties:
                  consultation:
                    type: object
                    required:
                      - id
                      - cause
                      - starts_at
                      - appointment
                      - doctor_name
                      - organization_name
                      - organization
                      - location
                      - notes
                      - lab_tests
                      - instructions
                      - treatment
                      - vital_signs_set
                      - medical_history_attachments
                      - lab_test_results
                      - prescriptions
                    additionalProperties: false
                    properties:
                      encounter_id:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          Present only with include=encounter; owned kept
                          encounter identity, otherwise null.
                      appointment:
                        type:
                          - object
                          - 'null'
                        description: >-
                          The single eligible schedule attached to the same
                          patient's kept encounter, independently of the
                          clinical start timestamp. Only kept, noncanceled
                          schedules are eligible. Accepted cancellations remain
                          in schedule history but never supply this appointment
                          context; unrelated, deleted and ambiguous eligible
                          schedules return null. This is the currently stored
                          appointment time, not an immutable original-booking
                          snapshot. No cause, internal metadata or command
                          permission is added here.
                        additionalProperties: false
                        required:
                          - id
                          - starts_at
                          - ends_at
                          - time_zone
                          - schedule_type
                        properties:
                          id:
                            type: integer
                          starts_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          ends_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          time_zone:
                            type: string
                            description: >-
                              Validated effective IANA timezone, with
                              America/Monterrey fallback.
                          schedule_type:
                            type:
                              - string
                              - 'null'
                      id:
                        type: integer
                      cause:
                        type:
                          - string
                          - 'null'
                      starts_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      doctor_name:
                        type:
                          - string
                          - 'null'
                      organization_name:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Physician account's current organization name;
                          retained for compatibility.
                      organization:
                        type:
                          - object
                          - 'null'
                        description: >-
                          Organization of the recorded location on the same
                          patient's kept encounter, independently of the
                          physician account's current organization. Null when
                          the encounter or location is absent or soft-deleted,
                          or the organization cannot be resolved. Never inferred
                          from a sole/default branch.
                        required:
                          - id
                          - name
                        additionalProperties: false
                        properties:
                          id:
                            type: integer
                          name:
                            type:
                              - string
                              - 'null'
                        example:
                          id: 101
                          name: Example Clinic
                      location:
                        type:
                          - object
                          - 'null'
                        description: >-
                          Recorded encounter location with its current address
                          and contact information. Uses the same resolution and
                          historical-membership rules as the summary. Every
                          documented field is present for an existing location.
                          Address, city, postal code and telephone preserve
                          stored strings, including empty strings and
                          placeholders; numeric values are serialized as strings
                          without inferring missing formatting or leading zeros.
                          Missing, boolean, array and object field values are
                          null. A non-object office store makes these four text
                          fields null without hiding the location or its
                          geography. No organization or physician
                          address/contact fallback is applied.
                        required:
                          - id
                          - name
                          - active
                          - address
                          - city
                          - postal_code
                          - telephone
                          - state
                          - country
                        additionalProperties: false
                        properties:
                          id:
                            type: integer
                          name:
                            type:
                              - string
                              - 'null'
                          active:
                            type:
                              - boolean
                              - 'null'
                            description: >-
                              Stored operational status; false does not remove a
                              historical location.
                          address:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Branch address as text, without inferred
                              formatting or supplementation.
                          city:
                            type:
                              - string
                              - 'null'
                          postal_code:
                            type:
                              - string
                              - 'null'
                          telephone:
                            type:
                              - string
                              - 'null'
                          state:
                            type:
                              - object
                              - 'null'
                            description: >-
                              Location's state, or null when not configured or
                              no longer resolvable.
                            required:
                              - id
                              - name
                            additionalProperties: false
                            properties:
                              id:
                                type: integer
                              name:
                                type:
                                  - string
                                  - 'null'
                          country:
                            type:
                              - object
                              - 'null'
                            description: >-
                              State's country, including inactive countries;
                              null when not resolvable.
                            required:
                              - id
                              - name_es
                              - name_en
                              - code
                            additionalProperties: false
                            properties:
                              id:
                                type: integer
                              name_es:
                                type:
                                  - string
                                  - 'null'
                              name_en:
                                type:
                                  - string
                                  - 'null'
                              code:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Stored country abbreviation, not its telephone
                                  calling code.
                        example:
                          id: 202
                          name: Central Branch
                          active: true
                          address: 123 Example Avenue
                          city: Example City
                          postal_code: '01000'
                          telephone: ''
                          state:
                            id: 301
                            name: Example State
                          country:
                            id: 401
                            name_es: Mexico
                            name_en: Mexico
                            code: MX
                      notes:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - person_id
                            - consultation_id
                            - account_id
                            - comment
                            - note_type
                            - deleted_at
                            - created_at
                            - updated_at
                            - voice_note_file_name
                            - voice_note_content_type
                            - voice_note_file_size
                            - voice_note_updated_at
                            - operating_room_request_id
                            - editable
                            - transcription_status
                            - voice_note_duration
                            - metadata
                          additionalProperties: false
                          properties:
                            id:
                              type: integer
                            person_id:
                              type: integer
                            consultation_id:
                              type: integer
                            comment:
                              type:
                                - string
                                - 'null'
                            note_type:
                              type:
                                - string
                                - 'null'
                            account_id:
                              type:
                                - integer
                                - 'null'
                            deleted_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            updated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            voice_note_file_name:
                              type:
                                - string
                                - 'null'
                            voice_note_content_type:
                              type:
                                - string
                                - 'null'
                            voice_note_file_size:
                              type:
                                - integer
                                - 'null'
                            voice_note_updated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            operating_room_request_id:
                              type:
                                - integer
                                - 'null'
                            editable:
                              type:
                                - boolean
                                - 'null'
                            transcription_status:
                              type:
                                - string
                                - 'null'
                            voice_note_duration:
                              type:
                                - integer
                                - 'null'
                            metadata:
                              type: object
                              additionalProperties: true
                      lab_tests:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - consultation_id
                            - lab_test_id
                            - custom_name
                            - description
                            - metadata
                            - diagnosis1
                            - diagnosis1_code
                            - account_id
                          additionalProperties: false
                          properties:
                            id:
                              type: integer
                            consultation_id:
                              type: integer
                            description:
                              type:
                                - string
                                - 'null'
                            lab_test_id:
                              type:
                                - integer
                                - 'null'
                            custom_name:
                              type:
                                - string
                                - 'null'
                            metadata:
                              type: object
                              additionalProperties: true
                            diagnosis1:
                              type:
                                - string
                                - 'null'
                            diagnosis1_code:
                              type:
                                - string
                                - 'null'
                            account_id:
                              type:
                                - integer
                                - 'null'
                      instructions:
                        type:
                          - string
                          - 'null'
                      treatment:
                        type:
                          - string
                          - 'null'
                      vital_signs_set:
                        oneOf:
                          - type: object
                            required:
                              - id
                              - consultation_id
                              - person_id
                              - account_id
                              - elements
                              - created_at
                              - updated_at
                              - deleted_at
                              - set_type
                              - metadata
                            additionalProperties: false
                            properties:
                              id:
                                type: integer
                              consultation_id:
                                type:
                                  - integer
                                  - 'null'
                              person_id:
                                type: integer
                              account_id:
                                type:
                                  - integer
                                  - 'null'
                              elements:
                                type: object
                                additionalProperties: true
                              created_at:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                              updated_at:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                              deleted_at:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                              set_type:
                                type:
                                  - string
                                  - 'null'
                              metadata:
                                type: object
                                additionalProperties: true
                          - type: 'null'
                      medical_history_attachments:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - attachment_file_name
                            - attachment_content_type
                            - attachment_file_size
                            - attachment_updated_at
                            - medical_history_id
                            - created_at
                            - updated_at
                            - attachment_file_name_alias
                            - deleted_at
                            - updater_id
                            - consultation_id
                            - metadata
                          additionalProperties: false
                          properties:
                            id:
                              type: integer
                            attachment_file_name:
                              type:
                                - string
                                - 'null'
                            attachment_content_type:
                              type:
                                - string
                                - 'null'
                            attachment_file_size:
                              type:
                                - integer
                                - 'null'
                            attachment_updated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            medical_history_id:
                              type: integer
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            updated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            attachment_file_name_alias:
                              type:
                                - string
                                - 'null'
                            deleted_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            updater_id:
                              type:
                                - integer
                                - 'null'
                            consultation_id:
                              type:
                                - integer
                                - 'null'
                            metadata:
                              type: object
                              additionalProperties: true
                      lab_test_results:
                        oneOf:
                          - type: object
                            required:
                              - id
                              - consultation_id
                              - elements
                              - created_at
                            additionalProperties: false
                            properties:
                              id:
                                type: integer
                              consultation_id:
                                type: integer
                              elements:
                                type: object
                                additionalProperties: true
                              created_at:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                          - type: object
                            required:
                              - lab_tests
                            additionalProperties: false
                            properties:
                              lab_tests:
                                type: array
                                maxItems: 0
                      prescriptions:
                        type: array
                        items:
                          type: object
                          required:
                            - doctor
                            - date
                            - instrucctions
                            - drugs
                          additionalProperties: false
                          properties:
                            doctor:
                              type:
                                - string
                                - 'null'
                            date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            instrucctions:
                              type:
                                - string
                                - 'null'
                            drugs:
                              type: array
                              items:
                                type: object
                                required:
                                  - name
                                  - dose
                                  - frequency
                                  - duration
                                additionalProperties: false
                                properties:
                                  name:
                                    type:
                                      - string
                                      - 'null'
                                  dose:
                                    type:
                                      - string
                                      - 'null'
                                  frequency:
                                    type:
                                      - string
                                      - 'null'
                                  duration:
                                    type:
                                      - string
                                      - 'null'
        '401':
          description: Missing, expired, invalid, or unauthorized patient portal token.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                additionalProperties: false
                properties:
                  error:
                    type: string
              examples:
                unauthorized:
                  value:
                    error: Unauthorized
        '404':
          description: >-
            The requested resource was not found or is outside the authorized
            patient scope.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                additionalProperties: false
                properties:
                  error:
                    type: string
              examples:
                not_found:
                  value:
                    error: Not found
      security:
        - PatientPortalToken: []
components:
  securitySchemes:
    PatientPortalToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Patient portal JWT accepted either as a raw Authorization header value
        or as a Bearer token for client compatibility.

````

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