Swap at door
POST
/ admin/ v1/ stores/ {store_id}/ returns/ {return_id}/ swap- orders:write
- Idempotency-Key supported
Swaps at the door: books the replacement order's delivery with a carrier that collects the return's items in the same trip, and approves the return with that shipment.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.return_idstringrequiredThe return's ID, like
rtn_01k8qs5s….
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
order_idstringrequiredThe order with the replacement items, the same customer's and not yet shipped.
carrier_account_idstringrequiredAn account whose carrier swaps items at the door (
capabilities.exchanges).weight_gramsinteger · or nullDefaults to the products' weights.
parcelsinteger · or nullDefaults to 1.
Returns
200 Approved, with the exchange shipment.
Errors
- 409Not open, a label already booked, another customer's order, or the carrier refused.
- 422
validation_failedThe same order, or a carrier that doesn't swap items (exchange_unsupported).