Skip to main content
POST
Cancel an order
Cancels an order you placed. Identify it by the placerId you placed it with, or the sampleId from the place response — exactly one of the two (the orderId is not accepted).

The policy

Once the lab has the sample the result is already in production; cancellation is rejected with 422 / not_cancellable.

What comes back

201 with the cancellation result. refundAmount is what this cancellation actually refunded — 0 when nothing had been charged yet (e.g. a patient-pays-later order that was never paid).

Cancelling twice, and other rejections

Cancellation is not an idempotent echo: an already-cancelled order returns 422 with reason: "not_cancellable" and message: "Order already canceled". When retrying after a network timeout, treat that response as “already done”. An unknown placerId/sampleId returns 422 with reason: "order_not_found".

Orders placed in the Portal

WIP — coming soon. This rejection is not returned yet, and its shape may change.
Cancellation through the API covers only orders placed through the API. An order placed in the Vibrant Portal, for example one you identify by its sampleId, will return 422 with reason: "not_placed_via_api":
422
An order outside your clinic is treated as not found (order_not_found), as it is today.
There is no fee-preview API yet — the fee/refund that applies is the one returned by the cancellation itself. (Get order status remains a proposed endpoint.)

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.

Body

application/json

Identify the order by exactly one of these.

placerId
string

The placerId the order was placed with.

Example:

"VENDOR-ORDER-12345"

sampleId
integer

The sampleId returned when the order was placed.

Example:

2575603

Response

Order cancelled.

status
enum<string>
Available options:
cancelled
sampleId
integer
Example:

2575603

refundAmount
number

Amount refunded by this cancellation — 0 when nothing had been charged yet.

Example:

0

currency
string
Example:

"usd"