# Set a price

`POST /shop/prices` · Rivier · shop

Set a price. It goes into the price history; it may not go under the floor, and a previous price must be the lowest of the last 30 days.

- Scope: shop:admin
- Mcp: rivier_shop_price_set
- Sdk: shop.price.set
- Cli: shop price set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "variantId": {
      "type": "string",
      "format": "uuid"
    },
    "currency": {
      "type": "string",
      "pattern": "^[a-z]{3}$"
    },
    "amountMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "compareAtMinor": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "minQty": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "default": 1
    },
    "channel": {
      "type": "string",
      "maxLength": 40,
      "default": ""
    },
    "country": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        {
          "type": "string",
          "const": ""
        }
      ],
      "default": ""
    },
    "validFrom": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "validTo": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "reason": {
      "type": "string",
      "maxLength": 200,
      "default": ""
    }
  },
  "required": [
    "variantId",
    "currency",
    "amountMinor"
  ],
  "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/prices' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "variantId": "string",
  "currency": "string",
  "amountMinor": 0
}'
```
