Skip to main content
PUT
Cancel an order

Authorizations

Authorization
string
header
required

Origin One API token. Pass it in the Authorization header: Authorization: Bearer <token>.

Path Parameters

id
string
required

Unique identifier of the resource.

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

Body

application/json
cancelledBy
object

Who is cancelling, for the audit trail.

Response

Success.

id
string
required

Unique identifier of the order.

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

object
enum<string>
required

Object type; always order.

Available options:
order
Example:

"order"

code
string
required

Human-readable order code.

Example:

"CPmJ6QbYMo"

agency
object | null
required

Regulatory agency the order was placed under; null for a non-regulated order.

clinic
object | null
required

Collection site; null until one is assigned.

company
object | null
required

Company the order was placed for.

createdAt
string<date-time>
required

When the order was created.

Example:

"2026-09-24T09:00:00.000Z"

expiresAt
string<date-time> | null
required

When the order expires; null when it does not.

Example:

"2026-09-24T15:15:00.000Z"

isFinal
boolean
required

Whether the order has reached an outcome. Cancelled, expired and no-show orders report false; check status for those.

Example:

false

jobCategory
object | null
required

DOT job category of the participant; null when the order has none.

location
object | null
required

Location the order was placed at.

otherTestReason
string | null
required

Detail for a testReason of other; null when none was given.

Example:

"courtOrdered"

packages
object[]
required

Packages the order was created from.

participant
object
required

The person being tested.

services
object[]
required

Services on the order, in creation order.

status
required

Current order status; new values may appear.

Available options:
adulterated,
cancelled,
complete,
expired,
fail,
fitForDuty,
incomplete,
integrationError,
negative,
lostInTransit,
nonNegative,
noShow,
notFitForDuty,
ordered,
pass,
pending,
positive,
released,
scheduled,
substituted,
testCancelled,
testNotPerformed,
unobtainable
Example:

"pending"

statusUpdatedAt
string<date-time>
required

When the order status last changed; the creation time until the first change.

Example:

"2026-09-24T15:15:00.000Z"

testReason
required

Reason for the test.

Available options:
blindSample,
fitnessForDuty,
followUp,
jobTransfer,
notIndicated,
other,
periodic,
periodicMedical,
postAccident,
preEmployment,
preSiteAccess,
probation,
promotion,
random,
reasonableSuspicion,
returnToDuty,
splitSpecimen,
sweep,
unauthorizedTest,
unknown,
injury
Example:

"preEmployment"

updatedAt
string<date-time>
required

When the order was last updated.

Example:

"2026-09-24T15:20:00.000Z"

url
string<uri-reference>
required

Canonical path of this resource, relative to the API origin.

Example:

"/api/v2/orders/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

matched
object

Present on a create response when an equivalent existing order was returned instead.