Recerc

Update order

Applies an order mutation and returns the resulting revision payload.

PATCH/api/unstable/orders/{id}

Applies an order mutation and returns the resulting revision payload.

Request Body

application/json

id*string

Order identifier to update.

Example"ord_123"
customerId?|
customerMembershipId?|
items?array<|||||>

Complete replacement list of order items.

Example[ { "id": "item_123", "type": "custom", "name": "Installation service", "quantity": 1, "price": 35000, "taxes": [], "baseUnit": { "type": "base", "code": "service", "name": "Service", "dimension": "count", "step": 1 } } ]
newItems?array<|||||>

New items to append to the order.

Example[ { "id": "item_456", "type": "adjustment", "name": "Discount", "amount": -10, "kind": "percentage", "taxes": [] } ]
removedItems?array<>

Order item ids to remove from the order.

Example[ "item_456" ]
updatedItems?array<>

Partial item updates to apply to existing order items.

Example[ { "id": "item_123", "quantity": 3, "price": 13990 } ]
status?string

Replacement lifecycle status for the order.

Value in"draft" | "in review" | "ready" | "accepted" | "cancelled"
Example"ready"
customFields?

Replacement custom field values for the order.

Example{ "requested_delivery_date": "2026-03-22" }
currency?string

Replacement order currency code.

Length1 <= length
Example"USD"
invoiceFooterText?string

Replacement footer text shown in invoice-style documents.

Example"Thank you for your business."
invoicePaymentTerms?string

Replacement payment terms shown in invoice-style documents.

Example"Net 30"
data?

Additional order metadata updates.

Example{ "quoteVisibility": "private" }
ownerId?|
priceListId?string

Replacement selected price list identifier for the order.

Example"pl_wholesale"
actions?

Derived actions to execute as part of the update.

Example{ "changeCurrency": { "currentCurrency": "CLP", "targetCurrency": "USD" } }
requirementUpdates?array<>

Requirement status changes to apply.

Example[ { "id": "req_123", "status": "approved", "reason": "Customer sent the signed PO." } ]
reorderedItems?array<>

Parent reassignment instructions for reordered items.

Example[ { "id": "item_123", "parentId": "item_section_1" } ]
sessionId*string

Client session identifier used to correlate collaborative updates.

Example"sess_abc123"
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json