Amend an order
Executes amendment intents against an order. One-shot by default; pass the previewed planHash to require the recomputed plan to match (409 PLAN_CONFLICT on drift).
Authentication
AuthorizationBearer
API Key authentication using Bearer token
Path parameters
orderId
Display id of the order (for example ord_5rLZXDFSHNw). Line and attribute ids in amendment bodies are UUIDs from the options response.
Request
Body
orderVersion
Must match orderVersion from the options response. Returns 409 if the order has been amended since.
intents
At least one intent, discriminated by type.
defaultTreatment
Recurring charges pick next-cycle vs settle-now. Usage price changes pick new usage only vs the whole current period.
planHash
From preview. When set, execute recomputes the plan and returns 409 PLAN_CONFLICT if billing state has drifted. Omit only for one-shot execute.
Response
200
orderId
Display id of the order.
amendmentId
UUID of the recorded amendment.
version
Order version after the amendment.
effectiveDate
When the amendment took effect.
endedLineIds
UUIDs of order lines the amendment ended.
createdLineIds
UUIDs of order lines the amendment created.
plan
The compiled plan that was executed. JSON null when no plan was computed.
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error