Download OpenAPI specification:Download
Server-to-server API for B2B lab-ordering partners. Lets a partner browse the JustLabs catalog, find Quest Diagnostics draw sites, place lab orders for their end users, poll order status, and retrieve requisitions and results — all charged to the partner's own Stripe payment method (never the individual patient's).
All requests are JSON (Content-Type: application/json) and authenticate
with a bearer API key (Authorization: Bearer jl_live_... in production,
jl_test_... on the sandbox). Money is always integer cents. Dates are
ISO-8601. Every error response has the shape documented under Error
below.
See https://docs.justlabs.health for the full integration guide, including webhook signature verification and retry semantics.
Returns every orderable test and panel, the partner's own per-order
fees (lab collection + physician order), and the list of US states
JustLabs cannot currently serve. Response is cacheable for a few
minutes (Cache-Control: private, max-age=300).
Panels do not carry a biomarkers field — only their member
tests ids. Look up each test id in tests[] for its biomarkers.
{- "fees": {
- "labCollectionCents": 0,
- "physicianOrderCents": 0
}, - "restrictedStates": [
- "string"
], - "tests": [
- {
- "id": "string",
- "type": "test",
- "name": "string",
- "priceCents": 0,
- "category": "string",
- "biomarkers": [
- "string"
], - "fastingRequired": true,
- "sampleTypes": [
- "string"
], - "turnaroundDays": "string",
- "minorEligible": true
}
], - "panels": [
- {
- "id": "string",
- "type": "panel",
- "name": "string",
- "priceCents": 0,
- "category": "string",
- "tests": [
- "string"
], - "fastingRequired": true,
- "minorEligible": true
}
]
}Search by ZIP (?zip=) or by coordinates (?lat=&lng=&radiusMiles=).
Exactly one search mode is used per request — if zip is present it
takes precedence; otherwise lat/lng are required.
| zip | string^\d{5}(-?\d{4})?$ 5 or 9 digit US ZIP code. Mutually exclusive with lat/lng search. |
| lat | number Latitude. Required (with |
| lng | number Longitude. Required (with |
| radiusMiles | number <= 250 Default: 50 Search radius in miles for the lat/lng mode. Capped at 250. |
| limit | integer [ 1 .. 200 ] Default: 50 Max results, 1-200. |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip": "string",
- "phone": "string",
- "lat": 0,
- "lng": 0,
- "distanceMiles": 0
}
]
}Charges the partner's Stripe payment method for the order total (sum of item prices + the partner's per-order fees) and, on success, schedules the order for automated placement at Quest.
Idempotency-Key is required (1–100 characters,
[A-Za-z0-9_.-]). Retry behavior depends on the response — see
"Idempotency & retries" below and https://docs.justlabs.health.
| Idempotency-Key required | string [ 1 .. 100 ] characters Required, 1–100 chars, Keys are held for 24 hours from first use ( |
| externalId | string or null [ 1 .. 100 ] characters Your own id for this order. Non-empty when present. Returned back on the order and filterable via |
required | object (PatientInput) |
required | Array of objects [ 1 .. 25 ] items Duplicate ids are de-duplicated server-side before pricing — sending the same id twice does not double the charge or the order line. |
object (GuardianInput) Required when the patient is under 18 at time of purchase. | |
| preferredLocationId | string or null A Quest location id from GET /locations. Optional. |
object or null <= 20 properties Up to 20 string key/value pairs (keys ≤40 chars, values ≤200 chars). Echoed back on the order, never used by JustLabs. |
{- "externalId": "string",
- "patient": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string",
- "sex": "male",
- "email": "user@example.com",
- "phone": "string",
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "zip": "string"
}
}, - "items": [
- {
- "id": "string"
}
], - "guardian": {
- "firstName": "string",
- "lastName": "string",
- "email": "user@example.com",
- "relationship": "parent"
}, - "preferredLocationId": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}{- "id": "string",
- "externalId": "string",
- "status": "processing",
- "createdAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "id": "string",
- "type": "test",
- "name": "string",
- "priceCents": 0
}
], - "fees": {
- "labCollectionCents": 0,
- "physicianOrderCents": 0
}, - "subtotalCents": 0,
- "totalCents": 0,
- "payment": {
- "stripePaymentIntentId": "string",
- "receiptUrl": "string"
}, - "patient": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string",
- "sex": "male"
}, - "fastingRequired": true,
- "preferredLocation": {
- "id": "string",
- "name": "string",
- "address": "string"
}, - "requisition": {
- "available": true
}, - "results": {
- "available": true,
- "reportedAt": "2019-08-24T14:15:22Z"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z"
}Partner-scoped, newest first. Supports cursor pagination.
| status | string (PublicOrderStatus) Enum: "processing" "requisition_ready" "results_ready" "cancelled" Filter to one public status. |
| externalId | string Filter to orders created with this |
| limit | integer [ 1 .. 100 ] Default: 50 Page size, 1-100. |
| cursor | string Opaque pagination cursor from a previous response's |
{- "data": [
- {
- "id": "string",
- "externalId": "string",
- "status": "processing",
- "createdAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "id": "string",
- "type": "test",
- "name": "string",
- "priceCents": 0
}
], - "fees": {
- "labCollectionCents": 0,
- "physicianOrderCents": 0
}, - "subtotalCents": 0,
- "totalCents": 0,
- "payment": {
- "stripePaymentIntentId": "string",
- "receiptUrl": "string"
}, - "patient": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string",
- "sex": "male"
}, - "fastingRequired": true,
- "preferredLocation": {
- "id": "string",
- "name": "string",
- "address": "string"
}, - "requisition": {
- "available": true
}, - "results": {
- "available": true,
- "reportedAt": "2019-08-24T14:15:22Z"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z"
}
], - "nextCursor": "string"
}| id required | string The JustLabs order id, e.g. |
{- "id": "string",
- "externalId": "string",
- "status": "processing",
- "createdAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "id": "string",
- "type": "test",
- "name": "string",
- "priceCents": 0
}
], - "fees": {
- "labCollectionCents": 0,
- "physicianOrderCents": 0
}, - "subtotalCents": 0,
- "totalCents": 0,
- "payment": {
- "stripePaymentIntentId": "string",
- "receiptUrl": "string"
}, - "patient": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string",
- "sex": "male"
}, - "fastingRequired": true,
- "preferredLocation": {
- "id": "string",
- "name": "string",
- "address": "string"
}, - "requisition": {
- "available": true
}, - "results": {
- "available": true,
- "reportedAt": "2019-08-24T14:15:22Z"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z"
}Cancellable only while the order has provably never reached Quest — in practice, within about 60 minutes of creation and before a requisition has been issued. Refunds the partner's Stripe charge in the same request when possible. Takes no request body.
| id required | string The JustLabs order id, e.g. |
{- "id": "string",
- "externalId": "string",
- "status": "processing",
- "createdAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "id": "string",
- "type": "test",
- "name": "string",
- "priceCents": 0
}
], - "fees": {
- "labCollectionCents": 0,
- "physicianOrderCents": 0
}, - "subtotalCents": 0,
- "totalCents": 0,
- "payment": {
- "stripePaymentIntentId": "string",
- "receiptUrl": "string"
}, - "patient": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string",
- "sex": "male"
}, - "fastingRequired": true,
- "preferredLocation": {
- "id": "string",
- "name": "string",
- "address": "string"
}, - "requisition": {
- "available": true
}, - "results": {
- "available": true,
- "reportedAt": "2019-08-24T14:15:22Z"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z",
- "refund": "issued"
}Available once the order's status is requisition_ready. The signed URL expires in 15 minutes — fetch a fresh one if it lapses.
| id required | string The JustLabs order id, e.g. |
{- "expiresAt": "2019-08-24T14:15:22Z"
}Available once the order's status is results_ready.
| id required | string The JustLabs order id, e.g. |
{- "status": "processing",
- "reportedAt": "2019-08-24T14:15:22Z",
- "source": "quest",
- "pdfs": [
], - "analytes": [
- {
- "name": "string",
- "labTestCode": "string",
- "value": 0,
- "unit": "string",
- "referenceRange": "string",
- "referenceRangeLow": 0,
- "referenceRangeHigh": 0,
- "flag": "critical_low",
- "notReported": true,
- "reportedAt": "2019-08-24T14:15:22Z"
}
]
}Delivered by JustLabs to the partner's configured webhook URL, signed
with X-JustLabs-Signature (see the Webhooks page at https://docs.justlabs.health for
verification). At-least-once delivery — dedupe on
X-JustLabs-Delivery, not on payload content. No ordering guarantee
even for deliveries on the same order (an inline first attempt and a
5-minute-granularity cron retry can race); treat data.status as a
hint and re-fetch GET /orders/{id} if you need the authoritative
current state.
Your endpoint must respond 2xx directly. A 3xx redirect is
treated as a failed delivery attempt, not followed — JustLabs never
re-POSTs a signed webhook body to a different origin. Non-2xx
(including 3xx) and timeouts are retried per the backoff schedule in
the guide.
| id required | string Delivery id. Same value as the |
| type required | string Enum: "order.requisition_ready" "order.results_ready" "order.cancelled" |
| createdAt required | string <date-time> |
required | object |
{- "id": "string",
- "type": "order.requisition_ready",
- "createdAt": "2019-08-24T14:15:22Z",
- "data": {
- "orderId": "string",
- "externalId": "string",
- "status": "processing"
}
}Delivered by JustLabs to the partner's configured webhook URL, signed
with X-JustLabs-Signature (see the Webhooks page at https://docs.justlabs.health for
verification). At-least-once delivery — dedupe on
X-JustLabs-Delivery, not on payload content. No ordering guarantee
even for deliveries on the same order (an inline first attempt and a
5-minute-granularity cron retry can race); treat data.status as a
hint and re-fetch GET /orders/{id} if you need the authoritative
current state.
Your endpoint must respond 2xx directly. A 3xx redirect is
treated as a failed delivery attempt, not followed — JustLabs never
re-POSTs a signed webhook body to a different origin. Non-2xx
(including 3xx) and timeouts are retried per the backoff schedule in
the guide.
| id required | string Delivery id. Same value as the |
| type required | string Enum: "order.requisition_ready" "order.results_ready" "order.cancelled" |
| createdAt required | string <date-time> |
required | object |
{- "id": "string",
- "type": "order.requisition_ready",
- "createdAt": "2019-08-24T14:15:22Z",
- "data": {
- "orderId": "string",
- "externalId": "string",
- "status": "processing"
}
}Delivered by JustLabs to the partner's configured webhook URL, signed
with X-JustLabs-Signature (see the Webhooks page at https://docs.justlabs.health for
verification). At-least-once delivery — dedupe on
X-JustLabs-Delivery, not on payload content. No ordering guarantee
even for deliveries on the same order (an inline first attempt and a
5-minute-granularity cron retry can race); treat data.status as a
hint and re-fetch GET /orders/{id} if you need the authoritative
current state.
Your endpoint must respond 2xx directly. A 3xx redirect is
treated as a failed delivery attempt, not followed — JustLabs never
re-POSTs a signed webhook body to a different origin. Non-2xx
(including 3xx) and timeouts are retried per the backoff schedule in
the guide.
| id required | string Delivery id. Same value as the |
| type required | string Enum: "order.requisition_ready" "order.results_ready" "order.cancelled" |
| createdAt required | string <date-time> |
required | object |
{- "id": "string",
- "type": "order.requisition_ready",
- "createdAt": "2019-08-24T14:15:22Z",
- "data": {
- "orderId": "string",
- "externalId": "string",
- "status": "processing"
}
}