> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/reference/health-and-fitness-api/lab-reports.md).

# Lab Reports

Upload lab reports and read back their standardized results.

## List report sessions

> Lists your account's report sessions, lab reports and scans alike, filtered by reference, upload, report type or date.\
> \
> \- Each session's \`report\_type\` tells a lab report from a scan.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"headers":{"LabReportsApiVersion":{"description":"The lab-reports API version this response was served in.","schema":{"type":"string","enum":["2026-03-24","2026-10-21"]}}},"schemas":{"LabReportListPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LabReportSession"},"description":"This page's sessions, summary fields only."},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; send it back as cursor with the same filters. null on the last page."}},"required":["data","has_more","next_cursor"],"description":"One page of the report list, newest first, as API version 2026-10-21 and later serve it."},"LabReportSession":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session_id":{"type":"string"},"upload_id":{"type":"string"},"reference_id":{"type":"string","description":"Your external reference; omitted if not set."},"report_type":{"$ref":"#/components/schemas/ReportType","description":"What kind of report this is, as a clean lowercase string (open enum — handle unknown values gracefully). \"lab\" for a clinical lab report, \"dexa\" for a DXA body-composition or bone-density scan, \"unspecified\" while the report is still being classified. Switch on this before reading results: dexa results are scoped by biomarker.region, lab results by biomarker.specimen."},"current_status":{"type":"string","description":"Current status as a clean lowercase string (open enum — handle unknown values gracefully). In flight: processing, processed, standardizing, standardized, sending, and retry_scheduled (waiting to retry after a temporary model-provider error; the report is still being worked on). Terminal: sent, partially_sent (delivered to some destinations), delivery_failed (processed and results available, but no destination accepted the delivery), failed (see error), cancelled, deleted."},"uploaded_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"report_date":{"type":"string","description":"Date printed on the report (YYYY-MM-DD); omitted if not extracted."},"report_time":{"type":"string","description":"Time printed on the report (HH:MM, 24-hour); omitted if not extracted."},"collection_date":{"type":"string","description":"Date the sample was collected or the scan was taken (YYYY-MM-DD); omitted if not extracted."},"collection_time":{"type":"string","description":"Time the sample was collected or the scan was taken (HH:MM, 24-hour); omitted if not extracted."},"report_locale":{"type":"string"},"lab_name":{"type":"string"},"patient_age_at_collection":{"type":"integer","description":"Patient age in years; omitted if unknown."},"patient_sex":{"type":"string","description":"Clean lowercase string (open enum); omitted if unspecified."},"input_bytes":{"type":"integer"},"results_count":{"type":"integer"},"output_bytes":{"type":"integer"},"file_count":{"type":"integer"},"status_history":{"type":"array","items":{"$ref":"#/components/schemas/LabReportStatusEntry"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/LabReportResult"},"description":"The layered biomarker results. Populated on retrieve, not on list."},"panels":{"type":"array","items":{"$ref":"#/components/schemas/LabReportPanel"},"description":"Report-level panels that results reference by panel_id. Omitted if the report has no panel grouping."},"report_notes":{"type":"string"},"error":{"$ref":"#/components/schemas/LabReportEventError","description":"Why the report failed: the same object the lab_report.failed webhook carries. Present only while current_status is failed."}},"required":["session_id","report_type","current_status"],"description":"A lab report session. Returned in full on retrieve; list items carry the summary fields only (no results/panels)."},"ReportType":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["lab","dexa","unspecified"],"description":"What kind of report a session holds. Closed set: a session is classified on upload and lands in exactly one of these."},"LabReportStatusEntry":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"note":{"type":"string"}},"required":["status"]},"LabReportResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"$ref":"#/components/schemas/LabReportResultSource"},"biomarker":{"$ref":"#/components/schemas/LabReportBiomarker"},"measurement":{"$ref":"#/components/schemas/LabReportMeasurement"},"interpretation":{"$ref":"#/components/schemas/LabReportInterpretation"},"reference_ranges":{"type":"array","items":{"$ref":"#/components/schemas/LabReportReferenceRange"}}},"required":["source","biomarker","measurement","interpretation"],"description":"One layered result: verbatim source, normalized biomarker identity, one typed measurement, and the interpretation. measurement and interpretation are byte-identical to the webhook payload."},"LabReportResultSource":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"panel":{"type":"string"},"value":{"type":"string","description":"Raw value string as printed."},"units":{"type":"string"},"flag":{"type":"string","description":"Verbatim flag; the coded form is under interpretation."},"method":{"type":"string"},"notes":{"type":"string"},"reference_text":{"type":"string"},"region_name":{"type":"string","description":"Anatomical site label exactly as printed on the report, in the original language. Present whenever the report shows a site, including when no canonical region key matched."},"collection_date":{"type":"string","description":"Date this specific measurement was taken (YYYY-MM-DD). Distinguishes a prior scan in a trend table from the current one; omitted if not shown per result."},"collection_time":{"type":"string","description":"Time this specific measurement was taken (HH:MM, 24-hour); omitted if not shown per result."}},"description":"The verbatim provenance layer — what the report literally printed."},"LabReportBiomarker":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Canonical biomarker slug, or null when unmatched — the sole no-match signal. Do not key off loinc_code, which can be null on a match."},"display_name":{"type":"string"},"loinc_code":{"type":"string","description":"LOINC code; omitted when the matched biomarker has no LOINC mapping. On a site-scoped (DXA) result the code identifies the (measure, site) pair rather than the measure alone, because LOINC's DXA terms are pre-coordinated — the site is baked into the term. Read it off each result; do not cache it against biomarker.key. Coverage is partial on scans: per-site body-fat percentage and the mass/lean/BMC measures have no LOINC term and omit the field."},"panel_id":{"type":"integer","description":"References panels[].id on the enclosing session."},"panel_key":{"type":"string"},"specimen":{"type":"string"},"region":{"$ref":"#/components/schemas/AnatomicalRegion","description":"Canonical anatomical site key for site-scoped (DXA) reports, drawn from a closed vocabulary of ~70 members (arms, arm_left, trunk, android, gynoid, vat, l1_l4, spine_lumbar, femur_neck_left, forearm_total_right, ...). Treated as an open enum on the wire so new sites do not break existing consumers; the full list is published in the Lab Reports documentation. Together with biomarker.key it forms the identity of a scan result — the same measure appears once per site, so key alone is not unique. Omitted for lab results, which are scoped by specimen instead."}},"required":["key"],"description":"The normalized identity layer."},"AnatomicalRegion":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["head","arms","arm_left","arm_right","legs","leg_left","leg_right","trunk","trunk_left","trunk_right","android","gynoid","vat","ribs","ribs_left","ribs_right","spine","spine_thoracic","spine_lumbar","pelvis","subtotal","total","total_left","total_right","whole_body","l1","l2","l3","l4","l1_l2","l1_l3","l1_l4","l2_l3","l2_l4","l3_l4","femur_neck","femur_neck_left","femur_neck_right","femur_trochanter","femur_trochanter_left","femur_trochanter_right","femur_intertrochanter","femur_intertrochanter_left","femur_intertrochanter_right","femur_wards","femur_wards_left","femur_wards_right","femur_total","femur_total_left","femur_total_right","femur_dual_total","radius_ultradistal","radius_ultradistal_left","radius_ultradistal_right","radius_mid","radius_mid_left","radius_mid_right","radius_33","radius_33_left","radius_33_right","forearm_total","forearm_total_left","forearm_total_right"],"description":"Canonical anatomical site keys for site-scoped (DXA) results. Closed vocabulary: the extractor may only emit a member of this set, and anything else is discarded before storage. Ordered anatomy-first, laterality-last, so a prefix match (\"femur_neck\") is a valid family query."},"LabReportMeasurement":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","description":"One of numeric, bounded, qualitative, text, absent."},"numeric":{"type":"number"},"bounded":{"$ref":"#/components/schemas/LabReportBoundedValue"},"qualitative":{"$ref":"#/components/schemas/LabReportQualitativeValue"},"text":{"type":"string"},"absent_reason":{"type":"string"},"units":{"type":"string"},"ucum_code":{"type":"string"}},"required":["type"],"description":"The single typed value of a result. Exactly one value field is set, named by type."},"LabReportBoundedValue":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operator":{"type":"string","description":"lt or gt."},"value":{"type":"number"}},"required":["operator","value"],"description":"A one-sided bound. operator is lt or gt; value is the magnitude (e.g. lt with 0.5 means <0.5)."},"LabReportQualitativeValue":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string"},"code":{"type":"string","description":"Coded qualitative answer (LOINC/SNOMED) when available."}}},"LabReportInterpretation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coded signal (high/low/normal), or null when there is no signal."},"flag_raw":{"type":"string","description":"The lab's verbatim flag."},"source":{"type":"string","description":"Provenance of flag — report, computed, or none."},"applied_range":{"$ref":"#/components/schemas/LabReportAppliedRange"}},"required":["flag","source"],"description":"The per-result abnormality layer."},"LabReportAppliedRange":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"lower":{"type":"number"},"upper":{"type":"number"}},"description":"Bounds of the reference range the flag was judged against."},"LabReportReferenceRange":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"lower":{"type":"number"},"upper":{"type":"number"},"type":{"type":"string","description":"Coded range type (open enum: normal, low, high, borderline_low, borderline_high, critical_low, critical_high, abnormal, therapeutic, subtherapeutic, toxic). A lossy coding of `label`, judged from the report's wording and where the band sits among the result's ranges — a prediabetes band between the no-diabetes and diabetes bands is borderline_high. Omitted when nothing in the vocabulary fits."},"label":{"type":"string","description":"The range's classification exactly as the report printed it — \"Optimal\", \"Moderate\", \"Consistent with increased risk for diabetes (prediabetes)\". When a result carries several ranges they are bands, not one normal interval; this is the field that says what each band means."},"context":{"$ref":"#/components/schemas/LabReportRangeContext"}},"description":"One reference range. type describes the range, not a verdict on the result."},"LabReportRangeContext":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sex":{"type":"string"},"age_lower":{"type":"integer"},"age_upper":{"type":"integer"},"pregnancy_status":{"type":"string"},"gestational_week_lower":{"type":"integer"},"gestational_week_upper":{"type":"integer"},"cycle_phase":{"type":"string"},"reference_population":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}},"description":"The patient dimensions a reference range is scoped by."},"LabReportPanel":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"integer","description":"Report-local ordinal; matches LabReportBiomarker.panel_id."},"name":{"type":"string","description":"Verbatim panel header as printed on the report."},"key":{"type":"string","description":"Normalized dedup key (deterministic text, not a LOINC code)."}},"required":["id"],"description":"A report-level grouping that results reference by panel_id."},"LabReportEventError":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","description":"Machine-readable failure code. An open set: handle codes you do not recognise like internal. unsupported_report_type: the file is not a lab report or DXA scan (see document_class). file_unreadable: the file could not be read, e.g. a blurry or cropped photo, or an image that does not decode; ask the user for a clearer one. file_too_large: the files together exceed what one report can be read from; upload fewer or smaller files. no_results_found: the report was readable but has no results in it. extraction_failed: the results could not be extracted from the file. standardization_failed: the extracted results could not be standardized. internal: a fault on our side."},"message":{"type":"string","description":"Human-readable explanation. Not stable; branch on code."},"retriable":{"type":"boolean","description":"Whether POST …/reprocess may succeed with no change to the input. False means the input must change first: upload a different file."},"document_class":{"type":"string","description":"For unsupported_report_type only: what the file was judged to be instead of a lab report or scan. other_medical (another medical document, e.g. a DNA test or an imaging report) or non_medical. An open set."}},"required":["code","message","retriable"],"description":"Structured failure reason, on the lab_report.failed webhook and on a failed session."},"LabReportListResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/LabReportSession"}}},"required":["sessions"],"description":"The report list as API version 2026-03-24 serves it: up to 500 sessions, newest first, with no pagination."},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports":{"get":{"summary":"List report sessions","description":"Lists your account's report sessions, lab reports and scans alike, filtered by reference, upload, report type or date.\n\n- Each session's `report_type` tells a lab report from a scan.","tags":["LabReports"],"operationId":"Reports_List","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"limit","in":"query","required":false,"description":"Sessions per page. Defaults to 50; a larger value than 200 is served as 200. From API version 2026-10-21.","schema":{"type":"integer","minimum":1,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The previous page's `next_cursor`. Send it with the same filters it was issued for; with different filters it is a 400 with code `validation_failed`. From API version 2026-10-21.","schema":{"type":"string"}},{"name":"reference_id","in":"query","required":false,"description":"Your external reference ID, as sent on upload; returns only sessions uploaded with it.","schema":{"type":"string"}},{"name":"report_type","in":"query","required":false,"description":"The kind of session to return: `lab` or `dexa`. Omit for both.","schema":{"type":"string","enum":["lab","dexa"]}},{"name":"upload_id","in":"query","required":false,"description":"An `upload_id` from `POST /reports`; returns every session from that upload.","schema":{"type":"string"}},{"name":"report_date_from","in":"query","required":false,"description":"Earliest report date to include, inclusive (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"report_date_to","in":"query","required":false,"description":"Latest report date to include, inclusive (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"uploaded_at_from","in":"query","required":false,"description":"Earliest upload date to include, inclusive (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}},{"name":"uploaded_at_to","in":"query","required":false,"description":"Latest upload date to include, inclusive (`YYYY-MM-DD`).","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"One page of sessions, newest first (`LabReportListPage`). An environment served API version 2026-03-24 gets `LabReportListResponse` instead: up to 500 sessions in `sessions`, with `limit` and `cursor` ignored.","headers":{"X-Terra-Version":{"$ref":"#/components/headers/LabReportsApiVersion"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LabReportListPage"},{"$ref":"#/components/schemas/LabReportListResponse"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"503":{"description":"Current product authorization or the environment's API version pin is unavailable (code `authorization_unavailable`), or paging is briefly unavailable while a deploy rolls out (code `service_unavailable`). Retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}
```

