# Add a tourist or city tax rule with its source

`POST /lodging/taxes` · Rivier · bookings

Add a tourist or city tax rule with its source.

- Scope: bookings:admin
- Sdk: bookings.tax.create
- Cli: bookings tax create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "basis": {
      "type": "string",
      "enum": [
        "per_person_night",
        "percent_of_room"
      ]
    },
    "amountMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "percent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "maxNights": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365
    },
    "maxMinorPerPerson": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "childrenExempt": {
      "type": "boolean",
      "default": true
    },
    "validFrom": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "validTo": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "verifiedOn": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    }
  },
  "required": [
    "propertyId",
    "name",
    "basis",
    "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/lodging/taxes' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "propertyId": "string",
  "name": "string",
  "basis": "per_person_night",
  "sourceUrl": "https://example.com",
  "verifiedOn": "string"
}'
```
