Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Contact support
Withdraws an exchange before the goods come back.
JavaScript
import { createSellerClient } from '@spree/seller-sdk' const client = createSellerClient({ baseUrl: 'https://your-store.com', jwtToken: 'eyJhbGciOi...', sellerId: 'sel_UkLWZg9DAJ', }) const exchange = await client.orders.exchanges.cancel('or_UkLWZg9DAJ', 'exch_UkLWZg9DAJ', { reason: 'Customer kept the original', })
curl --request PATCH \ --url http://{defaultHost}/api/v3/seller/orders/{order_id}/exchanges/{id}/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Spree-Seller-Id: <x-spree-seller-id>' \ --data ' { "reason": "<string>" } '
{ "id": "exch_UkLWZg9DAJ", "number": "EX1001", "status": "canceled", "order_id": "or_UkLWZg9DAJ", "reason_id": null, "price_difference": "9.99", "approved_at": null, "received_at": null, "fulfilled_at": null, "canceled_at": "2026-01-15T12:00:00Z", "memo": "Customer kept the original", "stock_location_id": "sloc_UkLWZg9DAJ" }
JWT token for an authenticated seller session (seller_api audience)
seller_api
A note on why the exchange was canceled.
exchange canceled
The values listed are the built-in ones; extensions may add more.
requested
approved
received
fulfilled
canceled
Show child attributes
Was this page helpful?