## Upload a report

> Uploads one report for processing and returns its \`upload\_id\`.\
> \
> \- Send one \`file\` part, or one per page in page order; all of an upload's files are read as one report and produce one session, so upload separate reports separately.\
> \- A file's type is read from its contents, not its name or declared type.\
> \- Lab reports and DXA body-composition or bone-density scans both go here; Terra detects which, and the session and webhook carry it as \`report\_type\`.\
> \- Find the \`session\_id\` in the webhook events or with \`GET /reports?upload\_id=...\`.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"schemas":{"LabReportUploadResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"upload_id":{"type":"string","description":"Durable correlation key for the upload; every resulting session and webhook carries it."},"current_status":{"type":"string","description":"Processing status as a clean lowercase string."}},"required":["upload_id","current_status"],"description":"Returned by the upload endpoint. Every file of an upload belongs to one report, read in the order the files were sent."},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"UploadInvalid":{"description":"The upload was refused. `code` says why: `validation_failed` (no `file` part, an empty file, a part without a filename, or a malformed form), `unsupported_file_type` (a file is not a PDF or a supported image; `detail` names the type its contents show), or `too_many_files` (more than 20 files).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"PayloadTooLarge":{"description":"`code: payload_too_large`: a file is over 20 MB, the upload is over 50 MB in total, or its PDFs are over 22.5 MB together, more than can be read as one report.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"UploadRateLimited":{"description":"`code: rate_limited`: this environment has sent 50 uploads this clock minute or 500 this clock hour, counted across `POST /reports` and `POST /lab-reports`. Refused attempts count too, so wait `Retry-After` seconds before retrying. Every upload response, not only this one, carries the `X-RateLimit-*` headers.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The nearest limit, then each window, e.g. `50, 50;w=60, 500;w=3600`.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Uploads left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports":{"post":{"summary":"Upload a report","description":"Uploads one report for processing and returns its `upload_id`.\n\n- Send one `file` part, or one per page in page order; all of an upload's files are read as one report and produce one session, so upload separate reports separately.\n- A file's type is read from its contents, not its name or declared type.\n- Lab reports and DXA body-composition or bone-density scans both go here; Terra detects which, and the session and webhook carry it as `report_type`.\n- Find the `session_id` in the webhook events or with `GET /reports?upload_id=...`.","tags":["LabReports"],"operationId":"Reports_Upload","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"reference_id","in":"query","required":false,"description":"Your external identifier for this report or patient.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"A file of the report: a PDF or a PNG, JPEG, GIF, WebP or HEIC/HEIF image. Repeat the `file` part, up to 20 times, to send a report's pages as separate files, in the order of the pages. At most 20 MB per file and 50 MB per upload, of which at most 22.5 MB PDF. Files are stored as uploaded, so a HEIC photo keeps its EXIF metadata, location included; strip it before uploading if that matters."}}}}}},"responses":{"202":{"description":"Upload accepted for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportUploadResponse"}}}},"400":{"$ref":"#/components/responses/UploadInvalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/UploadRateLimited"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```

