# Cancel an order nobody has paid for and give its stock back

`POST /shop/orders/{id}/cancel` · Rivier · shop

Cancel an order nobody has paid for and give its stock back.

- Scope: shop:write
- Mcp: rivier_shop_order_cancel
- Graphql: Mutation.cancelShopOrder
- Sdk: shop.order.cancel
- Cli: shop order cancel
- Events: shop.order.cancelled

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "maxLength": 300,
      "default": ""
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/shop/orders/{id}/cancel' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": ""
}'
```
