# Add a season: a name and its date ranges

`POST /lodging/seasons` · Rivier · bookings

Add a season: a name and its date ranges.

- Scope: bookings:admin
- Mcp: rivier_lodging_season_create
- Sdk: bookings.season.create
- Cli: bookings season create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "ranges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 40
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "default": 0
    }
  },
  "required": [
    "propertyId",
    "name",
    "ranges"
  ],
  "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/seasons' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "propertyId": "string",
  "name": "string",
  "ranges": [
    {
      "from": "string",
      "to": "string"
    }
  ]
}'
```
