# Change a room type

`PATCH /lodging/room-types/{id}` · Rivier · bookings

Change a room type.

- Scope: bookings:admin
- Mcp: rivier_lodging_room_type_update
- Sdk: bookings.roomType.update
- Cli: bookings room type update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,24}$"
    },
    "description": {
      "type": "string",
      "maxLength": 4000,
      "default": ""
    },
    "maxAdults": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 2
    },
    "maxChildren": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20,
      "default": 0
    },
    "maxInfants": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20,
      "default": 0
    },
    "prepNights": {
      "type": "integer",
      "minimum": 0,
      "maximum": 7,
      "default": 0
    },
    "baseAdults": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 2
    },
    "beds": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "maxLength": 40
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          }
        },
        "required": [
          "type",
          "count"
        ],
        "additionalProperties": false
      },
      "maxItems": 10,
      "default": []
    },
    "sizeM2": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 5000
        },
        {
          "type": "null"
        }
      ]
    },
    "amenities": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 60
      },
      "maxItems": 60
    },
    "sleeping": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "kind": {
            "type": "string",
            "enum": [
              "bedroom",
              "living_room",
              "studio",
              "other"
            ],
            "default": "bedroom"
          },
          "beds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "single",
                    "double",
                    "queen",
                    "king",
                    "twin",
                    "sofa_bed",
                    "bunk",
                    "futon",
                    "crib",
                    "extra_bed"
                  ]
                },
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 10
                }
              },
              "required": [
                "type",
                "count"
              ],
              "additionalProperties": false
            },
            "maxItems": 12
          }
        },
        "required": [
          "name",
          "beds"
        ],
        "additionalProperties": false
      },
      "maxItems": 20
    },
    "bedOptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "beds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "single",
                    "double",
                    "queen",
                    "king",
                    "twin",
                    "sofa_bed",
                    "bunk",
                    "futon",
                    "crib",
                    "extra_bed"
                  ]
                },
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 10
                }
              },
              "required": [
                "type",
                "count"
              ],
              "additionalProperties": false
            },
            "maxItems": 12
          }
        },
        "required": [
          "label",
          "beds"
        ],
        "additionalProperties": false
      },
      "maxItems": 6,
      "default": []
    },
    "bedrooms": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 30
        },
        {
          "type": "null"
        }
      ]
    },
    "bathrooms": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 30,
          "multipleOf": 0.5
        },
        {
          "type": "null"
        }
      ]
    },
    "smoking": {
      "type": "string",
      "enum": [
        "non_smoking",
        "smoking",
        "either"
      ],
      "default": "non_smoking"
    },
    "views": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 60
      },
      "maxItems": 10,
      "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": {}
    },
    "overbookAllowance": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "default": 0
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "default": 0
    },
    "published": {
      "type": "boolean",
      "default": false
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: 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 PATCH 'https://api.rivier.ai/lodging/room-types/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "code": "string",
  "description": "",
  "maxAdults": 2,
  "maxChildren": 0,
  "maxInfants": 0,
  "prepNights": 0,
  "baseAdults": 2
}'
```
