> ## 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.

# Fetch Note by Note ID

> Use note_id from create when calling get note content

export const CbRecipeMeta = ({items = []}) => <div className="cb-recipe-meta">
    {items.map(item => <span className={`cb-recipe-pill cb-recipe-pill--${item.type}${item.tone ? ` cb-recipe-pill--${item.tone}` : ""}`} key={`${item.type}-${item.label}`}>
        {item.type === "time" ? <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
            <circle cx="12" cy="12" r="10" />
            <polyline points="12 6 12 12 16 14" />
          </svg> : item.type === "level" ? <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
            <path d="M2 20h.01" />
            <path d="M7 20v-4" />
            <path d="M12 20v-8" />
            <path d="M17 20V8" />
            <path d="M22 20V4" />
          </svg> : item.type === "surface" ? <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
            <polyline points="16 18 22 12 16 6" />
            <polyline points="8 6 2 12 8 18" />
          </svg> : <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
            <path d="M12 3v3" />
            <path d="M12 18v3" />
            <path d="M3 12h3" />
            <path d="M18 12h3" />
            <path d="M5.6 5.6l2.1 2.1" />
            <path d="M16.3 16.3l2.1 2.1" />
            <path d="M5.6 18.4l2.1-2.1" />
            <path d="M16.3 7.7l2.1-2.1" />
          </svg>}
        {item.label}
      </span>)}
  </div>;

export const CbRecipePage = ({title, description, meta, recipeId, sidebar = {}, children}) => {
  const {tutorialHref, tutorialLabel = "Open Full Tutorial", apiHref, apiLabel = "View API Reference", authSections = [], glance = [], headers = []} = sidebar;
  return <div className="hp-wrap api-overview-wrap docs-frame-wrap cb-recipe-wrap" data-cb-recipe data-disable-read-time="true">
      <header className="cb-recipe-hero tut-hub-intro">
        <h1 className="sdk-overview-main-title api-overview-hero-page-title">{title}</h1>
        {description ? <div className="wse-prose">{description}</div> : null}
        {meta ? <div className="cb-recipe-meta-slot">{meta}</div> : null}
      </header>

      <div className="cb-recipe-body">
        <div className="cb-recipe-layout">
          <div className="cb-recipe-main prose prose-gray dark:prose-invert">{children}</div>

          <aside className="cb-recipe-sidebar" aria-label="Recipe actions and metadata">
            {recipeId ? <div className="cb-recipe-sidebar-card cb-recipe-sidebar-card--run">
                <div className="cb-run" data-cb-run data-recipe-id={recipeId} data-recipe-title={title}>
                  <button type="button" className="cb-run-trigger" aria-expanded="false">
                    <svg className="cb-run-trigger-icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                      <path d="M8 5v14l11-7L8 5z" />
                    </svg>
                    <span>Run This Recipe</span>
                    <svg className="cb-run-trigger-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
                      <polyline points="6 9 12 15 18 9" />
                    </svg>
                  </button>
                </div>
              </div> : null}

            <div className="cb-recipe-sidebar-card cb-recipe-sidebar-card--actions">
              <div className="cb-recipe-sidebar-actions">
                {tutorialHref ? <a className="cb-recipe-action cb-recipe-action--primary" href={tutorialHref}>
                    <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
                      <path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20" />
                      <path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" />
                    </svg>
                    <span>{tutorialLabel}</span>
                  </a> : null}
                {apiHref ? <a className="cb-recipe-action cb-recipe-action--secondary" href={apiHref}>
                    <svg className="cb-recipe-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
                      <path d="M8 4H6a2 2 0 0 0-2 2v4" />
                      <path d="M8 20H6a2 2 0 0 1-2-2v-4" />
                      <path d="M16 4h2a2 2 0 0 1 2 2v4" />
                      <path d="M16 20h2a2 2 0 0 0 2-2v-4" />
                    </svg>
                    <span>{apiLabel}</span>
                  </a> : null}
              </div>
              <div className="cb-recipe-sidebar-caption">
                Step-by-step tutorial and API reference for this workflow.
              </div>
            </div>

            {authSections.length ? <div className="cb-recipe-sidebar-card">
                <div className="cb-recipe-sidebar-kicker">Auth</div>
                {authSections.map(section => <div className="cb-recipe-auth-block" key={section.title}>
                    <div className="cb-recipe-auth-title">{section.title}</div>
                    <div className="cb-recipe-sidebar-copy">
                      {section.text}{" "}
                      {section.href ? <a href={section.href}>{section.linkLabel || "Learn more"}</a> : null}
                    </div>
                    {section.scopes?.length ? <div className="cb-recipe-scope-pills cb-recipe-auth-scopes">
                        {section.scopes.map(scope => <span className="cb-recipe-scope-pill" key={scope}>
                            {scope}
                          </span>)}
                      </div> : null}
                  </div>)}
              </div> : null}

            {glance.length ? <div className="cb-recipe-sidebar-card">
                <div className="cb-recipe-sidebar-kicker">At a glance</div>
                <dl className="cb-recipe-glance">
                  {glance.map(row => <div className="cb-recipe-glance-row" key={row.label}>
                      <dt>{row.label}</dt>
                      <dd>{row.value}</dd>
                    </div>)}
                </dl>
              </div> : null}

            {headers.length ? <div className="cb-recipe-sidebar-card">
                <div className="cb-recipe-sidebar-kicker">Required headers</div>
                <div className="cb-recipe-auth-title">Partner API</div>
                <div className="cb-recipe-scope-pills">
                  {headers.map(h => <span className="cb-recipe-scope-pill" key={h}>
                      {h}
                    </span>)}
                </div>
              </div> : null}
          </aside>
        </div>
      </div>
    </div>;
};

