Overview
The Edit Order API lets you change an order. The API has two separate URLs with an identical structure. The quote URL returns the updated order content and prices without changing the order. To apply the changes, call the editing URL with the same request.This API does not apply to Shopify.
Prerequisites
- The order must be in the “Received by Global-e” status. Orders can be edited only when they are in this status.
How order editing works
The following assumptions apply:- Editing an order to a lower value is possible if the payment has not been captured yet.
- Editing an order to a higher value is allowed only if the merchant is willing to subsidize the
difference between the original and the adjusted order value. The end customer is not charged for
any additional cost. Set
SubsidizeHigherValueto1on the edit request to subsidize the difference; if the new value is higher andSubsidizeHigherValueis0, null, or empty, the editing request fails. - The edit request must contain new items — new additional products or exchanging current ones. The API cannot be used to only remove items from an order.
Edit order — full request & response
Parameters, the
OrderChangeRequest schema, the Merchant.Order response, examples, and the
interactive playground for POST /api/orders/changes.Quote order changes
Preview the updated order content and prices without applying the change —
POST /api/orders/changes/quote.Use Cases
Exchange a product in an order
Remove a line item and add its replacement in a single request. Reference the removed item’sCartItemId from the new product’s ReplacementOfCartItemId. First call the quote endpoint to
preview the updated order and prices:
Merchant.Order object with the updated content and prices:
POST /api/orders/changes).
