API referenceReturns
Update a return
PATCH
Move a return on: open (approve a request, or open a closed one again), declined, in_transit with tracking, received (restock puts the units back, each unit once) or closed. Needs a key that can edit. Send an Idempotency-Key to make a retry safe: a repeat within 24 hours gets the first answer back instead of running again.
storeKeyheader
AuthorizationBearer <vtk_...>A store API and MCP key
storeId*stringThe store id
returnId*stringThe return id
Idempotency-Key?stringMakes a retry safe: the first call with this key runs, and a repeat within 24 hours (same path and body) gets the same answer back without running again. Per store. A call that failed keeps nothing, so its repeat runs again. The same key with another path or body is refused with 422.
Match
^[!-~]+$Length
1 <= length <= 255application/json- body
status*stringValue in
"open""declined""in_transit""received""closed"tracking?stringrestock?booleanWith received: put the units back in stock
OK
application/json- response
data*curl -X PATCH 'https://starsell.app/api/v1/stores/string/returns/string' \ -H 'Content-Type: application/json' \ -d '{ "status": "open"}'Example Response
{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe", "number": 0, "label": "string", "status": "requested", "lines": [ { "order_item_id": "c3e40b5c-b9ae-413a-b96e-5aa0514f5ae6", "quantity": 0, "reason": "size", "note": "string", "restocked": 0 } ], "exchange_lines": [ { "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1", "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6", "title": "string", "variant_name": "string", "quantity": 0, "price_minor": 0 } ], "customer_note": "string", "tracking": "string", "refund_id": "63c72644-8ac7-4527-8b49-bb7e9f190cb0", "exchange_order_id": "fada7d0f-ca50-498f-8ea8-24ba1cc005e1", "closed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }}