Skip to main content
GET
/
api
/
v1
/
form-filling
/
session
/
{ambient_session_id}
/
structured-data
Gets structured medical-form output for a form-filling session.
curl --request GET \
  --url https://sdp.suki-stage.com/api/v1/form-filling/session/{ambient_session_id}/structured-data \
  --header 'sdp_suki_token: <sdp_suki_token>'
{
  "structured_data": {
    "generated_values": [
      {
        "correlation_id": "20965414-929a-4f71-a3e5-b92bec07d086",
        "created_at": "2026-01-01T00:00:00Z",
        "data": {
          "additionalProp1": {}
        },
        "form_template_id": "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0-template",
        "id": "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0",
        "metadata": {
          "additionalProp1": {}
        },
        "patient_id": "patient-123",
        "status": "MEDICAL_FORM_STATUS_COMPLETED",
        "title": "Adult Vitals",
        "type": "VITALS_ASSESSMENT"
      }
    ],
    "non_generated_values": [
      {
        "form_template_id": "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0"
      }
    ]
  }
}

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.

Use this endpoint to get the cumulative associated with the specified . You receive the structured data in the response of this endpoint. The response contains the following fields:
  • generated_values: Form data with template IDs for which Suki was able to generate the structured data
  • non_generated_values: Form_Template_IDs for which Suki was not able to generate the structured data.

Code examples

The code examples below use placeholders and the stage host sdp.suki-stage.com only as examples. For credentials, base URLs, where to run Python or TypeScript, CORS, and cURL, refer to Using code examples in your integration in the API Reference Guidelines.
from typing import Any, TypedDict, cast

import requests

BASE_URL = "https://sdp.suki-stage.com"


class MedicalFormInstanceSummary(TypedDict, total=False):
    form_template_id: str


class FormFillingStructuredData(TypedDict, total=False):
    generated_values: list[MedicalFormInstanceSummary]
    non_generated_values: list[MedicalFormInstanceSummary]


class FormFillingStructuredDataResponse(TypedDict):
    structured_data: FormFillingStructuredData


class ApiHttpError(RuntimeError):
    """Wrong HTTP status; OpenAPI errors usually include JSON with message + code."""

    def __init__(self, status: int, url: str, detail: str) -> None:
        super().__init__(f"HTTP {status} {url}: {detail}")
        self.status = status
        self.url = url


def _get_expect_json_object(url: str, headers: dict[str, str], expect_status: int) -> dict[str, Any]:
    r = requests.get(url, headers=headers, timeout=60)
    if r.status_code == expect_status:
        data = r.json()
        if isinstance(data, dict):
            return data
        raise ApiHttpError(expect_status, url, "response JSON was not an object")

    detail = ""
    try:
        err = r.json()
        if isinstance(err, dict) and isinstance(err.get("message"), str):
            detail = err["message"]
    except ValueError:
        detail = (r.text or "")[:500]
    raise ApiHttpError(r.status_code, url, detail or "(no body)")


def get_form_filling_structured_data(suki_token: str, ambient_session_id: str) -> FormFillingStructuredDataResponse:
    """GET /api/v1/form-filling/session/{ambient_session_id}/structured-data (sdp_suki_token header required). HTTP 200."""
    url = f"{BASE_URL}/api/v1/form-filling/session/{ambient_session_id}/structured-data"
    data = _get_expect_json_object(url, {"sdp_suki_token": suki_token}, 200)
    sd = data.get("structured_data")
    if not isinstance(sd, dict):
        raise ValueError(f"{url}: 200 response missing structured_data object")
    return cast(FormFillingStructuredDataResponse, {"structured_data": sd})


if __name__ == "__main__":
    try:
        out = get_form_filling_structured_data("YOUR_SUKI_TOKEN", "YOUR_AMBIENT_SESSION_ID")
        print(out["structured_data"])
    except (ApiHttpError, ValueError) as e:
        print(e)

Headers

sdp_suki_token
string
required

sdp_suki_token

Path Parameters

ambient_session_id
string
required

ambient_session_id

Response

Success Response

Response body for /form-filling/session/{ambient_session_id}/structured-data

structured_data
object

Medical form instances for a form-filling session (full generated values and sparse non-generated entries).

Last modified on May 22, 2026