Skip to main content
POST
Submit a lab order for an existing patient using the same product codes you quoted. You send patientId and testCodes — plus orderingProviderId unless your account’s default ordering provider should be used (the response echoes the provider applied); the lab prices the order (BestDeal), applies New York routing, runs the eligibility check, and places it — only when eligible.

Third-party payment

WIP — coming soon. chargeIndicator: "T" lets a third-party platform pay with its stored card. The contract may change; confirm environment availability with Vibrant before testing.
For T, send both platformId in the body and X-Payment-Authorization: Bearer <platform-signed JWT> in the headers. Keep the provider’s access token in Authorization. The platform JWT uses RS256 and must be newly signed for each request. A missing card or failed charge prevents the order from being placed. See Third-party payment for onboarding and a complete request. Existing C, P, I, and O flows are unchanged and do not require these additional credentials.

All codes are ordered, or none is

If any code cannot be fulfilled — an add-on sent without its host test, for example — the whole order is rejected with 422 no_orderable_items, naming it in errorCodes. An order never partially succeeds.

Which provider the order is attributed to

The response echoes the provider the order was actually placed under. placerId is your optional idempotency key: omit it and every request creates a new order; send one and resending the same value returns the original result and never charges twice. See Orders.

Authorizations

Authorization
string
header
required

OAuth2 client credentials. Generate a client ID and client secret in the Portal, exchange them for an access token, then send Authorization: Bearer <access_token>. Request the result and report scopes to read results.

Headers

X-Payment-Authorization
string

WIP — coming soon. Required only when chargeIndicator is T. Send Bearer <platform-signed JWT>: a fresh RS256 JWT signed with the private key registered for the body's platformId. Use matching iss and sub, the agreed API aud, an exp about 60 seconds ahead, and a unique single-use jti. Keep the provider access token in Authorization; this header is additional payment authorization, with no platform token exchange. See Third-party payment.

Body

application/json
patientId
integer
required

Vibrant patient id. Must already exist and belong to your token's clinic.

testCodes
string[]
required

Vibrant test / panel / bundle codes — the same codes you quoted.

Example:
placerId
string

Optional idempotency key — your own unique id for this order. Omit it and every request creates a new order. Send one and: a value you already used returns the original order's result (status: duplicate, never a second charge); an unused value places a new order.

Example:

"VENDOR-ORDER-12345"

orderingProviderId
string

Optional. The provider the order is attributed to.

  • Omitted (or empty/null) — your account's default ordering provider is used.
  • Sent — overrides the default. It must belong to your account, otherwise the order is rejected with provider_scope_mismatch.
  • Omitted with no default configured — the order is rejected.

The response echoes the provider the order was actually placed under.

chargeIndicator
enum<string>

C = customer pays; P/I/O or omitted = patient pays later. WIP — coming soon: T = third-party platform pays with its stored card; requires platformId and the X-Payment-Authorization header in addition to the provider access token. Confirm environment availability before using T. Existing billing flows are unchanged. Unsupported values return 400 INVALID_CHARGE_INDICATOR.

Available options:
C,
P,
I,
O,
T
platformId
string
required if chargeIndicator = T

WIP — coming soon. Required when chargeIndicator is T; used for third-party platform payment. The platform ID issued by Vibrant during onboarding, identifying the registered public key and the platform's single stored card. The JWT in X-Payment-Authorization must verify against that platform's key. An ID alone does not authorize a charge.

Minimum string length: 1
Example:

"<your-platform-id>"

emrName
string

Your EMR / partner name (for tracking).

specimenId
string

Reserved for future use — leave unset.

sampleCollectionTime
string

Reserved for future use — leave unset.

Response

Order placed, or a duplicate of a prior placerId.

Order placed, or a duplicate.

status
enum<string>
Available options:
placed,
duplicate
orderId
string

Placed order id (status = placed).

sampleId
integer

Resulting sample id.

accessionId
integer

Resulting accession id (status = placed) — use it to get the report.

orderingProviderId
string

Ordering provider the order was placed under — what you sent, or your account's default when you omitted it.

Example:

"1234567890"