## Retrieve a lab report session

> Returns a report session with its metadata, results, reference ranges and status history.\
> \
> \- Presigned file URLs and per-destination delivery state are not included: read them with \`GET /reports/{session\_id}/files\` and \`GET /reports/{session\_id}/deliveries\`.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"schemas":{"LabReportSession":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session_id":{"type":"string"},"upload_id":{"type":"string"},"reference_id":{"type":"string","description":"Your external reference; omitted if not set."},"report_type":{"$ref":"#/components/schemas/ReportType","description":"What kind of report this is, as a clean lowercase string (open enum — handle unknown values gracefully). \"lab\" for a clinical lab report, \"dexa\" for a DXA body-composition or bone-density scan, \"unspecified\" while the report is still being classified. Switch on this before reading results: dexa results are scoped by biomarker.region, lab results by biomarker.specimen."},"current_status":{"type":"string","description":"Current status as a clean lowercase string (open enum — handle unknown values gracefully). In flight: processing, processed, standardizing, standardized, sending, and retry_scheduled (waiting to retry after a temporary model-provider error; the report is still being worked on). Terminal: sent, partially_sent (delivered to some destinations), delivery_failed (processed and results available, but no destination accepted the delivery), failed (see error), cancelled, deleted."},"uploaded_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"report_date":{"type":"string","description":"Date printed on the report (YYYY-MM-DD); omitted if not extracted."},"report_time":{"type":"string","description":"Time printed on the report (HH:MM, 24-hour); omitted if not extracted."},"collection_date":{"type":"string","description":"Date the sample was collected or the scan was taken (YYYY-MM-DD); omitted if not extracted."},"collection_time":{"type":"string","description":"Time the sample was collected or the scan was taken (HH:MM, 24-hour); omitted if not extracted."},"report_locale":{"type":"string"},"lab_name":{"type":"string"},"patient_age_at_collection":{"type":"integer","description":"Patient age in years; omitted if unknown."},"patient_sex":{"type":"string","description":"Clean lowercase string (open enum); omitted if unspecified."},"input_bytes":{"type":"integer"},"results_count":{"type":"integer"},"output_bytes":{"type":"integer"},"file_count":{"type":"integer"},"status_history":{"type":"array","items":{"$ref":"#/components/schemas/LabReportStatusEntry"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/LabReportResult"},"description":"The layered biomarker results. Populated on retrieve, not on list."},"panels":{"type":"array","items":{"$ref":"#/components/schemas/LabReportPanel"},"description":"Report-level panels that results reference by panel_id. Omitted if the report has no panel grouping."},"report_notes":{"type":"string"},"error":{"$ref":"#/components/schemas/LabReportEventError","description":"Why the report failed: the same object the lab_report.failed webhook carries. Present only while current_status is failed."}},"required":["session_id","report_type","current_status"],"description":"A lab report session. Returned in full on retrieve; list items carry the summary fields only (no results/panels)."},"ReportType":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["lab","dexa","unspecified"],"description":"What kind of report a session holds. Closed set: a session is classified on upload and lands in exactly one of these."},"LabReportStatusEntry":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"note":{"type":"string"}},"required":["status"]},"LabReportResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"$ref":"#/components/schemas/LabReportResultSource"},"biomarker":{"$ref":"#/components/schemas/LabReportBiomarker"},"measurement":{"$ref":"#/components/schemas/LabReportMeasurement"},"interpretation":{"$ref":"#/components/schemas/LabReportInterpretation"},"reference_ranges":{"type":"array","items":{"$ref":"#/components/schemas/LabReportReferenceRange"}}},"required":["source","biomarker","measurement","interpretation"],"description":"One layered result: verbatim source, normalized biomarker identity, one typed measurement, and the interpretation. measurement and interpretation are byte-identical to the webhook payload."},"LabReportResultSource":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"panel":{"type":"string"},"value":{"type":"string","description":"Raw value string as printed."},"units":{"type":"string"},"flag":{"type":"string","description":"Verbatim flag; the coded form is under interpretation."},"method":{"type":"string"},"notes":{"type":"string"},"reference_text":{"type":"string"},"region_name":{"type":"string","description":"Anatomical site label exactly as printed on the report, in the original language. Present whenever the report shows a site, including when no canonical region key matched."},"collection_date":{"type":"string","description":"Date this specific measurement was taken (YYYY-MM-DD). Distinguishes a prior scan in a trend table from the current one; omitted if not shown per result."},"collection_time":{"type":"string","description":"Time this specific measurement was taken (HH:MM, 24-hour); omitted if not shown per result."}},"description":"The verbatim provenance layer — what the report literally printed."},"LabReportBiomarker":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Canonical biomarker slug, or null when unmatched — the sole no-match signal. Do not key off loinc_code, which can be null on a match."},"display_name":{"type":"string"},"loinc_code":{"type":"string","description":"LOINC code; omitted when the matched biomarker has no LOINC mapping. On a site-scoped (DXA) result the code identifies the (measure, site) pair rather than the measure alone, because LOINC's DXA terms are pre-coordinated — the site is baked into the term. Read it off each result; do not cache it against biomarker.key. Coverage is partial on scans: per-site body-fat percentage and the mass/lean/BMC measures have no LOINC term and omit the field."},"panel_id":{"type":"integer","description":"References panels[].id on the enclosing session."},"panel_key":{"type":"string"},"specimen":{"type":"string"},"region":{"$ref":"#/components/schemas/AnatomicalRegion","description":"Canonical anatomical site key for site-scoped (DXA) reports, drawn from a closed vocabulary of ~70 members (arms, arm_left, trunk, android, gynoid, vat, l1_l4, spine_lumbar, femur_neck_left, forearm_total_right, ...). Treated as an open enum on the wire so new sites do not break existing consumers; the full list is published in the Lab Reports documentation. Together with biomarker.key it forms the identity of a scan result — the same measure appears once per site, so key alone is not unique. Omitted for lab results, which are scoped by specimen instead."}},"required":["key"],"description":"The normalized identity layer."},"AnatomicalRegion":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["head","arms","arm_left","arm_right","legs","leg_left","leg_right","trunk","trunk_left","trunk_right","android","gynoid","vat","ribs","ribs_left","ribs_right","spine","spine_thoracic","spine_lumbar","pelvis","subtotal","total","total_left","total_right","whole_body","l1","l2","l3","l4","l1_l2","l1_l3","l1_l4","l2_l3","l2_l4","l3_l4","femur_neck","femur_neck_left","femur_neck_right","femur_trochanter","femur_trochanter_left","femur_trochanter_right","femur_intertrochanter","femur_intertrochanter_left","femur_intertrochanter_right","femur_wards","femur_wards_left","femur_wards_right","femur_total","femur_total_left","femur_total_right","femur_dual_total","radius_ultradistal","radius_ultradistal_left","radius_ultradistal_right","radius_mid","radius_mid_left","radius_mid_right","radius_33","radius_33_left","radius_33_right","forearm_total","forearm_total_left","forearm_total_right"],"description":"Canonical anatomical site keys for site-scoped (DXA) results. Closed vocabulary: the extractor may only emit a member of this set, and anything else is discarded before storage. Ordered anatomy-first, laterality-last, so a prefix match (\"femur_neck\") is a valid family query."},"LabReportMeasurement":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","description":"One of numeric, bounded, qualitative, text, absent."},"numeric":{"type":"number"},"bounded":{"$ref":"#/components/schemas/LabReportBoundedValue"},"qualitative":{"$ref":"#/components/schemas/LabReportQualitativeValue"},"text":{"type":"string"},"absent_reason":{"type":"string"},"units":{"type":"string"},"ucum_code":{"type":"string"}},"required":["type"],"description":"The single typed value of a result. Exactly one value field is set, named by type."},"LabReportBoundedValue":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operator":{"type":"string","description":"lt or gt."},"value":{"type":"number"}},"required":["operator","value"],"description":"A one-sided bound. operator is lt or gt; value is the magnitude (e.g. lt with 0.5 means <0.5)."},"LabReportQualitativeValue":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string"},"code":{"type":"string","description":"Coded qualitative answer (LOINC/SNOMED) when available."}}},"LabReportInterpretation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Coded signal (high/low/normal), or null when there is no signal."},"flag_raw":{"type":"string","description":"The lab's verbatim flag."},"source":{"type":"string","description":"Provenance of flag — report, computed, or none."},"applied_range":{"$ref":"#/components/schemas/LabReportAppliedRange"}},"required":["flag","source"],"description":"The per-result abnormality layer."},"LabReportAppliedRange":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"lower":{"type":"number"},"upper":{"type":"number"}},"description":"Bounds of the reference range the flag was judged against."},"LabReportReferenceRange":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"lower":{"type":"number"},"upper":{"type":"number"},"type":{"type":"string","description":"Coded range type (open enum: normal, low, high, borderline_low, borderline_high, critical_low, critical_high, abnormal, therapeutic, subtherapeutic, toxic). A lossy coding of `label`, judged from the report's wording and where the band sits among the result's ranges — a prediabetes band between the no-diabetes and diabetes bands is borderline_high. Omitted when nothing in the vocabulary fits."},"label":{"type":"string","description":"The range's classification exactly as the report printed it — \"Optimal\", \"Moderate\", \"Consistent with increased risk for diabetes (prediabetes)\". When a result carries several ranges they are bands, not one normal interval; this is the field that says what each band means."},"context":{"$ref":"#/components/schemas/LabReportRangeContext"}},"description":"One reference range. type describes the range, not a verdict on the result."},"LabReportRangeContext":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sex":{"type":"string"},"age_lower":{"type":"integer"},"age_upper":{"type":"integer"},"pregnancy_status":{"type":"string"},"gestational_week_lower":{"type":"integer"},"gestational_week_upper":{"type":"integer"},"cycle_phase":{"type":"string"},"reference_population":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}},"description":"The patient dimensions a reference range is scoped by."},"LabReportPanel":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"integer","description":"Report-local ordinal; matches LabReportBiomarker.panel_id."},"name":{"type":"string","description":"Verbatim panel header as printed on the report."},"key":{"type":"string","description":"Normalized dedup key (deterministic text, not a LOINC code)."}},"required":["id"],"description":"A report-level grouping that results reference by panel_id."},"LabReportEventError":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","description":"Machine-readable failure code. An open set: handle codes you do not recognise like internal. unsupported_report_type: the file is not a lab report or DXA scan (see document_class). file_unreadable: the file could not be read, e.g. a blurry or cropped photo, or an image that does not decode; ask the user for a clearer one. file_too_large: the files together exceed what one report can be read from; upload fewer or smaller files. no_results_found: the report was readable but has no results in it. extraction_failed: the results could not be extracted from the file. standardization_failed: the extracted results could not be standardized. internal: a fault on our side."},"message":{"type":"string","description":"Human-readable explanation. Not stable; branch on code."},"retriable":{"type":"boolean","description":"Whether POST …/reprocess may succeed with no change to the input. False means the input must change first: upload a different file."},"document_class":{"type":"string","description":"For unsupported_report_type only: what the file was judged to be instead of a lab report or scan. other_medical (another medical document, e.g. a DNA test or an imaging report) or non_medical. An open set."}},"required":["code","message","retriable"],"description":"Structured failure reason, on the lab_report.failed webhook and on a failed session."},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"A referenced resource does not exist on Terra's end.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports/{session_id}":{"get":{"summary":"Retrieve a lab report session","description":"Returns a report session with its metadata, results, reference ranges and status history.\n\n- Presigned file URLs and per-destination delivery state are not included: read them with `GET /reports/{session_id}/files` and `GET /reports/{session_id}/deliveries`.","tags":["LabReports"],"operationId":"Reports_Get","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"session_id","in":"path","required":true,"description":"The session's snowflake ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"The lab report session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportSession"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```

