# Add a tax rule with its source and the date it was checked

`POST /shop/tax-rules` · Rivier · shop

Add a tax rule with its source and the date it was checked.

- Scope: shop:admin
- Sdk: shop.taxRule.create
- Cli: shop tax rule create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "country": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "region": {
      "type": "string",
      "maxLength": 10,
      "default": ""
    },
    "taxClass": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,29}$",
      "default": "standard"
    },
    "rateBp": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "inclusive": {
      "type": "boolean",
      "default": true
    },
    "validFrom": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "validTo": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "verifiedOn": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    }
  },
  "required": [
    "name",
    "country",
    "rateBp",
    "sourceUrl",
    "verifiedOn"
  ],
  "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/tax-rules' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "country": "string",
  "rateBp": 0,
  "sourceUrl": "https://example.com",
  "verifiedOn": "string"
}'
```
