Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.

Path Parameters

orderId
string<uuid>
required

OmniCommerce order UUID returned from create or list.

Body

application/json

At least one of externalOrderId, externalOrderNumber, status, currency, country, totalAmount, shippingFee, discountAmount, metadata, orderCreatedAt, or items is required.

organizationId
string

Optional for OAuth clients bound to one organization; required when the caller can access multiple organizations.

Maximum string length: 120
externalOrderId
string

Replacement stable external order identifier. Must be unique among agentic orders in the organization.

Maximum string length: 160
externalOrderNumber
string

Replacement customer-facing external order number.

Maximum string length: 160
status
enum<string>

Canonical order status: pending, to_ship, shipped, completed, return, canceled.

Available options:
pending,
to_ship,
shipped,
completed,
return,
canceled
currency
string

ISO-4217 currency code for the order. When country is empty, unambiguous market currencies also derive country (see country field).

Required string length: 3
country
string

Marketplace country (code or name). Optional. When omitted and the order's stored country is empty, Omni derives from the resulting order currency when unambiguous (SGD→singapore, MYR→malaysia, PHP→philippines, HKD→hong kong, etc.). Explicit country always wins. USD is not used to derive country.

Maximum string length: 80
totalAmount
number

Order total. When omitted and line prices change, recomputed from line paid/unit prices × quantity.

Required range: x >= 0
shippingFee
number
Required range: x >= 0
discountAmount
number
Required range: x >= 0
metadata
object

Optional shallow merge into existing order metadata (does not replace the full object).

orderCreatedAt
string<date-time>

Replacement order created timestamp (ISO 8601 with timezone). Overwrites stored order_created_at used by listing and analytics date filters. Omitted value is left unchanged. Re-posting POST /api/v1/orders with the same externalOrderId does not overwrite an existing created date.

items
object[]

Line upserts. Match by externalOrderItemId or productId to update. To replace a line identifier, select with currentExternalOrderItemId and provide the new externalOrderItemId. To append a multi-SKU line, send a new externalOrderItemId with productName and quantity.

Required array length: 1 - 100 elements

Response

Order updated (or unchanged no-op).

The response is of type object.