Order Edits API Routes
An order edit is a change to an order's details, such as items, shipping methods, and more.
Changes made by an order edit are only applied on the order once they're confirmed.
The order's previous version is retained due to versioning.
These API routes allow admin users to make edits to an order and manage those edits.
POST /admin/order-edits#
Create Order Edit
Create an order edit.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Request body (application/json)
order_idstringdescriptionstringOptionalinternal_notestringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_changeobjectThe order change's details.
order_changeobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/order-edits/{id}#
Cancel Order Edit
Cancel a requested order edit.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "order-edit"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
order-edit.canceled: Emitted when an order edit request is canceled.
POST /admin/order-edits/{id}/confirm#
Confirm Order Edit
Confirm an order edit request and apply the changes on the order.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
order-edit.confirmed: Emitted when an order edit request is confirmed.reservation-item.created: Emitted when reservations are created.reservation-item.deleted: Emitted when reservations are deleted.
POST /admin/order-edits/{id}/items#
Add Items to Order Edit
Add new items to an order edit. These items will have the action ITEM_ADD.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
itemsobject[]OptionalThe details of items to be edited.
itemsobject[]OptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/order-edits/{id}/items/item/{item_id}#
Update Order Item Quantity of Order Edit
Update an existing order item's quantity of an order edit.
You can also use this API route to remove an item from an order by setting its quantity to 0.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringitem_idstringRequest body (application/json)
quantitynumberinternal_notestringOptionalunit_pricenumberOptionalcompare_at_unit_pricenumberOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/order-edits/{id}/items/{action_id}#
Update an Item in an Order Edit
Update an added item in the order edit by the ID of the item's ITEM_ADD action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringITEM_ADD action.Request body (application/json)
quantitynumberOptionalinternal_notestringOptionalunit_pricenumberOptionalcompare_at_unit_pricenumberOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/order-edits/{id}/items/{action_id}#
Remove Item from Order Edit
Remove an added item in the order edit by the ID of the item's ITEM_ADD action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringITEM_ADD action.Request examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/order-edits/{id}/request#
Request Order Edit
Change the status of an active order edit to requested.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
no_notificationbooleanOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
order-edit.requested: Emitted when an order edit is requested.
POST /admin/order-edits/{id}/shipping-method#
Add Shipping Method to Order Edit
Add a shipping method to an exchange. The shipping method will have a SHIPPING_ADD action.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
shipping_option_idstringcustom_amountnumberOptionaldescriptionstringOptionalinternal_notestringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/order-edits/{id}/shipping-method/{action_id}#
Update Shipping Method of an Order Edit
Update a shipping method in the order edit by the ID of the method's SHIPPING_ADD action.
Every shipping method has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringSHIPPING_ADD action.Request body (application/json)
custom_amountnumberOptionalinternal_notestringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/order-edits/{id}/shipping-method/{action_id}#
Remove Shipping Method from Order Edit
Remove a shipping method in the order edit by the ID of the method's SHIPPING_ADD action.
Every shipping method has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringSHIPPING_ADD action.Request examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobject400, 401, 404, 409, 422, 500: an error response is returned.