> ## 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="A single interaction between a patient and healthcare provider, typically corresponding to one visit or appointment." 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** - Stable identifier for the active provider. Omit for
        standard partners whose `partner_token` identifies the user.
        **Required** for Bearer partners and Single Auth Token authentication
        where multiple providers share one `partner_token`. Use the same
        `provider_id` you sent on Login or Register.
      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:
      type: object
      properties:
        code:
          type: integer
          example: 400
          description: HTTP status code for the error.
        message:
          type: string
          example: invalid request
          description: Human-readable description of the validation or request error.
      description: Error response when the request fails validation.
    controllers.AuthenticationError:
      type: object
      properties:
        code:
          type: integer
          example: 401
          description: HTTP status code for the error.
        message:
          type: string
          example: invalid token
          description: Human-readable description of the authentication failure.
      description: Error response when authentication fails.
    controllers.InternalServerError:
      type: object
      properties:
        code:
          type: integer
          example: 500
          description: HTTP status code for the error.
        message:
          type: string
          example: internal server error
          description: Human-readable description of the server error.
      description: Error response when the server encounters an unexpected 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:
          type: string
          description: >-
            The body of the content block usually refers to the content of the
            section.
          example: Asthma exacerbation
        loinc_code:
          type: string
          description: The LOINC code of the content block.
          example: 18776-5
        title:
          type: string
          description: The title of the content block usually refers to section name.
          example: ASSESSMENT AND PLAN
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token for the authenticated provider. Obtain this by calling
        Login or Register with a valid `partner_token`. Pass the `suki_token`
        value from the JSON response as the `sdp_suki_token` header on REST
        requests and non-browser WebSocket upgrades. Browser WebSocket clients
        pass the token in `Sec-WebSocket-Protocol` instead. Tokens expire after
        one hour; call Login again to refresh.

````