{
"code": 500,
"message": "internal server error"
}
Use this endpoint to retrieve filled Embedded Form values for a specific .Call this endpoint once Session status reaches completed state, or you receive a _links.section_structured_data link from the ambient SUCCESS webhook. To retrieve values from the latest completed ambient session for an encounter, use the Encounter Section Structured Data endpoint instead.
For how to seed templates, read the response, and map values back to your form, refer to Seed and read Embedded Forms.
Code examples
Python
TypeScript
import requestsambient_session_id = "<ambient_session_id>"url = f"https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/structured-data/section-structured-data"headers = { "sdp_suki_token": "<sdp_suki_token>", "sdp_provider_id": "<sdp_provider_id>",}response = requests.get(url, headers=headers)if response.status_code == 200: sections = response.json().get("section_structured_values") or [] if not sections: print("No Embedded Form values for this session.") for section in sections: print(f"Section {section.get('loinc_code')}") for form in section.get("forms") or []: print(f" Template {form.get('template_id')}") for field in form.get("values") or []: # value is a string, a list of strings, or None print(f" {field.get('key')} ({field.get('id')}): {field.get('value')}")else: print(f"Failed to get section structured data: {response.status_code}") print(response.json())
type FilledValue = { id?: string; key: string; value?: string | string[] | null };type SectionStructuredData = { loinc_code?: string; forms?: Array<{ template_id?: string; values?: FilledValue[] }>;};const ambientSessionId = "<ambient_session_id>";const response = await fetch( `https://sdp.suki.ai/api/v1/ambient/session/${ambientSessionId}/structured-data/section-structured-data`, { headers: { sdp_suki_token: "<sdp_suki_token>", sdp_provider_id: "<sdp_provider_id>", }, });if (response.ok) { const body: { section_structured_values?: SectionStructuredData[] } = await response.json(); const sections = body.section_structured_values ?? []; if (sections.length === 0) { console.log("No Embedded Form values for this session."); } sections.forEach((section) => { console.log(`Section ${section.loinc_code}`); section.forms?.forEach((form) => { console.log(` Template ${form.template_id}`); form.values?.forEach((field) => { // value is a string, a list of strings, or null console.log(` ${field.key} (${field.id}): ${JSON.stringify(field.value ?? null)}`); }); }); });} else { const error = await response.json(); console.error(`Failed to get section structured data: ${response.status}`, error);}
Authorizations
sdp_suki_token
string
header
required
Suki access token (suki_token) from Login or Register. Expires after one hour.
Headers
sdp_provider_id
string
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.
Example:
"provider-123"
Path Parameters
ambient_session_id
string
required
UUID for the ambient session. Use the ambient_session_id returned from Create Ambient Session, or the UUID you supplied in that request.
Response
Request succeeded.
Response body for the /session/{ambient_session_id}/structured-data/section-structured-data endpoint
section_structured_values
object[]
Embedded Form results for the ambient session, grouped by section LOINC.