# Add a shipping rate to a zone (by weight, free over a total)

`POST /shop/rates` · Rivier · shop

Add a shipping rate to a zone (by weight, free over a total).

- Scope: shop:admin
- Sdk: shop.rate.create
- Cli: shop rate create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "zoneId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "currency": {
      "type": "string",
      "pattern": "^[a-z]{3}$"
    },
    "amountMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "minWeightG": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    },
    "maxWeightG": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "freeOverMinor": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "default": 0
    }
  },
  "required": [
    "zoneId",
    "name",
    "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/rates' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "zoneId": "string",
  "name": "string",
  "currency": "string",
  "amountMinor": 0
}'
```
