# Ask to send shipped lines back

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

Ask to send shipped lines back. Only units that shipped and are not already returned or waiting can be asked for.

- Scope: shop:write
- Mcp: rivier_shop_return_request
- Graphql: Mutation.requestShopReturn
- Sdk: shop.return.request
- Cli: shop return request

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "required": [
          "lineId",
          "quantity"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 50
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "restock": {
      "type": "boolean",
      "default": true
    }
  },
  "required": [
    "lines",
    "reason"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: 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}/returns' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "lines": [
    {
      "lineId": "string",
      "quantity": 0
    }
  ],
  "reason": "string"
}'
```
