# Set a room clean, dirty, inspected or out of order

`PUT /lodging/unit-state/{id}` · Rivier · bookings

Set a room clean, dirty, inspected or out of order. Out of order and inspected are a person's call.

- Scope: bookings:write
- Sdk: bookings.unit.setState
- Cli: bookings unit set state

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "clean",
        "dirty",
        "inspected",
        "out_of_order"
      ]
    }
  },
  "required": [
    "state"
  ],
  "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 PUT 'https://api.rivier.ai/lodging/unit-state/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "state": "clean"
}'
```
