Register an uploaded lab and schedule processing
Two-step upload flow — the partner first calls `POST /v1/uploads` to mint a pre-signed PUT URL, uploads the file to that URL, then calls this endpoint with the returned `file_url`. Returns `202 Accepted` with a partner-facing `lab_result_id` and the Temporal `workflow_id` driving extraction + analysis. Processing runs asynchronously; partners poll either `GET /v1/users/{user_id}/labs/{lab_result_id}` (status transitions: `pending` → `processing` → `ready` / `failed`) or `GET /v1/users/{user_id}/jobs/{job_id}` (raw Temporal workflow state). Both round-trip through the same execution. If the workflow start fails, the row stays in `pending` and `workflow_id` is `null`; partners should retry the upload.
Authorization
MemberBearer Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.
In: header
Path Parameters
uuidHeader Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://loading/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/labs/upload" \ -H "Content-Type: application/json" \ -d '{ "file_url": "string" }'{
"data": {
"lab_result_id": "f0d3eac0-9599-4eef-977f-96a8777c2dd8",
"status": "pending",
"workflow_id": "string"
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Deploy a coach profile (make it active)
Promotes a previously-created candidate to the active profile for the organization. The next chat session opens against this profile. Returns ``previous_active_profile_id`` so partners can roll back by deploying it. 404 if the profile is unknown or belongs to another organization.
List processed and in-flight lab results
Combines pending, processing, ready, and failed results in one paginated read so partners can render an at-a-glance lab history. Sort order is by `created_at` descending.