Skip to main content
POST
Dry-run an edit and return the would-be order shape

Authorizations

Authorization
string
header
required

Bearer token authentication. Accepts company tokens, partner tokens, public tokens, droplet installation tokens, and user_company tokens. The authenticated credential determines editor_type and editor_id on the resulting order-edit audit records — the payload never carries either field.

Path Parameters

order_id
integer
required

Primary-key id of the order to edit. Must belong to the authenticated company; an unknown id or an order owned by another company returns 404.

Body

application/json
operations
object[]
required

One or more edit operations to apply atomically. The whole transaction commits or rolls back together.

Minimum array length: 1
expected_updated_at
string<date-time>

Optional optimistic-concurrency guard. When provided, the server compares against the order's current updated_at before applying any operations and returns HTTP 409 with the current value on mismatch. Pass the ISO-8601 string received in a prior order response verbatim. Callers that don't load the order first can omit this and bypass the check.

Response

Dry run succeeded. Returns the order with post-edit current_* totals. The response carries dry_run: true at the envelope level to make the no-persistence semantics explicit on the wire.

Dry-run response for POST /api/v202604/orders/{order_id}/edits/preview. Same shape as OrderResponse with an additional dry_run: true flag on the envelope so consumers can statically confirm the no-persistence semantics. The order object's current_* totals reflect the hypothetical post-operation state.

order
object
required

The would-be order state, with current_* totals reflecting the hypothetical post-operation result. Not persisted.

dry_run
boolean
required

Always true on preview responses. Distinguishes the preview payload from a committed edit response wire-side.

status
integer
required

HTTP status code, repeated in the body (200 on a successful dry run).

meta
object
required

Response metadata (request_id and timestamp).