Orders and services
An order contains one or more services — the individual tests in the ordered package (for example a urine panel and a physical). Each service progresses through its own status independently, and the order’s overallstatus is derived from them. Both levels carry an isFinal boolean:
Order statuses
An order is in progress while its status is one of:
Every other order status is final (
isFinal: true). Final statuses fall into a few groups:
Service statuses
Service statuses follow afamily_detail naming convention: the segment before the underscore is the status family, and the optional segment after it is vendor- or workflow-specific detail. For example, pending_atTheLab, pending_inMROReview, and pending_awaitingSignOff are all refinements of pending, while complete_verified and complete_noHits are refinements of complete.
A service is in progress while its status family is ordered, scheduled, pending, or processing. All other families — complete, incomplete, negative, positive, nonNegative, adulterated, cancelled, expired, noShow, and the rest — are terminal.
When branching on service statuses:
- Match on the family prefix (the part before
_) for routing logic, and treat the detail suffix as informational. New detail suffixes appear as vendor workflows evolve; aswitchon exact values will eventually miss one. - Use
isFinalto decide whether more updates are coming for that service. - The full list of current values is on the Get an order page under
services[].status.
Tracking changes
Each service carries:
Because webhook deliveries can arrive out of order, compare
statusUpdatedAt against the last value you processed and ignore anything older. statusHistory gives you the full audit trail if you need to reconstruct the sequence.
When is an order done?
Wait for the order-levelisFinal: true rather than tracking individual services: the order flips to final only once every service has reached a terminal status. If you need results per service as they land (for example, showing the physical while toxicology is still at the lab), react to each service’s isFinal instead.