Skip to content

Record refusal

POST/admin/v1/stores/{store_id}/orders/{order_id}/refused
  • Idempotency-Key supported

The customer refused the parcel at the door: its units come back into stock, the order is cancelled as refused, the uncollected cash is voided and the courier's return fee is kept. With returned, the customer kept the rest and paid for it: those units come back, the cash to collect drops by what they were worth, and the order stays open.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

  • order_idstringrequired

    The order's ID, like ord_01k8qs5s….

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • restockboolean

    Put the units back into stock: they came back with the parcel.

  • return_feeinteger · or null

    What the courier charged to bring it back, in the order's minor units.

  • returnedarray of objects

    A partial delivery: only these units came back, and the customer kept and paid for the rest. Leave out when the whole parcel was refused.

Returns

200 The cancelled order, or the open one after a partial delivery.

Errors

  • 403forbiddenMissing permission.
  • 404not_foundNo such order.
  • 409Cancelled already, nothing shipped (nothing_shipped), or paid (order_paid): refund it instead. For a partial delivery, also no cash waiting (nothing_to_collect) or everything came back (everything_returned).
  • 422validation_failedA return fee below zero.