Skip to main content
PATCH
Update an order
Editing orders explains how the merge patch applies, the settings every request needs, and what to do when a request fails partway.

Authorizations

Authorization
string
header
required

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

Headers

If-Match
string

The ETag of the version this change is based on, from GET /orders/{id}. It is checked before anything is saved: when the order has changed since, the response is 409.

Path Parameters

id
string
required

Unique identifier of the resource.

Example:

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

Body

settings
object
required

Why the order is changing and what to send afterwards. Not part of the order; never returned.

agency
object | null

Regulatory agency, one of GET /agencies; null removes it. Required while the order has a DOT service, and not allowed otherwise.

clinic
object

Collection site to move the order to, such as one from GET /orders/{id}/clinics; any clinic GET /clinics/{id} serves, offering every service on the order. Schedules an ordered order. Allowed until collection starts; for an expired or noShow order, only when its lab is Quest, LabCorp, CRL or Origin.

expiresAt
string<date-time>

When the order expires (ISO 8601 date-time with offset), at least one hour from now. An expired or no-show order becomes active again.

Example:

"2026-10-30T17:00:00Z"

jobCategory
object

DOT job category of the participant, one of those the order’s agency publishes (see GET /agencies). Required when agency changes to one that publishes more than one job category on an order with a DOT service; a sole category is assigned automatically.

location
object

Location to move the order to; must be under a company linked to the API token, and offer the order’s package.

otherTestReason
string | null

Detail for a testReason of other, up to 30 characters; null clears it. Cleared automatically when testReason changes to another value.

Required string length: 1 - 30
Example:

"Court order"

packages
object[]

The package to order instead, as a one-item list. Must be available at the location; allowed only until collection starts.

Required array length: 1 element
participant
object

Changes to the person being tested; only the members given change.

testReason
enum<string>

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"

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.

clinicSelectionUrl
string<uri> | null
required

Web page where someone picks the collection site, without signing in; null unless the order is ordered with no clinic and isn’t a link order. Anyone with it can see the participant’s address and choose the site.

Example:

"https://acme.originone.ai/collection-site/CPmJ6QbYMo"

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.

schedulingUrl
string<uri> | null
required

Web page where the participant completes a link order, the one the link they receive opens; null unless a link order is ordered.

Example:

"https://acme.originone.ai/schedule/CPmJ6QbYMo"

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.