## Delete a lab report session

> Deletes a report session.\
> \
> \- It is removed from the API immediately: every later read of it returns 404.\
> \- Its files, results and Terra's copies of them are erased from active systems within 30 days (target 24 hours), and backups expire within 10 days.\
> \- Works without Lab Reports access.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"NotFound":{"description":"A referenced resource does not exist on Terra's end.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}}},"paths":{"/reports/{session_id}":{"delete":{"summary":"Delete a lab report session","description":"Deletes a report session.\n\n- It is removed from the API immediately: every later read of it returns 404.\n- Its files, results and Terra's copies of them are erased from active systems within 30 days (target 24 hours), and backups expire within 10 days.\n- Works without Lab Reports access.","tags":["LabReports"],"operationId":"Reports_Delete","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"session_id","in":"path","required":true,"description":"The session's snowflake ID.","schema":{"type":"string"}}],"responses":{"204":{"description":"The session was deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```

## List delivery outcomes

> Returns a report's delivery state for each opted-in destination.\
> \
> \- Each destination is tracked independently, so one failure never hides delivery to the others; that is why a session can be \`partially\_sent\`.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"schemas":{"LabReportDeliveriesResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/LabReportDelivery"}}},"required":["deliveries"]},"LabReportDelivery":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"destination_id":{"type":"string"},"destination_type":{"type":"string","description":"The destination's type (e.g. webhook, s3)."},"status":{"type":"string","description":"pending, delivered, or failed."},"attempt_count":{"type":"integer","description":"Retry count — 0 on the first attempt, incremented per retry."},"last_error":{"type":"string","description":"Most recent delivery error; omitted when delivered."}},"required":["destination_id","status","attempt_count"]},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"A referenced resource does not exist on Terra's end.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports/{session_id}/deliveries":{"get":{"summary":"List delivery outcomes","description":"Returns a report's delivery state for each opted-in destination.\n\n- Each destination is tracked independently, so one failure never hides delivery to the others; that is why a session can be `partially_sent`.","tags":["LabReports"],"operationId":"Reports_ListDeliveries","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"session_id","in":"path","required":true,"description":"The session's snowflake ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Per-destination delivery outcomes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportDeliveriesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```

## List input files

> Returns a report's uploaded input files and thumbnail, each with a freshly minted presigned download URL.\
> \
> \- The URLs expire; call again to mint new ones.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"schemas":{"LabReportFilesResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/LabReportFile"}},"thumbnail":{"$ref":"#/components/schemas/LabReportFile"},"expires_at":{"type":"string","format":"date-time","description":"Applies to every presigned URL in the response."}},"required":["files"]},"LabReportFile":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string"},"presigned_url":{"type":"string"},"content_type":{"type":"string","description":"An uploaded file's content type. Present on files only."}},"required":["presigned_url"],"description":"One downloadable object with a presigned URL."},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"A referenced resource does not exist on Terra's end.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports/{session_id}/files":{"get":{"summary":"List input files","description":"Returns a report's uploaded input files and thumbnail, each with a freshly minted presigned download URL.\n\n- The URLs expire; call again to mint new ones.","tags":["LabReports"],"operationId":"Reports_ListFiles","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"session_id","in":"path","required":true,"description":"The session's snowflake ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Input files and thumbnail with presigned URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportFilesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```

## Reprocess a session

> Re-runs extraction and standardisation on a session from its stored input files, replacing its results and delivering it again to the environment's current destinations on completion.\
> \
> \- Only a delivered (\`sent\`, \`partially\_sent\`, \`delivery\_failed\`) or failed session can be reprocessed.\
> \- Re-running a failed report helps only when its \`error.retriable\` is true; otherwise change the input first.\
> \- A report is metered once; reprocessing an already metered session does not meter it again.\
> \- A session can be reprocessed at most 3 times.

```json
{"openapi":"3.2.0","info":{"title":"Terra API","version":"2026.11.19"},"tags":[{"name":"LabReports","summary":"Lab Reports","description":"Upload lab reports and read back their standardized results."}],"servers":[{"url":"https://access.tryterra.co/api/v2"}],"security":[{"ApiKeyAuth":[],"DevID":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key for authentication"},"DevID":{"type":"apiKey","in":"header","name":"dev-id","description":"Your developer ID for authentication and tracking"}},"parameters":{"LabReportsApiVersion":{"name":"X-Terra-Version","in":"header","required":false,"description":"The lab-reports API version to serve this request in, as a YYYY-MM-DD date: the newest version on or before it, or 2026-03-24 for an earlier date. Defaults to the environment's pinned version, else the latest. A malformed or future date is a 400 with code `invalid_api_version`.","schema":{"type":"string","format":"date"}}},"schemas":{"LabReportReprocessResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session_id":{"type":"string"},"current_status":{"type":"string"}},"required":["session_id","current_status"]},"Problem":{"type":"object","description":"An error response, following RFC 9457 (Problem Details for HTTP APIs, which obsoletes RFC 7807). Returned with `Content-Type: application/problem+json` on every 4xx/5xx response. The HTTP status line carries the status code; it is intentionally not repeated in the body. `type`, `title` and `instance` are always present; `detail` is included when a specific explanation is available.\n","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance"]},"UnauthorizedProblem":{"type":"object","description":"A refused credential, always with its code.","properties":{"type":{"type":"string","description":"A URI reference identifying the problem type. Defaults to `about:blank`."},"title":{"type":"string","description":"A short, human-readable summary of the problem type (the lowercased HTTP status text)."},"instance":{"type":"string","description":"The request path, including any query string, that produced this problem."},"code":{"type":"string","description":"Stable error classification: branch on this, not on `detail`. A refused credential returns unauthorized (401: missing, invalid, expired or revoked), scope_missing (403: the credential lacks the scope the operation requires) or audience_restricted (403: the credential is not granted for this dev-id). authorization_unavailable (503) means the credential or the product access could not be checked; retry later. Product gates return entitlement_required (403) or environment_disabled (403). service_unavailable (503) means the request never reached the service; dependency_failed (502 or 504) means the service did not complete it, though it may already have acted on it. Report uploads return validation_failed, unsupported_file_type or too_many_files (400), payload_too_large (413) and rate_limited (429)."},"product":{"type":"string","description":"The product checked by the authorization gate, when classified."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."}},"required":["type","title","instance","code"]}},"responses":{"BadRequest":{"description":"One or more parameters is malformed. The `detail` field describes the specific problem.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"The credential is missing, invalid, expired or revoked (code `unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblem"}}}},"Forbidden":{"description":"The credential is not authorized (code scope_missing or audience_restricted), the environment is disabled (environment_disabled), or the required product entitlement is missing (entitlement_required).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"A referenced resource does not exist on Terra's end.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"ReportNotReprocessable":{"description":"The session cannot be reprocessed: it is still being processed, was cancelled, or has used its 3 re-runs (problem code `reprocess_limit_reached`). A deleted session is 404.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AuthorizationUnavailable":{"description":"The credential or the product access could not be checked (code `authorization_unavailable`). Retry after the service recovers.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/reports/{session_id}/reprocess":{"post":{"summary":"Reprocess a session","description":"Re-runs extraction and standardisation on a session from its stored input files, replacing its results and delivering it again to the environment's current destinations on completion.\n\n- Only a delivered (`sent`, `partially_sent`, `delivery_failed`) or failed session can be reprocessed.\n- Re-running a failed report helps only when its `error.retriable` is true; otherwise change the input first.\n- A report is metered once; reprocessing an already metered session does not meter it again.\n- A session can be reprocessed at most 3 times.","tags":["LabReports"],"operationId":"Reports_Reprocess","parameters":[{"$ref":"#/components/parameters/LabReportsApiVersion"},{"name":"session_id","in":"path","required":true,"description":"The session's snowflake ID.","schema":{"type":"string"}},{"name":"legacy_format","in":"query","required":false,"description":"Whether to deliver the re-run in the legacy Lab Reports webhook shape. Only needed for a session uploaded through the legacy Lab Reports API before Terra recorded each upload's shape with its session; otherwise the recorded shape is used.","schema":{"type":"boolean"}}],"responses":{"202":{"description":"Reprocessing accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportReprocessResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ReportNotReprocessable"},"503":{"$ref":"#/components/responses/AuthorizationUnavailable"}}}}}}
```
