amendments

Preview an order amendment

Compiles amendment intents into a plan (operations, money effects, credit effects, state diff) without executing. The returned planHash can be passed to the execute endpoint for two-phase, drift-guarded execution.

post/orders/{orderId}/amendments/preview

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/orders/{orderId}/amendments/preview
  • 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.

Response

200

planVersionnumber double required

Version of the plan format. Currently 1.

orderIdstring required
orderVersionnumber double required
effectiveDatestring required

When the amendment takes effect.

planHashstring required

Pass this to execute for two-phase drift protection.

Changes

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