terra-lab-reports
Terra Lab Reports Best Practices
Production guidelines and API reference for building with the Terra Lab Reports API (pre-release). It converts clinical lab report PDFs and images into structured, standardized biomarker data: OCR plus AI extraction, then fuzzy matching against a reference dataset of 4,000+ biomarkers that yields canonical biomarker keys, UCUM unit codes, and LOINC codes.
From the terminal
Account configuration lives in the Terra dashboard, which an agent cannot click. The terra CLI does the same from a terminal, and every Lab Reports endpoint is reachable by hand, which is the fastest way to answer "where did that report go":
terra data-api /lab-reports -q reference_id=<ref>
terra data-api /lab-reports/<session_id> # status and parsed results
terra data-api /lab-reports/<session_id>/deliveries # per destination: status, attempts, last error
terra data-api /lab-reports/<session_id>/files # the input files behind the session
deliveries is the one to reach for first when a report parsed but never arrived: it separates "we never delivered it" from "we delivered it and your endpoint rejected it", which are different bugs. An upload can fan out to several sessions, so learn the session ids from the webhook events or from /lab-reports?upload_id=... rather than assuming one upload is one session.
Read what an endpoint takes with terra api list --data-api /lab-reports --format json.