amendments

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).

post/orders/{orderId}/amendments

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/orders/{orderId}/amendments
  • Auth: HTTP bearer

Path parameters

orderIdstring required

Display id of the order (for example ord_5rLZXDFSHNw). Line and attribute ids in amendment bodies are UUIDs from the options response.

Request body

orderVersioninteger required

Must match orderVersion from the options response. Returns 409 if the order has been amended since.

defaultTreatment'none' | 'prorate' | 'signalsFromAmendment' | 'allSignalsInPeriod'

Recurring charges pick next-cycle vs settle-now. Usage price changes pick new usage only vs the whole current period.

planHashstring

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

orderIdstring required

Display id of the order.

amendmentIdstring required

UUID of the recorded amendment.

versionnumber double required

Order version after the amendment.

effectiveDatestring required

When the amendment took effect.

endedLineIdsstring[] nullable required

UUIDs of order lines the amendment ended.

createdLineIdsstring[] nullable required

UUIDs of order lines the amendment created.

Changes

No recorded changes to this operation across all 1 revision of this API.