# Add a property (it is also a location with its time zone)

`POST /lodging/properties` · Rivier · bookings

Add a property (it is also a location with its time zone).

- Scope: bookings:admin
- Mcp: rivier_lodging_property_create
- Sdk: bookings.property.create
- Cli: bookings property create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string",
      "pattern": "^[a-z]{3}$"
    },
    "address": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 300
      },
      "default": {}
    },
    "checkInTime": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      "default": "15:00"
    },
    "checkOutTime": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      "default": "11:00"
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 12
      },
      "maxItems": 30,
      "default": []
    },
    "legalEntity": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 300
      },
      "default": {}
    },
    "registrationNo": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "taxProfile": {
      "type": "object",
      "properties": {
        "accommodationPercent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "default": 0
        },
        "ancillaryPercent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "default": 0
        },
        "inclusive": {
          "type": "boolean",
          "default": true
        },
        "source": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "maxLength": 500
            },
            "verifiedOn": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          "required": [
            "url",
            "verifiedOn"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "maxLength": 60
    },
    "kind": {
      "type": "string",
      "enum": [
        "hotel",
        "bed_and_breakfast",
        "guesthouse",
        "hostel",
        "apartment_hotel",
        "villa",
        "campsite",
        "rental",
        "resort"
      ],
      "default": "hotel"
    },
    "starRating": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 5,
          "multipleOf": 0.5
        },
        {
          "type": "null"
        }
      ]
    },
    "geo": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "lng": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          "required": [
            "lat",
            "lng"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "geoPrecision": {
      "type": "string",
      "enum": [
        "exact",
        "approximate"
      ],
      "default": "exact"
    },
    "entrance": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "lng": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            },
            "note": {
              "type": "string",
              "maxLength": 300,
              "default": ""
            }
          },
          "required": [
            "lat",
            "lng"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "contact": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 254
        },
        "phone": {
          "type": "string",
          "pattern": "^\\+?[0-9 ()-]{6,20}$"
        },
        "website": {
          "type": "string",
          "format": "uri",
          "maxLength": 300
        },
        "reservationsEmail": {
          "type": "string",
          "format": "email",
          "maxLength": 254
        },
        "emergencyPhone": {
          "type": "string",
          "pattern": "^\\+?[0-9 ()-]{6,20}$"
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "registrations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "authority": {
            "type": "string",
            "maxLength": 120
          },
          "validUntil": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "kind",
          "number"
        ],
        "additionalProperties": false
      },
      "maxItems": 20,
      "default": []
    },
    "policies": {
      "type": "object",
      "properties": {
        "children": {
          "type": "object",
          "properties": {
            "allowed": {
              "type": "boolean",
              "default": true
            },
            "freeUnderAge": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 18
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "extraBedFeeMinor": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "pets": {
          "type": "object",
          "properties": {
            "allowed": {
              "type": "string",
              "enum": [
                "no",
                "on_request",
                "yes"
              ],
              "default": "no"
            },
            "feeMinor": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "feePer": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "stay",
                    "night"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "maxPets": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 20
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "smoking": {
          "type": "object",
          "properties": {
            "policy": {
              "type": "string",
              "enum": [
                "none",
                "designated_areas",
                "allowed"
              ],
              "default": "none"
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "checkIn": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "front_desk",
                "self_code",
                "key_box",
                "host_meets",
                "other"
              ],
              "default": "front_desk"
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "payment": {
          "type": "object",
          "properties": {
            "methods": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "card",
                  "cash",
                  "bank_transfer",
                  "invoice",
                  "mobile"
                ]
              },
              "maxItems": 5,
              "default": []
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "houseRules": {
          "type": "object",
          "properties": {
            "quietHours": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    },
                    "to": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    }
                  },
                  "required": [
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "partiesAllowed": {
              "type": "boolean",
              "default": false
            },
            "minCheckInAge": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 99
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "lateArrivalUntil": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "rules": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "maxItems": 40,
              "default": []
            }
          },
          "additionalProperties": false,
          "default": {}
        },
        "cancellationPolicyId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "content": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "maxLength": 8000
        },
        "propertyNames": {
          "pattern": "^[A-Za-z]{1,32}$"
        }
      },
      "propertyNames": {
        "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$"
      },
      "default": {}
    }
  },
  "required": [
    "name",
    "timezone",
    "currency"
  ],
  "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/properties' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "timezone": "string",
  "currency": "string"
}'
```
