curl -X POST https://api.vibrant-america.com/v1/orders \
-H "Authorization: Bearer $PROVIDER_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"placerId": "VENDOR-ORDER-12345",
"emrName": "ACME-EHR",
"patientId": 123456,
"orderingProviderId": "1234567890",
"chargeIndicator": "C",
"testCodes": [
"GUT_ZOOMER",
"VITD_25OH"
]
}'{
"status": "placed",
"orderId": "d53f297b-9e2e-45f5-8f00-1b42df2dbde6",
"sampleId": 2553966,
"accessionId": 2607216002,
"orderingProviderId": "1234567890"
}Order
Submits 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 lab prices the order (BestDeal), applies New York routing, runs the eligibility check, and — only when eligible — places it. You do NOT send demographics, prices, kit settings, or internal ids; customerId/clinic_id come from your token.
placerId is optional: omit it and every request creates a new order; send one and it becomes your idempotency key — resending the same value returns the original result and never charges twice.
All requested codes are ordered or none is: if any code cannot be fulfilled the whole order is rejected with no_orderable_items, naming it in errorCodes.
WIP — coming soon: chargeIndicator: "T" adds third-party platform payment. Send platformId and X-Payment-Authorization: Bearer <platform-signed JWT> in addition to the provider access token. The platform JWT uses RS256, a short expiration, and a new single-use jti per request. No platform token exchange is involved. Missing or invalid payment authorization, no stored card, or a failed charge prevents the order from being placed. Confirm environment availability with Vibrant before testing. See Third-party payment.
curl -X POST https://api.vibrant-america.com/v1/orders \
-H "Authorization: Bearer $PROVIDER_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"placerId": "VENDOR-ORDER-12345",
"emrName": "ACME-EHR",
"patientId": 123456,
"orderingProviderId": "1234567890",
"chargeIndicator": "C",
"testCodes": [
"GUT_ZOOMER",
"VITD_25OH"
]
}'{
"status": "placed",
"orderId": "d53f297b-9e2e-45f5-8f00-1b42df2dbde6",
"sampleId": 2553966,
"accessionId": 2607216002,
"orderingProviderId": "1234567890"
}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
chargeIndicator: "T" lets a third-party platform pay with its stored
card. The contract may change; confirm environment availability with Vibrant before testing.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 anycode 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
orderingProviderId | Result |
|---|---|
| Omitted (or empty) | Your account’s default ordering provider is used |
| Sent | Overrides the default — must belong to your account, otherwise 422 provider_scope_mismatch |
| Omitted, no default configured | Rejected |
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
Headers
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
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.
"VENDOR-ORDER-12345"
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.
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.
C, P, I, O, 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.
1"<your-platform-id>"
Response
Order placed, or a duplicate of a prior placerId.
Order placed, or a duplicate.