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

# Get Ambient Encounter Content

> Retrieve generated clinical content from completed encounter

<Callout title="Updates" color="orange" icon="bell">
  **Updated:**

  You can now get the medication orders for an encounter from the encounter content response.
</Callout>

Use this endpoint to get the cumulative summary and <Tooltip tip="Organized medical information extracted from clinical conversations, formatted for integration with EHR systems." cta="View in Glossary" href="/Glossary/s">structured data</Tooltip> associated with the specified <Tooltip tip="One patient visit or appointment with a healthcare provider. In Suki, an encounter can group one or more ambient sessions so related recordings and notes stay tied to the same clinical visit." cta="View in Glossary" href="/Glossary/e">encounter</Tooltip>.

## Code examples

<Tabs>
  <Tab title="Python">
    ```python theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    import requests

    encounter_id = "123dfg-456dfg-789dfg-012dfg"
    url = f"https://sdp.suki-stage.com/api/v1/ambient/encounter/{encounter_id}/content"

    headers = {
        "sdp_suki_token": "<sdp_suki_token>",
        "sdp_provider_id": "<sdp_provider_id>"
    }

    response = requests.get(url, headers=headers)

    if response.status_code == 200:
        content = response.json()
        print("Encounter Summary:")
        for section in content.get("summary", []):
            print(f"\nTitle: {section.get('title')}")
            print(f"LOINC Code: {section.get('loinc_code')}")
            print(f"Content: {section.get('content')}")
        
        print("\nStructured Data:")
        for structured_block in content.get("structured_data", []):
            print(f"\n{structured_block.get('title')}:")
            # data is a key-value object
            data = structured_block.get('data', {})
            for key, value in data.items():
                print(f"  {key}: {value}")
    else:
        print(f"Failed to get encounter content: {response.status_code}")
        print(response.json())
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    const encounterId = '123dfg-456dfg-789dfg-012dfg';
    const response = await fetch(
      `https://sdp.suki-stage.com/api/v1/ambient/encounter/${encounterId}/content`,
      {
        headers: {
          'sdp_suki_token': '<sdp_suki_token>',
        'sdp_provider_id': '<sdp_provider_id>'
        }
      }
    );

    if (response.ok) {
      const content = await response.json();
      console.log('Encounter Summary:');
      content.summary?.forEach((section: any) => {
        console.log(`\nTitle: ${section.title}`);
        console.log(`LOINC Code: ${section.loinc_code}`);
        console.log(`Content: ${section.content}`);
      });
      
      console.log('\nStructured Data:');
      content.structured_data?.forEach((structuredBlock: any) => {
        console.log(`\n${structuredBlock.title}:`);
        // data is a key-value object
        if (structuredBlock.data) {
          Object.entries(structuredBlock.data).forEach(([key, value]) => {
            console.log(`  ${key}: ${value}`);
          });
        }
      });
    } else {
      const error = await response.json();
      console.error(`Failed to get encounter content: ${response.status}`, error);
    }
    ```
  </Tab>
</Tabs>


## OpenAPI

````yaml GET /api/v1/ambient/encounter/{encounter_id}/content
openapi: 3.0.1
info:
  title: Suki Developer Platform
  description: >-
    REST and WebSocket APIs for the Suki Developer Platform. Authenticate with
    Login or Register to obtain a Suki access token, then integrate ambient
    clinical documentation, form filling, transcription, and reference metadata
    endpoints.
  contact: {}
  version: '1.0'
servers:
  - url: https://sdp.suki.ai
    description: >-
      Production base URL for Suki Developer Platform REST APIs. WebSocket
      endpoints use the same host with `wss://`.
security:
  - SukiTokenAuth: []
paths:
  /api/v1/ambient/encounter/{encounter_id}/content:
    get:
      tags:
        - /api/v1/ambient/encounter
      summary: Get encounter content
      description: >-
        Returns cumulative clinical content across all ambient sessions linked
        to the encounter. Use the `encounter_id` from session create when you
        grouped multiple sessions under one visit.
      parameters:
        - name: encounter_id
          in: path
          description: >-
            UUID for the patient encounter (visit). Use the `encounter_id` from
            session create or the UUID you assigned when grouping multiple
            sessions under one visit.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ProviderIdHeader'
      responses:
        '200':
          description: Request succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.EncounterContentResponse'
        '400':
          description: Bad request. The request body or parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.BadRequestError'
        '401':
          description: Unauthorized. The Suki access token is missing, expired, or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.AuthenticationError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.InternalServerError'
      security:
        - SukiTokenAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request GET \
              --url https://sdp.suki.ai/api/v1/ambient/encounter/<encounter_id>/content \
              --header 'sdp_suki_token: <sdp_suki_token>' \
              --header 'sdp_provider_id: <sdp_provider_id>'
components:
  parameters:
    ProviderIdHeader:
      name: sdp_provider_id
      in: header
      description: >-
        **Optional** for standard partners.


        **Required** for:


        - **Bearer authentication.** Use the same `provider_id` returned by the
        Login or Register API.

        - **Single Auth Token authentication.** Include the same `provider_id`
        on every request as `sdp_provider_id`.
      required: false
      schema:
        type: string
        example: provider-123
  schemas:
    controllers.EncounterContentResponse:
      type: object
      properties:
        structured_data:
          type: array
          description: Structured data extracted from the encounter
          items:
            $ref: '#/components/schemas/controllers.StructuredDataBlock'
        summary:
          type: array
          description: Cumulative summary of the encounter
          items:
            $ref: '#/components/schemas/controllers.ContentBlock'
      description: Response body for the /encounter/{encounter_id}/content endpoint
    controllers.BadRequestError:
      description: Bad Request Response
      type: object
      properties:
        code:
          type: integer
          example: 400
        message:
          type: string
          example: invalid request
    controllers.AuthenticationError:
      description: Authentication Failure Response
      type: object
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: invalid token
    controllers.InternalServerError:
      description: Internal Server Error Response
      type: object
      properties:
        code:
          type: integer
          example: 500
        message:
          type: string
          example: internal server error
    controllers.StructuredDataBlock:
      type: object
      properties:
        data:
          type: object
          additionalProperties:
            type: string
          description: >-
            The structured data in the block. This is a key-value pair where the
            key is the name of the data and the value is the data itself.

            For example, for medications, the key can be the name of the
            medication and the value can be the dosage.

            This is kept as map since we don't know the structure of the data
            that will be extracted.
          example:
            dosage: 2 puffs
            medication: albuterol
        title:
          type: string
          description: >-
            The title of the structured data block. Usually refers to names like
            Medications, Allergies, etc.
          example: MEDICATIONS
    controllers.ContentBlock:
      type: object
      properties:
        content:
          description: >-
            The body of the content block usually refers to the content of the
            section.
          type: string
          example: Asthma exacerbation
        loinc_code:
          description: The LOINC code of the content block.
          type: string
          example: 18776-5
        source_transcripts:
          description: The source transcripts that were used to generate the content block.
          type: array
          items:
            type: string
          example:
            - asthma
            - exacerbation
        title:
          description: The title of the content block usually refers to section name.
          type: string
          example: ASSESSMENT AND PLAN
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token (`suki_token`) from Login or Register. Expires after
        one hour.

````