# Shop view save

`POST /shop/views` · Rivier · shop

Keep the current search, filters and sort of a list under a name, for oneself or shared.

- Scope: shop:write
- Sdk: shop.view.save
- Cli: shop view save

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "area": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_.-]{0,39}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "shared": {
      "type": "boolean",
      "default": false
    },
    "state": {
      "type": "object",
      "properties": {
        "search": {
          "type": "string",
          "maxLength": 200
        },
        "stock": {
          "type": "string",
          "maxLength": 20
        },
        "tag": {
          "type": "string",
          "maxLength": 40
        },
        "sort": {
          "type": "string",
          "maxLength": 40
        }
      },
      "additionalProperties": true,
      "default": {}
    }
  },
  "required": [
    "area",
    "name"
  ],
  "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/views' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "area": "string",
  "name": "string"
}'
```
