Skip to content

Preview before changing

Because there is no sandbox, you check changes in advance with the preview endpoints. They write nothing. They show what the change would do right now.

Preview Purpose
POST /api/orders/preview Check a new order
POST /api/orders/{order_id}/cancel/preview Check whether and under which conditions a cancellation works
POST /api/orders/{order_id}/delivery-address/preview Check whether the delivery address can still be changed
POST /api/orders/{order_id}/items/preview Check a variant swap

All four need only merchant_order:read.

Every preview returns fingerprint and confirmed_summary. Two previews of an unchanged order have the same fingerprint. That tells you nothing changed between preview and change.

The REST API does not require a preview first. You can send any change directly.

  • If the request itself is faulty, the preview answers 422 with a code in extra.error, for example UNKNOWN_SKU or INVALID_DELIVERY_ADDRESS. The codes are listed in the reference under each operation.
  • That an order is no longer changeable or cancelable is not an error. It is part of the 200 result of the preview.