Update an order: absent fields keep their value; send `version` for optimistic concurrency

Only what differs is written (outcome unchanged when nothing does: nothing written, nothing emitted). items is the whole line set with totals (checked as on create: 422 totals_mismatch); a line with shipped units is never removed or taken below them (409). A line or hold change reconciles the order's fulfillment orders in place (amendment 22); fulfillment.skip leaves them. isCanceled: true runs the cancel rules (POST /:id/cancel) in the same unit. A stale version is 409 version_conflict.

Scope: orders:write, channel:write or admin. A permission group made before the Channel API scopes existed grants it as orders:manage.

Idempotency: send Idempotency-Key; a retry with the same key replays the first answer.

Rate limit: write class, 1,200 requests per minute per tenant by default (read class 6,000). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refusal is 429 rate_limited with Retry-After.

Path Params
string
required
length between 1 and 300

The uuid, a legacy 24-hex id, or ext:: (URL-encoded).

Body Params
string
length between 1 and 64

The version read; a stale one is 409 version_conflict.

length between 1 and 500
date-time

ISO-8601, UTC.

length between 1 and 100
customer
object
shipTo
object
billTo
object
items
array of objects
length ≤ 1000

The order's whole line set. An empty list removes every line (legacy OU:557-558 read [] as a change and OU:606-685 rebuilt the lines from it: none left, the order paused); a line with shipped units still cannot be removed (409).

items
refundItems
array of objects
length ≤ 1000

The order's whole refund line set (legacy refundItems): a line matches a stored refund line by externalLineId and price, else by product and price; the rest are added, the stored ones not sent removed (an empty list removes them all). Outside the totals, the stock and the fulfillment, so a canceled order takes them too.

refundItems
totals
object

Recomputed by the server: subtotal from the lines, total from subtotal + shipping + salesTax + dutyTax + vat - discount; every amount signed (a negative total is stored as sent). A mismatch is 422 totals_mismatch with the computed values. paid absent: the total on create (the channel collected it); the stored amount on an update.

discounts
array of objects
length ≤ 50
discounts
taxLines
array of objects
length ≤ 50
taxLines
tags
array of strings
length ≤ 50

The order's tag names (replaces the set).

tags
metadata
object

Keys 1 to 100 characters, values up to 1000.

length ≤ 10000
fulfillment
object
invoicing
object
Schema_aee7e11aee | null
boolean
boolean

true runs the cancel transition (POST /v1/orders/:id/cancel rules); false never reopens a canceled order.

integer
0 to 4
enum
Headers
string
length between 7 and 50

Any string of 7 to 50 characters that identifies this request (an order number, a webhook id). A retry with the same key and the same body answers the first result with Idempotent-Replayed: true; the same key with a different body is 422 idempotency_key_reused; a concurrent request with the same key is 409 in_progress with Retry-After. Recommended on every write.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json