# Bookings unit update

`PATCH /lodging/units/{id}` · Rivier · bookings

Rename a room, move it to a floor or area, change its notes and what it changes about its room type, or archive it.

- Scope: bookings:admin
- Mcp: rivier_lodging_unit_update
- Sdk: bookings.unit.update
- Cli: bookings unit update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "floor": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "areaId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "notes": {
      "type": "string",
      "maxLength": 2000,
      "default": ""
    },
    "overrides": {
      "type": "object",
      "properties": {
        "sizeM2": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5000
        },
        "bedrooms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30
        },
        "bathrooms": {
          "type": "number",
          "minimum": 0,
          "maximum": 30
        },
        "smoking": {
          "type": "string",
          "enum": [
            "non_smoking",
            "smoking",
            "either"
          ]
        },
        "views": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 60
          },
          "maxItems": 10
        },
        "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
        }
      },
      "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": {}
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    }
  },
  "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/units/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "floor": "string",
  "areaId": "string",
  "notes": "",
  "overrides": {},
  "content": {},
  "status": "active"
}'
```
