Skip to content

Update units

Request

Update one or more existing units

Headers
Content-Typestringrequired

Specifies the expected content type. Currently supports application/json.

Value:"application/json"
Accept-Versionstring

Specify the version number to get the API functionality specific to that version. Currently supports the value: 1.0

Value:"1.0"
Bodyapplication/jsonrequired
unitsArray of objects, [ 1 .. 100 ] items(UnitUpdateRequest)required

List of units to update. All units must belong to the same property. Maximum 100 units per request.

curl -i -X PATCH \
  https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification-bulk/rooms-api/units \
  -H 'Accept-Version: 1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "units": [
      {
        "property_id": 123456,
        "unit_id": 111111111,
        "configuration": {
          "unit_type_id": 9,
          "rooms": [
            {
              "type": "GUEST_ROOM",
              "bed_configurations": [
                {
                  "beds": [
                    {
                      "bed_type_id": 3,
                      "bed_count": 1
                    }
                  ],
                  "is_default_configuration": true
                },
                {
                  "beds": [
                    {
                      "bed_type_id": 1,
                      "bed_count": 2
                    }
                  ],
                  "is_default_configuration": false
                }
              ]
            }
          ]
        }
      },
      {
        "property_id": 123456,
        "unit_id": 222222222,
        "configuration": {
          "unit_type_id": 1,
          "rooms": [
            {
              "type": "BEDROOM_SUBROOM",
              "bed_configurations": [
                {
                  "beds": [
                    {
                      "bed_type_id": 3,
                      "bed_count": 1
                    },
                    {
                      "bed_type_id": 1,
                      "bed_count": 1
                    }
                  ],
                  "is_default_configuration": true
                }
              ]
            },
            {
              "type": "LIVING_ROOM_SUBROOM",
              "bed_configurations": [
                {
                  "beds": [
                    {
                      "bed_type_id": 5,
                      "bed_count": 1
                    }
                  ],
                  "is_default_configuration": true
                }
              ]
            }
          ]
        }
      }
    ]
  }'

Responses

Units updated successfully

Bodyapplication/json
datanull
warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)
Response
Successful update of two units
{ "errors": [], "warnings": [], "meta": { "ruid": "test-ruid" } }