<CbRecipePage
  recipeId="get-note-content-by-note-id"
  title="Fetch Note by Note ID"
  description="The shared clinical note for a visit lives under `note_id`, not `ambient_session_id`. Pass the `note_id` from create when you call get note content after generation completes."
  meta={
<CbRecipeMeta
  items={[
    { type: "time", label: "5 min" },
    { type: "level", label: "Beginner" },
    { type: "product", label: "Ambient" },
    { type: "surface", label: "API", tone: "api" },
  ]}
/>
}
  sidebar={{
tutorialHref: "/documentation/tutorials/ambient-websocket-code-example",
apiHref: "/api-reference/ambient-content/note-content",
authSections: [
  {
    title: "Partner API",
    text: "Authenticate every REST call with Partner Token headers on each request. See",
    href: "/documentation/get-started/partner-authentication",
    linkLabel: "Partner authentication",
    scopes: ["sdp_suki_token", "sdp_provider_id"],
  },
],
glance: [
  { label: "Product", value: "Ambient" },
  { label: "Surface", value: "Partner API" },
  { label: "Time", value: "~5 min" },
  { label: "Level", value: "Beginner" },
],
}}
>
  ## Problem

  Partners often call note content APIs with `ambient_session_id` and get the wrong scope of data or empty results. Session content reflects one recording. The shared clinical note, including Web SDK edits, is keyed by `note_id`.

  Pass `note_id` from the create response to [Get note content](/api-reference/ambient-content/note-content). Wait for generation to finish first using [Wait for Ambient before fetch](/documentation/cookbooks/wait-for-status-before-retrieve).

  ## Architecture

  ```mermaid actions={false} theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  %%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#FFFBDE','primaryTextColor':'#1C1C1C','primaryBorderColor':'#FFD147','lineColor':'#6F5410','secondaryColor':'#FFFDF5','tertiaryColor':'#FFEB94','fontSize':'13px'}}}%%
  flowchart LR
    A[Create ambient session] --> B[Store note_id]
    B --> C[Stream and end session]
    C --> D[Poll until completed]
    D --> E["GET /note/{note_id}/content"]
  ```

  ## Prerequisites

  <Check>Completed [Partner onboarding](/documentation/get-started/partner-onboarding) and have `partner_id` with a valid Partner Token flow.</Check>

  <Check>A `note_id` from the create ambient session response, stored before streaming starts.</Check>

  <Check>Session status is `completed` (or you received a success webhook) before calling note content.</Check>

  ## Solution

  <Columns cols={3}>
    <Card title="Before">
      Store `note_id` from create, then wait until status is `completed`.
    </Card>

    <Card title="This Recipe">
      Call `GET /ambient/note/{note_id}/content`.
    </Card>

    <Card title="Next">
      Map `summary` into your EHR or UI. Re-fetch after Web SDK edits if needed.
    </Card>
  </Columns>

  Pass `note_id` from create to [Get note content](/api-reference/ambient-content/note-content). Wait for generation first ([Poll status](/documentation/cookbooks/wait-for-status-before-retrieve)).

  <Tabs>
    <Tab title="CURL">
      ```bash theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
      # Set NOTE_ID from create, after status is completed.
      curl --request GET \
        --url "https://sdp.suki.ai/api/v1/ambient/note/${NOTE_ID}/content" \
        --header "sdp_suki_token: ${SDP_SUKI_TOKEN}" \
        --header "sdp_provider_id: ${SDP_PROVIDER_ID}"
      ```
    </Tab>

    <Tab title="Python">
      ```python theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
      # get_note_content_by_note_id.py
      # pip install requests

      import json
      import os

      import requests

      BASE_URL = os.environ.get("SUKI_BASE_URL", "https://sdp.suki.ai")
      SDP_SUKI_TOKEN = os.environ["SDP_SUKI_TOKEN"]
      SDP_PROVIDER_ID = os.environ["SDP_PROVIDER_ID"]
      NOTE_ID = os.environ["NOTE_ID"]  # from create ambient session response


      def rest_headers() -> dict[str, str]:
          return {
              "sdp_suki_token": SDP_SUKI_TOKEN,
              "sdp_provider_id": SDP_PROVIDER_ID,
          }


      def get_note_content(note_id: str):
          url = f"{BASE_URL}/api/v1/ambient/note/{note_id}/content"
          response = requests.get(url, headers=rest_headers(), timeout=30)
          response.raise_for_status()
          return response.json()


      note = get_note_content(NOTE_ID)
      # note["summary"] holds section content for the shared clinical note
      print(json.dumps(note, indent=2))
      ```
    </Tab>

    <Tab title="TypeScript">
      ```typescript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
      // get-note-content-by-note-id.ts

      const BASE_URL = process.env.SUKI_BASE_URL ?? "https://sdp.suki.ai";
      const SDP_SUKI_TOKEN = process.env.SDP_SUKI_TOKEN!;
      const SDP_PROVIDER_ID = process.env.SDP_PROVIDER_ID!;
      const NOTE_ID = process.env.NOTE_ID!; // from create ambient session response

      function restHeaders(): Record<string, string> {
        return {
          sdp_suki_token: SDP_SUKI_TOKEN,
          sdp_provider_id: SDP_PROVIDER_ID,
        };
      }

      async function getNoteContent(noteId: string): Promise<unknown> {
        const response = await fetch(
          `${BASE_URL}/api/v1/ambient/note/${noteId}/content`,
          { headers: restHeaders() }
        );

        if (!response.ok) {
          throw new Error(`Get note content failed: ${response.status}`);
        }

        return response.json();
      }

      const note = (await getNoteContent(NOTE_ID)) as {
        summary?: unknown;
      };
      // note.summary holds section content for the shared clinical note
      console.log(JSON.stringify(note, null, 2));
      ```
    </Tab>
  </Tabs>

  <Steps>
    <Step title="Store note_id from create">
      Save `note_id` from the create ambient session response. You need it for every note content call on that visit.
    </Step>

    <Step title="Finish streaming and poll status">
      End the ambient session, then poll until status is `completed`. See [Wait for Ambient before fetch](/documentation/cookbooks/wait-for-status-before-retrieve).
    </Step>

    <Step title="Call GET note content with note_id">
      Pass `note_id` as the path parameter: `GET /api/v1/ambient/note/{note_id}/content`. See [Get note content](/api-reference/ambient-content/note-content).
    </Step>

    <Step title="Parse section content from the response">
      The response includes `summary` with section content for the shared clinical note. Re-fetch after Web SDK edits to get the latest version.
    </Step>
  </Steps>

  ## Try it

  <Card>
    * **note\_id returns the shared clinical note**

      Using `note_id` returns the visit note, including edits from the Web SDK. Session-scoped APIs do not substitute for this endpoint.

    * **Status must be completed first**

      Calling note content before status reaches `completed` often returns empty or partial data. Poll status or wait for a success webhook.

    * **summary holds section content**

      The JSON response `summary` field contains the generated note sections. Map these to your EHR or display layer.
  </Card>

  ## Common mistakes

  <Warning>
    * Pass `ambient_session_id` as `note_id`.
    * Call note content before status is `completed` (or before a success webhook).
    * Discard `note_id` after create and try to derive the note ID from the session.
  </Warning>

  ## Related cookbooks

  <Columns cols={2}>
    <Card title="Wait for Ambient before Fetch" href="/documentation/cookbooks/wait-for-status-before-retrieve" arrow={true} icon="book-open">
      Poll until status is completed.
    </Card>

    <Card title="Share One Note across Products" href="/documentation/cookbooks/pass-emr-encounter-id" arrow={true} icon="book-open">
      Share one note with emr\_encounter\_id.
    </Card>
  </Columns>
</CbRecipePage>
