# Replace the amenities a property, area, room type or unit sets itself

`PUT /lodging/amenities/{scopeKind}/{scopeId}` · Rivier · bookings

Replace the amenities a property, area, room type or unit sets itself: include or remove an inherited one, with free or paid access, fee, hours, location and a note.

- Scope: bookings:admin
- Mcp: rivier_lodging_amenities_set
- Sdk: bookings.amenities.set
- Cli: bookings amenities set

## Parameters

- `scopeKind` (path, required), string
- `scopeId` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "amenityId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "mode": {
            "type": "string",
            "enum": [
              "include",
              "exclude"
            ],
            "default": "include"
          },
          "access": {
            "type": "string",
            "enum": [
              "free",
              "paid",
              "on_request"
            ],
            "default": "free"
          },
          "feeMinor": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "feePer": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "stay",
                  "night",
                  "person",
                  "use"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "hours": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 7
                      },
                      "minItems": 1,
                      "maxItems": 7
                    },
                    "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": [
                    "days",
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 14
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "location": {
            "type": "string",
            "maxLength": 120,
            "default": ""
          },
          "quantity": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 500
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "content": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "maxLength": 500
              },
              "propertyNames": {
                "pattern": "^[A-Za-z]{1,32}$"
              }
            },
            "propertyNames": {
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$"
            },
            "default": {}
          }
        },
        "required": [
          "amenityId"
        ],
        "additionalProperties": false
      },
      "maxItems": 300
    }
  },
  "required": [
    "items"
  ],
  "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/amenities/{scopeKind}/{scopeId}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "amenityId": "string"
    }
  ]
}'
```
