{
  "openapi": "3.1.0",
  "info": {
    "title": "Rooms API",
    "description": "Contains Rooms API specification",
    "contact": {
      "name": "Connectivity Team",
      "url": "https://connect.booking.com",
      "email": "connectivity@booking.com"
    },
    "version": "1.3"
  },
  "servers": [
    {
      "url": "https://supply-xml.booking.com/",
      "description": "Test using live endpoint"
    }
  ],
  "tags": [
    {
      "name": "About Try it",
      "description": "Learn how to effectively use the Try it feature in the Rooms API documentation.\n\nUse the **Try it** feature to send sample requests to API endpoints directly from the developer portal. In the **Mock (schema only)** environment, Try it returns schema-driven mock responses or pre-built example responses. In the **Production** environment, it sends the request to the live API and returns dynamic responses from your selected test property.\n\n## Environment\n\nYou can select between two different environments (top right corner in the UI):\n\n**Mock (schema only)** (default):\n- Helps to understand the response data schema\n- Recommended for all write operations (POST, PUT, DELETE)\n- Environment for testing without affecting live/test data\n\n**Test live endpoint**:\n- Make sure to use only test properties.\n- Changes will affect your test property data\n- Requires valid credentials\n- Same API structure as production\n\n## Request\n\nYou can click on any unresolved placeholders to add a value or edit an existing placeholder value.\n\nThe portal loads the default request body. Where the specification supports multiple request body examples (for example: Rooms API POST endpoint), you can choose a different request body from the drop-down list.\n\nSome helpful pointers before running a request:\n\n- **Authentication** (when using live endpoint): Configure your authentication headers\n  - API Key or OAuth token as required. Use the **Environments** tab.\n  - Make sure to manage separate machine accounts for test vs. properties in production.\n  - Ensure credentials match your selected environment.\n\n- **Parameters**: Fill in required parameters\n  - Path parameters (like `propertyId`)\n  - Query parameters (like `language_code`)\n  - Request body for `POST/PUT` operations\n\n- **Execute**: Click **Send** to send the request\n  - The request is sent to the selected environment\n  - When sending requests to the live endpoint, real HTTP request is made to the API\n\n## Response\n\nThe Try it feature provides comprehensive response information to the extent supported by the Open API specification:\n\n### Status code\n- **2xx**: Success responses (200)\n- **4xx**: Client errors (400 Bad Request, 401 Unauthorized, 404 Not Found)\n- **5xx**: Server errors (500 Internal Server Error)\n\n### Response body\n- JSON formatted response data\n\nIf the returned response, by default, is unformatted, select the supported Response body format in the UI.\n\n### Response headers\n- Content-Type, Content-Length.\n\n## Environments\n\nThe **Environments** tab allows you to create variables specific to the environment. For example, you can add a variable to hold the value of the `property-id` placeholder. The portal inserts the respective value depending on the environment at the time of sending the request.\n\n### Variables\n\nMost of the endpoints (especially POST/PUT/DELETE) require you to add a path or query parameter before sending the request. The Open API specification marks these parameters with placeholder tags. For example, {{`property_id`}}. You can use the **Environments** tab to manage the values for these placeholders as variables.\n\n#### Path parameters\n- **Required**: Must be provided to make the request\n- **Type validation**: Ensures correct data types (integer, string, etc.)\n- **Example**: `property-id` in `/rooms-api/properties/{property-id}/units`\n\n#### Query parameters\n- **Optional**: Usually have default values\n- **Example**: `debug_info` with boolean values\n\n#### Request body\n- **Schema validation**: Follows OpenAPI schema definitions\n- **Example data**: Prepopulated with sample values\n\n## Best practices\n\nThis section provides some basic practice guidelines.\n\n### Authentication\n\n- Always use separate machine accounts for test properties vs. properties in production.\n- When testing with production endpoint, make sure to use only test properties.\n\n### For Read operations (GET)\n- Safe to test in any environment\n- Use valid IDs that exist in your system\n- Check response structure for integration planning\n\n### For Write operations (POST, PUT)\n- **Always use Mock (schema only) environment first**\n- Verify request payload structure\n- Check response for success confirmation\n- Test error scenarios with invalid data\n\n### For Delete operations (DELETE)\n- **Preferable to use Mock (schema only) environment only**\n- Understand the operation is irreversible\n- Have backup data when testing using test properties\n\n## Troubleshooting\n\n### Common issues\n\n**401 Unauthorized**\n- Check authentication credentials\n- Verify API key is valid and not expired\n- Ensure credentials match the selected environment\n\n**400 Bad Request**\n- Validate request payload against schema\n- Check required fields are provided\n- Verify data types match specification\n\n**404 Not Found**\n- Confirm the resource ID exists\n- Check the endpoint URL is correct\n- Verify you have access to the resource\n\n### Getting help\n\nIf you encounter issues:\n1. Check the response error message for details\n2. Verify your request matches the API specification\n3. Contact the Connectivity Team for support\n\n---\n\n*This documentation applies to all endpoints in the Rooms API. The Try it feature provides a consistent testing experience across all operations.*"
    },
    {
      "name": "rooms-api-bulk",
      "description": "Create, update and delete multiple units"
    },
    {
      "name": "rooms-api",
      "description": "Create, update, retrieve and delete property units"
    },
    {
      "name": "meta",
      "description": "Retrieve units meta data and translations"
    }
  ],
  "x-tagGroups": [
    {
      "name": "API Endpoints",
      "tags": [
        "rooms-api",
        "rooms-api-bulk",
        "meta"
      ]
    },
    {
      "name": "Documentation",
      "tags": [
        "About Try it"
      ]
    }
  ],
  "paths": {
    "/rooms-api/units": {
      "post": {
        "tags": [
          "rooms-api-bulk"
        ],
        "summary": "Create units",
        "description": "Create one or more units",
        "operationId": "createUnits",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Specifies the expected content type. Currently supports `application/json`.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "application/json"
              ]
            }
          },
          {
            "name": "Accept-Version",
            "in": "header",
            "description": "Specify the version number to get the API functionality specific to that version. Currently supports the value: 1.0",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1.0"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUnitsCreateRequest"
              },
              "examples": {
                "MULTI_ROOM_UNITS": {
                  "description": "Create two multi-room units with all fields",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-01",
                        "configuration": {
                          "unit_type_id": 31,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 6,
                                      "bed_count": 1
                                    },
                                    {
                                      "bed_type_id": 1,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 1,
                                      "bed_count": 3
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "LIVING_ROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 5,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 4180,
                        "number_of_units": 5,
                        "smoking_policy": "SMOKING_AND_NONSMOKING",
                        "size": {
                          "value": 155,
                          "unit": "SQM"
                        },
                        "partner_reference_name": "Two-bedroom villa with living room",
                        "floor_numbers_located_on": [
                          2
                        ],
                        "occupancy_details": {
                          "max_guests": 5,
                          "max_adults": 5,
                          "max_children": 4,
                          "max_infants": 4,
                          "max_infants_on_top": 0
                        },
                        "extra_beds_configuration": {
                          "extra_beds": 1,
                          "cribs": 0,
                          "is_crib_and_extra_bed_allowed": false
                        }
                      },
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-02",
                        "configuration": {
                          "unit_type_id": 1,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "LIVING_ROOM_SUBROOM"
                            }
                          ]
                        },
                        "unit_name_id": 865,
                        "number_of_units": 3,
                        "smoking_policy": "NONSMOKING",
                        "size": {
                          "value": 75,
                          "unit": "SQM"
                        },
                        "partner_reference_name": "One-bedroom apartment",
                        "occupancy_details": {
                          "max_guests": 3,
                          "max_adults": 3,
                          "max_children": 2,
                          "max_infants": 0,
                          "max_infants_on_top": 2
                        },
                        "extra_beds_configuration": {
                          "extra_beds": 1,
                          "cribs": 1,
                          "is_crib_and_extra_bed_allowed": true
                        }
                      }
                    ]
                  }
                },
                "SINGLE_ROOM_UNITS": {
                  "description": "Create two single-room units with minimal fields",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-01",
                        "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
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 255,
                        "number_of_units": 20,
                        "smoking_policy": "NONSMOKING"
                      },
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-02",
                        "configuration": {
                          "unit_type_id": 12,
                          "rooms": [
                            {
                              "type": "GUEST_ROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 1147
                      }
                    ]
                  }
                },
                "MIXED_UNIT_TYPES": {
                  "description": "Create a multi-room and a single-room unit in one request",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-01",
                        "configuration": {
                          "unit_type_id": 5,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 746
                      },
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-02",
                        "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
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 255,
                        "number_of_units": 20,
                        "smoking_policy": "NONSMOKING",
                        "size": {
                          "value": 24,
                          "unit": "SQM"
                        },
                        "partner_reference_name": "Double with multiple bed configurations",
                        "floor_numbers_located_on": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "occupancy_details": {
                          "max_guests": 2,
                          "max_adults": 2,
                          "max_children": 1,
                          "max_infants": 1,
                          "max_infants_on_top": 0
                        },
                        "extra_beds_configuration": {
                          "extra_beds": 0,
                          "cribs": 1,
                          "is_crib_and_extra_bed_allowed": false
                        }
                      }
                    ]
                  }
                },
                "MINIMAL_REQUIRED_FIELDS": {
                  "description": "Create a single unit with only required fields",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "correlation_id": "corr-01",
                        "configuration": {
                          "unit_type_id": 10,
                          "rooms": [
                            {
                              "type": "GUEST_ROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 1,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        },
                        "unit_name_id": 69
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Units created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseBulkUnitsCreateResponse"
                },
                "examples": {
                  "SUCCESS": {
                    "description": "Successful creation of two units",
                    "value": {
                      "data": {
                        "units": [
                          {
                            "unit_id": 100000001,
                            "correlation_id": "corr-01",
                            "property_id": 123456,
                            "unit_name_id": 4180,
                            "number_of_units": 5,
                            "smoking_policy": "SMOKING_AND_NONSMOKING",
                            "configuration": {
                              "unit_type_id": 31,
                              "rooms": [
                                {
                                  "type": "BEDROOM_SUBROOM",
                                  "bed_configurations": [
                                    {
                                      "beds": [
                                        {
                                          "bed_type_id": 6,
                                          "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
                                    }
                                  ]
                                }
                              ]
                            },
                            "size": {
                              "value": 155,
                              "unit": "SQM"
                            },
                            "occupancy_details": {
                              "max_guests": 5,
                              "max_adults": 5,
                              "max_children": 4,
                              "max_infants": 4,
                              "max_infants_on_top": 0
                            },
                            "extra_beds_configuration": {
                              "extra_beds": 1,
                              "cribs": 0,
                              "is_crib_and_extra_bed_allowed": false
                            }
                          },
                          {
                            "unit_id": 100000002,
                            "correlation_id": "corr-02",
                            "property_id": 123456,
                            "unit_name_id": 865,
                            "number_of_units": 3,
                            "smoking_policy": "NONSMOKING",
                            "configuration": {
                              "unit_type_id": 1,
                              "rooms": [
                                {
                                  "type": "BEDROOM_SUBROOM",
                                  "bed_configurations": [
                                    {
                                      "beds": [
                                        {
                                          "bed_type_id": 3,
                                          "bed_count": 1
                                        }
                                      ],
                                      "is_default_configuration": true
                                    }
                                  ]
                                },
                                {
                                  "type": "LIVING_ROOM_SUBROOM"
                                }
                              ]
                            },
                            "size": {
                              "value": 75,
                              "unit": "SQM"
                            },
                            "occupancy_details": {
                              "max_guests": 3,
                              "max_adults": 3,
                              "max_children": 2,
                              "max_infants": 0,
                              "max_infants_on_top": 2
                            },
                            "extra_beds_configuration": {
                              "extra_beds": 1,
                              "cribs": 1,
                              "is_crib_and_extra_bed_allowed": true
                            }
                          }
                        ]
                      },
                      "errors": [],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseBulkUnitsCreateResponseError"
                },
                "examples": {
                  "VALIDATION_ERROR": {
                    "description": "Validation errors for multiple units",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "Invalid value",
                          "code": 320,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[0].configuration"
                            ]
                          }
                        },
                        {
                          "message": "Invalid value",
                          "code": 320,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[1].correlation_id"
                            ]
                          }
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseBulkUnitsCreateResponseError"
                },
                "examples": {
                  "SYSTEM_ERROR": {
                    "description": "",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "System error",
                          "code": 448,
                          "description": "Unknown error, please contact Booking.com for support"
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "rooms-api-bulk"
        ],
        "summary": "Delete units",
        "description": "Delete one or more existing units",
        "operationId": "deleteUnits",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Specifies the expected content type. Currently supports `application/json`.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "application/json"
              ]
            }
          },
          {
            "name": "Accept-Version",
            "in": "header",
            "description": "Specify the version number to get the API functionality specific to that version. Currently supports the value: 1.0",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1.0"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUnitsDeleteRequest"
              },
              "examples": {
                "DELETE_UNITS": {
                  "description": "Delete multiple units from a property",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111
                      },
                      {
                        "property_id": 123456,
                        "unit_id": 222222222
                      },
                      {
                        "property_id": 123456,
                        "unit_id": 333333333
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Units deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoid"
                },
                "examples": {
                  "SUCCESS": {
                    "description": "Successful deletion of multiple units",
                    "value": {
                      "errors": [],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Delete error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoidError"
                },
                "examples": {
                  "ERROR": {
                    "description": "Errors deleting multiple units",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "Unable to process",
                          "code": 450,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[0].unit_id"
                            ]
                          }
                        },
                        {
                          "message": "Unable to process",
                          "code": 450,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[2].unit_id"
                            ]
                          }
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoidError"
                },
                "examples": {
                  "SYSTEM_ERROR": {
                    "description": "",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "System error",
                          "code": 448,
                          "description": "Unknown error, please contact Booking.com for support"
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "rooms-api-bulk"
        ],
        "summary": "Update units",
        "description": "Update one or more existing units",
        "operationId": "updateUnits",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Specifies the expected content type. Currently supports `application/json`.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "application/json"
              ]
            }
          },
          {
            "name": "Accept-Version",
            "in": "header",
            "description": "Specify the version number to get the API functionality specific to that version. Currently supports the value: 1.0",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1.0"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUnitsUpdateRequest"
              },
              "examples": {
                "BED_CONFIGURATION": {
                  "description": "Update bed configurations for two units",
                  "value": {
                    "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
                                }
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "ADD_ROOM": {
                  "description": "Add a second bedroom to a multi-room unit",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111,
                        "configuration": {
                          "unit_type_id": 1,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 1,
                                      "bed_count": 2
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "LIVING_ROOM_SUBROOM"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "REMOVE_ROOM": {
                  "description": "Remove a living room from a multi-room unit",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111,
                        "configuration": {
                          "unit_type_id": 1,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "UPDATE_ROOM_BEDS": {
                  "description": "Add bed to bedroom and remove beds from living room for a multi-room unit",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111,
                        "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"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "MIXED_UNIT_TYPES": {
                  "description": "Update a multi-room and a single-room unit in one request",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111,
                        "configuration": {
                          "unit_type_id": 1,
                          "rooms": [
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 3,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "BEDROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 1,
                                      "bed_count": 2
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            },
                            {
                              "type": "LIVING_ROOM_SUBROOM",
                              "bed_configurations": [
                                {
                                  "beds": [
                                    {
                                      "bed_type_id": 5,
                                      "bed_count": 1
                                    }
                                  ],
                                  "is_default_configuration": true
                                }
                              ]
                            }
                          ]
                        },
                        "occupancy_details": {
                          "max_guests": 5,
                          "max_adults": 5,
                          "max_children": 4,
                          "max_infants": 4,
                          "max_infants_on_top": 0
                        }
                      },
                      {
                        "property_id": 123456,
                        "unit_id": 222222222,
                        "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
                                }
                              ]
                            }
                          ]
                        },
                        "number_of_units": 10,
                        "smoking_policy": "NONSMOKING",
                        "partner_reference_name": "Updated double room"
                      }
                    ]
                  }
                },
                "SIMPLE_FIELDS": {
                  "description": "Update simple fields for two units",
                  "value": {
                    "units": [
                      {
                        "property_id": 123456,
                        "unit_id": 111111111,
                        "unit_name_id": 2273,
                        "number_of_units": 10,
                        "smoking_policy": "NONSMOKING",
                        "partner_reference_name": "Updated reference name"
                      },
                      {
                        "property_id": 123456,
                        "unit_id": 222222222,
                        "size": {
                          "value": 99,
                          "unit": "SQM"
                        },
                        "occupancy_details": {
                          "max_guests": 5,
                          "max_adults": 5,
                          "max_children": 4,
                          "max_infants": 4,
                          "max_infants_on_top": 0
                        },
                        "extra_beds_configuration": {
                          "extra_beds": 2,
                          "cribs": 1,
                          "is_crib_and_extra_bed_allowed": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Units updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoid"
                },
                "examples": {
                  "SUCCESS": {
                    "description": "Successful update of two units",
                    "value": {
                      "errors": [],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoidError"
                },
                "examples": {
                  "VALIDATION_ERROR": {
                    "description": "Validation errors for multiple units",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "Invalid value",
                          "code": 320,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[0].configuration.unit_type_id"
                            ]
                          }
                        },
                        {
                          "message": "Invalid value",
                          "code": 320,
                          "description": "Error description",
                          "details": {
                            "fields": [
                              "$.units[1].configuration.rooms[0].bed_configurations[0].beds[0].bed_type_id"
                            ]
                          }
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseVoidError"
                },
                "examples": {
                  "SYSTEM_ERROR": {
                    "description": "",
                    "value": {
                      "data": null,
                      "errors": [
                        {
                          "message": "System error",
                          "code": 448,
                          "description": "Unknown error, please contact Booking.com for support"
                        }
                      ],
                      "warnings": [],
                      "meta": {
                        "ruid": "test-ruid"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms-api/properties/{property-id}/units": {
      "get": {
        "tags": [
          "rooms-api"
        ],
        "summary": "Get units",
        "description": "Get all active units for a property",
        "operationId": "getUnits",
        "parameters": [
          {
            "name": "property-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "debug_info",
            "in": "query",
            "description": "Enable debug to return <code>$.unit_name_fallback</code> field in response",
            "required": false,
            "schema": {
              "type": "string",
              "default": "false"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseListUnit"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "rooms-api"
        ],
        "summary": "Create unit",
        "description": "Create new unit for a property",
        "operationId": "createUnit",
        "parameters": [
          {
            "name": "property-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitCreate"
              },
              "examples": {
                "MULTI_ROOM_UNIT_W_MANY_ROOMS": {
                  "description": "Create a Villa with 2 bedrooms and a living room with sofa",
                  "value": {
                    "configuration": {
                      "unit_type_id": 31,
                      "rooms": [
                        {
                          "type": "BEDROOM_SUBROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 6,
                                  "bed_count": 1
                                },
                                {
                                  "bed_type_id": 1,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        },
                        {
                          "type": "BEDROOM_SUBROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 1,
                                  "bed_count": 3
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        },
                        {
                          "type": "LIVING_ROOM_SUBROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 5,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        },
                        {
                          "type": "LIVING_ROOM_SUBROOM"
                        }
                      ]
                    },
                    "unit_name_id": 4180,
                    "number_of_units": 5,
                    "smoking_policy": "SMOKING_AND_NONSMOKING",
                    "size": {
                      "value": 155,
                      "unit": "SQM"
                    },
                    "partner_reference_name": "Example two-bedroom villa",
                    "floor_numbers_located_on": [
                      2
                    ],
                    "occupancy_details": {
                      "max_guests": 5,
                      "max_adults": 5,
                      "max_children": 4,
                      "max_infants": 4,
                      "max_infants_on_top": 0
                    },
                    "extra_beds_configuration": {
                      "extra_beds": 1,
                      "cribs": 0,
                      "is_crib_and_extra_bed_allowed": false
                    }
                  }
                },
                "MULTI_ROOM_UNIT_W_BEDROOM_ONLY": {
                  "description": "Create a one-bedroom Apartment with a living room",
                  "value": {
                    "configuration": {
                      "unit_type_id": 1,
                      "rooms": [
                        {
                          "type": "BEDROOM_SUBROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 3,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        },
                        {
                          "type": "LIVING_ROOM_SUBROOM"
                        }
                      ]
                    },
                    "unit_name_id": 865,
                    "number_of_units": 5,
                    "smoking_policy": "SMOKING",
                    "size": {
                      "value": 155,
                      "unit": "SQM"
                    },
                    "partner_reference_name": "Example single-bedroom apartment",
                    "floor_numbers_located_on": [
                      2
                    ],
                    "occupancy_details": {
                      "max_guests": 3,
                      "max_adults": 3,
                      "max_children": 2,
                      "max_infants": 0,
                      "max_infants_on_top": 2
                    },
                    "extra_beds_configuration": {
                      "extra_beds": 1,
                      "cribs": 1,
                      "is_crib_and_extra_bed_allowed": true
                    }
                  }
                },
                "MULTI_ROOM_UNIT_W_MINIMAL_REQUIRED_FIELDS": {
                  "description": "Create a one-bedroom Suite with minimum required fields",
                  "value": {
                    "configuration": {
                      "unit_type_id": 5,
                      "rooms": [
                        {
                          "type": "BEDROOM_SUBROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 3,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        }
                      ]
                    },
                    "unit_name_id": 746
                  }
                },
                "SINGLE_ROOM_UNIT_W_MULTIPLE_BED_CONFIGS": {
                  "description": "Create a Double with multiple bed configurations",
                  "value": {
                    "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
                            }
                          ]
                        }
                      ]
                    },
                    "unit_name_id": 255,
                    "number_of_units": 20,
                    "smoking_policy": "NONSMOKING",
                    "size": {
                      "value": 24,
                      "unit": "SQM"
                    },
                    "partner_reference_name": "Example double with multiple bed configurations",
                    "floor_numbers_located_on": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "occupancy_details": {
                      "max_guests": 2,
                      "max_adults": 2,
                      "max_children": 1,
                      "max_infants": 1,
                      "max_infants_on_top": 0
                    },
                    "extra_beds_configuration": {
                      "extra_beds": 0,
                      "cribs": 1,
                      "is_crib_and_extra_bed_allowed": false
                    }
                  }
                },
                "SINGLE_ROOM_UNIT_W_SINGLE_BED_CONFIG": {
                  "description": "Create a Studio with a single bed configuration",
                  "value": {
                    "configuration": {
                      "unit_type_id": 12,
                      "rooms": [
                        {
                          "type": "GUEST_ROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 3,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        }
                      ]
                    },
                    "unit_name_id": 1147,
                    "number_of_units": 20,
                    "smoking_policy": "NONSMOKING",
                    "size": {
                      "value": 24,
                      "unit": "SQM"
                    },
                    "partner_reference_name": "Example studio with a single bed configuration",
                    "occupancy_details": {
                      "max_guests": 2,
                      "max_adults": 2,
                      "max_children": 1,
                      "max_infants": 1,
                      "max_infants_on_top": 0
                    },
                    "extra_beds_configuration": {
                      "extra_beds": 0,
                      "cribs": 1,
                      "is_crib_and_extra_bed_allowed": false
                    }
                  }
                },
                "SINGLE_ROOM_UNIT_W_MINIMUM_REQUIRED_FIELDS": {
                  "description": "Create a Single with minimum required fields",
                  "value": {
                    "configuration": {
                      "unit_type_id": 10,
                      "rooms": [
                        {
                          "type": "GUEST_ROOM",
                          "bed_configurations": [
                            {
                              "beds": [
                                {
                                  "bed_type_id": 1,
                                  "bed_count": 1
                                }
                              ],
                              "is_default_configuration": true
                            }
                          ]
                        }
                      ]
                    },
                    "unit_name_id": 69
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseUnit"
                }
              }
            }
          }
        }
      }
    },
    "/rooms-api/properties/{property-id}/units/{unit-id}": {
      "delete": {
        "tags": [
          "rooms-api"
        ],
        "summary": "Delete unit",
        "description": "Delete existing unit for a property",
        "operationId": "deleteUnit",
        "parameters": [
          {
            "name": "property-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "unit-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseObject"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "rooms-api"
        ],
        "summary": "Update unit",
        "description": "Update existing unit for a property",
        "operationId": "updateUnit",
        "parameters": [
          {
            "name": "property-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "unit-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Unit"
              },
              "examples": {
                "MULTI_ROOM_ADD_BED": {
                  "description": "Add additional single bed to bedroom for multi-room unit",
                  "value": {
                    "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
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "MULTI_ROOM_REMOVE_BED": {
                  "description": "Remove beds from a living room for multi-room unit",
                  "value": {
                    "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"
                        }
                      ]
                    }
                  }
                },
                "SINGLE_ROOM_BED_CONFIG": {
                  "description": "Add additional bed configuration for mono-room unit",
                  "value": {
                    "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
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "OBJECT_TYPE_FIELDS": {
                  "description": "Update size, occupancy and extra beds configuration for any unit type",
                  "value": {
                    "size": {
                      "value": 99,
                      "unit": "SQM"
                    },
                    "occupancy_details": {
                      "max_guests": 5,
                      "max_adults": 5,
                      "max_children": 4,
                      "max_infants": 4,
                      "max_infants_on_top": 0
                    },
                    "extra_beds_configuration": {
                      "extra_beds": 2,
                      "cribs": 1,
                      "is_crib_and_extra_bed_allowed": true
                    }
                  }
                },
                "SIMPLE_FIELDS": {
                  "description": "Update unit name, number of units, smoking policy and partner reference name for any unit type",
                  "value": {
                    "unit_name_id": 2273,
                    "number_of_units": 3,
                    "smoking_policy": "SMOKING",
                    "partner_reference_name": "Example reference name"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseObject"
                }
              }
            }
          }
        }
      }
    },
    "/rooms-api/properties/{property-id}/deleted-units": {
      "get": {
        "tags": [
          "rooms-api"
        ],
        "summary": "Get deleted units (read only)",
        "description": "Get all deleted units for a property (read only)",
        "operationId": "getDeletedUnits",
        "parameters": [
          {
            "name": "property-id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "debug_info",
            "in": "query",
            "description": "Enable debug to return <code>$.unit_name_fallback</code> field in response",
            "required": false,
            "schema": {
              "type": "string",
              "default": "false"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseListUnit"
                }
              }
            }
          }
        }
      }
    },
    "/rooms-api/meta": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Get meta data for units",
        "description": "Retrieve meta data required for unit creation and update for any supported <code>language_code</code>\n    <ul>\n    <li>Retrieve the list of all unit type IDs allowed for creation/update. For each <code>$.unit_types[*]</code> record you will find:</li>\n        <ul>\n        <li><code>unit_type_id</code>: the unit type ID you must provide with each create and update request</li>\n        <li><code>unit_type_name</code>: string representation of unit type ID (translatable)</li>\n        <li><code>is_multi_room</code>: attribute that defines what type of room types you can use add in your unit</li>\n        <li><code>is_active</code>: attribute that defines if a unit type is available for creation/update, inactive room types are available for read only</li>\n        <li><code>valid_property_categories</code>: list of property categories that allow creation of this unit type</li>\n        <li><code>suggested_unit_names</code>: list of unit names that we recommend to use in combination with this unit type</li>\n        </ul>\n    <li>Retrieve the list of all room name IDs allowed during unit creation/update. For each <code>$.unit_names[*]</code> record you will find:</li>\n        <ul>\n        <li><code>unit_name_id</code>: the unit name ID you must provide with each create request</li>\n        <li><code>unit_name</code>: string representation of unit name ID (translatable)</li>\n        </ul>\n    <li>Retrieve the list of all bed type IDs allowed during unit creation/update. For each <code>$.bed_types[*]</code> record you will find:</li>\n        <ul>\n        <li><code>bed_type_id</code>: the bed type ID you must provide when configuring rooms</li>\n        <li><code>bed_type_name</code>: string representation of bed type (translatable)</li>\n        <li><code>bed_type_description</code>: description of bed type size using metric units (translatable)</li>\n        <li><code>bed_type_description_imperial</code>: description of bed type size using imperial units (translatable)</li>\n        <li><code>is_active</code>: attribute that defines if a bed type is available for creation/update, inactive bed types are available for read only</li>\n        </ul>\n    <li>Retrieve the list of all property categories for which you can create a unit. For each property type you will find its name and category ID, as well as an OTA or a Booking.com extended code</li>\n    </ul>\n",
        "operationId": "getRoomMeta",
        "parameters": [
          {
            "name": "language_code",
            "in": "query",
            "description": "Language code for localization. Defaults to <code>EN_GB</code>.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EN_GB",
                "EN_US",
                "DE",
                "NL",
                "FR",
                "ES",
                "ES_AR",
                "ES_MX",
                "CA",
                "IT",
                "PT_PT",
                "PT_BR",
                "NO",
                "FI",
                "SV",
                "DA",
                "CS",
                "HU",
                "RO",
                "JA",
                "ZH_CN",
                "ZH_TW",
                "PL",
                "EL",
                "RU",
                "TR",
                "BG",
                "AR",
                "KA",
                "KO",
                "HE",
                "LV",
                "UK",
                "ID",
                "MS",
                "TH",
                "ET",
                "HR",
                "LT",
                "SK",
                "SR",
                "SL",
                "VI",
                "TL",
                "IS",
                "HI",
                "SQ"
              ]
            }
          },
          {
            "name": "show_inactive",
            "in": "query",
            "description": "Show/hide inactive unit and bed types",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseUnitMeta"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BedConfigurationRequest": {
        "description": "<ul>\n<li>For multi-room unit you must add exactly one bed configuration</li>\n<li>For single-room unit you must add at least one bed configuration, others are optional</li>\n<li>Bed type ID provided must exist and be active in meta (see <code>$.bed_types[*].is_active</code>)</li>\n<li>Same bed type ID must be repeated within a single bed configuration</li>\n</ul>\n",
        "properties": {
          "beds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BedRequest"
            },
            "minItems": 1
          },
          "is_default_configuration": {
            "type": "boolean",
            "description": "Exactly one default bed configuration is mandatory for each room provided"
          }
        },
        "required": [
          "beds",
          "is_default_configuration"
        ]
      },
      "BedRequest": {
        "properties": {
          "bed_type_id": {
            "type": "integer",
            "format": "int32"
          },
          "bed_count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "bed_count",
          "bed_type_id"
        ]
      },
      "BulkUnitsCreateRequest": {
        "description": "Bulk unit create request",
        "properties": {
          "units": {
            "type": "array",
            "description": "List of units to create. All units must belong to the same property. Maximum 100 units per request.",
            "items": {
              "$ref": "#/components/schemas/UnitCreateRequest"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "units"
        ]
      },
      "ConfigurationRequest": {
        "properties": {
          "unit_type_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>Must exist and be active in meta (see <code>$.unit_type[*].id</code> and <code>$.unit_type[*].is_active</code>) for unit creation/update</li>\n<li>Must be valid for property's category in meta (see <code>$.unit_type[*].valid_property_categories</code>)</li>\n</ul>\n"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRequest"
            },
            "minItems": 1
          }
        },
        "required": [
          "rooms",
          "unit_type_id"
        ]
      },
      "ExtraBedsConfigurationCreateRequest": {
        "description": "Extra bed & crib options",
        "properties": {
          "extra_beds": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Number of extra beds you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "cribs": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Number of cribs you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "is_crib_and_extra_bed_allowed": {
            "type": "boolean",
            "default": false,
            "description": "Both extra beds and cribs can be provided (<code>true</code>) or only one of the options (<code>false</code>)?"
          }
        }
      },
      "OccupancyCreateRequest": {
        "deprecated": true,
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of children (0-17 years old)",
            "maximum": 49,
            "minimum": 0
          }
        }
      },
      "OccupancyDetailsCreateRequest": {
        "description": "Occupancy settings for the unit. Replaces the deprecated <code>occupancy</code> object.",
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of children excluding infants (3-17 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of infants (0-2 years old). Infants are counted toward <code>max_guests</code>.",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants_on_top": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of infants (0-2 years old) on top of maximum number of guests",
            "maximum": 49,
            "minimum": 0
          }
        }
      },
      "RoomRequest": {
        "properties": {
          "type": {
            "type": "string",
            "description": "<ul>\n<li>For multi-room units you must add one or more <code>BEDROOM_SUBROOM</code> or <code>LIVING_ROOM_SUBROOM</code>, at least one of the rooms must have beds</li>\n<li>For single-room units you must add exactly one <code>GUEST_ROOM</code></li>\n</ul>\n",
            "enum": [
              "BEDROOM_SUBROOM",
              "LIVING_ROOM_SUBROOM",
              "GUEST_ROOM"
            ]
          },
          "bed_configurations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BedConfigurationRequest"
            }
          }
        },
        "required": [
          "type"
        ]
      },
      "SizeRequest": {
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "description": "Must be a value between 1 and 9999.99"
          },
          "unit": {
            "type": "string",
            "description": "SQM (square meters) or SQFT (square feet)",
            "enum": [
              "SQM",
              "SQFT"
            ]
          }
        },
        "required": [
          "unit",
          "value"
        ]
      },
      "UnitCreateRequest": {
        "description": "Unit create schema",
        "properties": {
          "property_id": {
            "type": "integer",
            "format": "int32",
            "description": "Property ID the unit belongs to. All units in a single request must belong to the same property."
          },
          "correlation_id": {
            "type": "string",
            "description": "<ul>\n<li>Correlation id to map the created unit in the response (see <code>$.units[i].correlation_id</code>)</li>\n<li>Must be unique for all provided units in the request</li>\n</ul>\n",
            "minLength": 1
          },
          "configuration": {
            "$ref": "#/components/schemas/ConfigurationRequest"
          },
          "unit_name_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>The list of available unit names can be found in meta (see <code>$.unit_names</code>)</li>\n<li>Set <code>debug_info</code> as <code>true</code> to retrieve the generated unit name (see <code>$.unit_name_fallback</code>)</li>\n</ul>\n"
          },
          "unit_name_source": {
            "type": "string",
            "description": " <ul>\n <li>PROVIDED uses the <code>unit_name_id</code> as the unit name source and <code>unit_name_id</code> must be set when using PROVIDED</li>\n <li>GENERATED generates the <code>unit_name_id</code> and <code>unit_name_id</code> must not be set when using GENERATED</li>\n </ul>\n",
            "enum": [
              "PROVIDED",
              "GENERATED"
            ]
          },
          "category_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>Category id for the unit</li>\n<li>Use meta to retrieve the supported categories (see <code>$.unit_categories</code>)</li>\n</ul>\n"
          },
          "number_of_units": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Number of units must be between 0 and 32000"
          },
          "smoking_policy": {
            "type": "string",
            "default": "SMOKING_AND_NONSMOKING",
            "enum": [
              "SMOKING",
              "NONSMOKING",
              "SMOKING_AND_NONSMOKING"
            ]
          },
          "size": {
            "$ref": "#/components/schemas/SizeRequest"
          },
          "partner_reference_name": {
            "type": "string",
            "description": "Internal room name, visible only in API and Extranet"
          },
          "floor_numbers_located_on": {
            "type": "array",
            "description": "One or more floors where the unit is located; 0 is a ground floor",
            "items": {
              "type": "integer",
              "format": "int32",
              "description": "One or more floors where the unit is located; 0 is a ground floor"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/OccupancyCreateRequest"
          },
          "occupancy_details": {
            "$ref": "#/components/schemas/OccupancyDetailsCreateRequest"
          },
          "extra_beds_configuration": {
            "$ref": "#/components/schemas/ExtraBedsConfigurationCreateRequest"
          }
        },
        "required": [
          "configuration",
          "correlation_id",
          "property_id"
        ]
      },
      "ApiError": {
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "integer",
            "format": "int32",
            "description": ""
          },
          "details": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ApiResponseBulkUnitsCreateResponse": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/BulkUnitsCreateResponse"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "Bed": {
        "properties": {
          "bed_type_id": {
            "type": "integer",
            "format": "int32"
          },
          "bed_count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "bed_count",
          "bed_type_id"
        ]
      },
      "BulkUnitsCreateResponse": {
        "properties": {
          "units": {
            "type": "array",
            "description": "List of created units. Use <code>correlation_id</code> to map each entry back to the corresponding item in the request.",
            "items": {
              "$ref": "#/components/schemas/UnitCreateResponse"
            }
          }
        }
      },
      "ResponseMeta": {
        "properties": {
          "ruid": {
            "type": "string"
          }
        }
      },
      "UnitCreateResponse": {
        "properties": {
          "unit_id": {
            "type": "integer",
            "format": "int64",
            "description": "Id of the created unit"
          },
          "correlation_id": {
            "type": "string",
            "description": "Correlation id provided in the create request to map the created unit back to the request"
          },
          "property_id": {
            "type": "integer",
            "format": "int32",
            "description": "Property ID the unit belongs to"
          },
          "configuration": {
            "$ref": "#/components/schemas/UnitCreateResponseConfiguration"
          },
          "unit_name_id": {
            "type": "integer",
            "format": "int32",
            "description": "Unit name ID assigned to this unit"
          },
          "unit_name_source": {
            "type": "string",
            "description": "Indicates whether the unit name was explicitly provided (<code>PROVIDED</code>) or auto-generated (<code>GENERATED</code>)",
            "enum": [
              "PROVIDED",
              "GENERATED"
            ]
          },
          "category_id": {
            "type": "integer",
            "format": "int32",
            "description": "Category ID assigned to this unit"
          },
          "number_of_units": {
            "type": "integer",
            "format": "int32",
            "description": "Number of identical units of this type"
          },
          "smoking_policy": {
            "type": "string",
            "description": "Smoking policy for this unit",
            "enum": [
              "SMOKING",
              "NONSMOKING",
              "SMOKING_AND_NONSMOKING"
            ]
          },
          "size": {
            "$ref": "#/components/schemas/UnitCreateResponseSize"
          },
          "partner_reference_name": {
            "type": "string"
          },
          "floor_numbers_located_on": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/UnitCreateResponseOccupancy"
          },
          "occupancy_details": {
            "$ref": "#/components/schemas/UnitCreateResponseOccupancyDetails"
          },
          "extra_beds_configuration": {
            "$ref": "#/components/schemas/UnitCreateResponseExtraBedsConfiguration"
          }
        }
      },
      "UnitCreateResponseBedConfiguration": {
        "properties": {
          "beds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bed"
            }
          },
          "is_default_configuration": {
            "type": "boolean"
          }
        }
      },
      "UnitCreateResponseConfiguration": {
        "properties": {
          "unit_type_id": {
            "type": "integer",
            "format": "int32"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitCreateResponseRoom"
            }
          }
        }
      },
      "UnitCreateResponseExtraBedsConfiguration": {
        "properties": {
          "extra_beds": {
            "type": "integer",
            "format": "int32"
          },
          "cribs": {
            "type": "integer",
            "format": "int32"
          },
          "is_crib_and_extra_bed_allowed": {
            "type": "boolean"
          }
        }
      },
      "UnitCreateResponseOccupancy": {
        "deprecated": true,
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32"
          },
          "max_adults": {
            "type": "integer",
            "format": "int32"
          },
          "max_children": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UnitCreateResponseOccupancyDetails": {
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32"
          },
          "max_adults": {
            "type": "integer",
            "format": "int32"
          },
          "max_children": {
            "type": "integer",
            "format": "int32"
          },
          "max_infants": {
            "type": "integer",
            "format": "int32"
          },
          "max_infants_on_top": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UnitCreateResponseRoom": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "BEDROOM_SUBROOM",
              "LIVING_ROOM_SUBROOM",
              "GUEST_ROOM"
            ]
          },
          "bed_configurations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitCreateResponseBedConfiguration"
            }
          }
        }
      },
      "UnitCreateResponseSize": {
        "properties": {
          "value": {
            "type": "number",
            "format": "double"
          },
          "unit": {
            "type": "string",
            "enum": [
              "SQM",
              "SQFT"
            ]
          }
        }
      },
      "BedConfiguration": {
        "description": "<ul>\n<li>For multi-room unit you must add exactly one bed configuration</li>\n<li>For single-room unit you must add at least one bed configuration, others are optional</li>\n<li>Bed type ID provided must exist and be active in meta (see <code>$.bed_types[*].is_active</code>)</li>\n<li>Same bed type ID must be repeated within a single bed configuration</li>\n</ul>\n",
        "properties": {
          "beds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bed"
            },
            "minItems": 1
          },
          "is_default_configuration": {
            "type": "boolean",
            "description": "Exactly one default bed configuration is mandatory for each room provided"
          }
        },
        "required": [
          "beds",
          "is_default_configuration"
        ]
      },
      "Configuration": {
        "properties": {
          "unit_type_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>Must exist and be active in meta (see <code>$.unit_type[*].id</code> and <code>$.unit_type[*].is_active</code>) for unit creation/update</li>\n<li>Must be valid for property's category in meta (see <code>$.unit_type[*].valid_property_categories</code>)</li>\n</ul>\n"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Room"
            },
            "minItems": 1
          }
        },
        "required": [
          "rooms",
          "unit_type_id"
        ]
      },
      "ExtraBedsConfigurationCreate": {
        "description": "Extra bed & crib options",
        "properties": {
          "extra_beds": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Number of extra beds you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "cribs": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Number of cribs you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "is_crib_and_extra_bed_allowed": {
            "type": "boolean",
            "default": false,
            "description": "Both extra beds and cribs can be provided (<code>true</code>) or only one of the options (<code>false</code>)?"
          }
        }
      },
      "OccupancyCreate": {
        "deprecated": true,
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of children (0-17 years old)",
            "maximum": 49,
            "minimum": 0
          }
        }
      },
      "OccupancyDetailsCreate": {
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of children excluding infants (3-17 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of infants (0-2 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants_on_top": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "description": "Maximum number of infants (0-2 years old) on top of maximum number of guests",
            "maximum": 49,
            "minimum": 0
          }
        }
      },
      "Room": {
        "properties": {
          "type": {
            "type": "string",
            "description": "<ul>\n<li>For multi-room units you must add one or more <code>BEDROOM_SUBROOM</code> or <code>LIVING_ROOM_SUBROOM</code>, at least one of the rooms must have beds</li>\n<li>For single-room units you must add exactly one <code>GUEST_ROOM</code></li>\n</ul>\n",
            "enum": [
              "BEDROOM_SUBROOM",
              "LIVING_ROOM_SUBROOM",
              "GUEST_ROOM"
            ]
          },
          "bed_configurations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BedConfiguration"
            }
          }
        },
        "required": [
          "type"
        ]
      },
      "Size": {
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "description": "Must be a value between 1 and 9999.99"
          },
          "unit": {
            "type": "string",
            "description": "SQM (square meters) or SQFT (square feet)",
            "enum": [
              "SQM",
              "SQFT"
            ]
          }
        },
        "required": [
          "unit",
          "value"
        ]
      },
      "UnitCreate": {
        "description": "Unit creation schema; use meta endpoint for fetching relevant meta data",
        "properties": {
          "configuration": {
            "$ref": "#/components/schemas/Configuration"
          },
          "unit_name_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>The list of available unit names can be found in meta (see <code>$.unit_names</code>)</li>\n<li>Set <code>debug_info</code> as <code>true</code> to retrieve the generated unit name (see <code>$.unit_name_fallback</code>)</li>\n</ul>\n"
          },
          "number_of_units": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "description": "Number of units must be between 0 and 32000"
          },
          "smoking_policy": {
            "type": "string",
            "default": "SMOKING_AND_NONSMOKING",
            "enum": [
              "SMOKING",
              "NONSMOKING",
              "SMOKING_AND_NONSMOKING"
            ]
          },
          "size": {
            "$ref": "#/components/schemas/Size"
          },
          "partner_reference_name": {
            "type": "string",
            "description": "Internal room name, visible only in API and Extranet"
          },
          "floor_numbers_located_on": {
            "type": "array",
            "description": "One or more floors where the unit is located; 0 is a ground floor",
            "items": {
              "type": "integer",
              "format": "int32",
              "description": "One or more floors where the unit is located; 0 is a ground floor"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/OccupancyCreate"
          },
          "occupancy_details": {
            "$ref": "#/components/schemas/OccupancyDetailsCreate"
          },
          "extra_beds_configuration": {
            "$ref": "#/components/schemas/ExtraBedsConfigurationCreate"
          }
        },
        "required": [
          "configuration"
        ]
      },
      "ApiResponseUnit": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/Unit"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "ExtraBedsConfiguration": {
        "description": "Extra bed & crib options",
        "properties": {
          "extra_beds": {
            "type": "integer",
            "format": "int32",
            "description": "Number of extra beds you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "cribs": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cribs you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "is_crib_and_extra_bed_allowed": {
            "type": "boolean",
            "description": "Both extra beds and cribs can be provided (<code>true</code>) or only one of the options (<code>false</code>)?"
          }
        },
        "required": [
          "cribs",
          "extra_beds",
          "is_crib_and_extra_bed_allowed"
        ]
      },
      "Occupancy": {
        "deprecated": true,
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of children (0-17 years old)",
            "maximum": 49,
            "minimum": 0
          }
        },
        "required": [
          "max_adults",
          "max_children",
          "max_guests"
        ]
      },
      "OccupancyDetails": {
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of children excluding infants (3-17 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of infants (0-2 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants_on_top": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of infants (0-2 years old) on top of maximum number of guests",
            "maximum": 49,
            "minimum": 0
          }
        },
        "required": [
          "max_adults",
          "max_children",
          "max_guests",
          "max_infants",
          "max_infants_on_top"
        ]
      },
      "Unit": {
        "description": "Unit schema; use meta endpoint for fetching relevant meta data",
        "properties": {
          "unit_id": {
            "type": "integer",
            "format": "int64"
          },
          "configuration": {
            "$ref": "#/components/schemas/Configuration"
          },
          "unit_name_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>The list of available unit names can be found in meta (see <code>$.unit_names</code>)</li>\n<li>Set <code>debug_info</code> as <code>true</code> to retrieve the generated unit name (see <code>$.unit_name_fallback</code>)</li>\n</ul>\n"
          },
          "number_of_units": {
            "type": "integer",
            "format": "int32",
            "description": "Number of units must be between 0 and 32000"
          },
          "smoking_policy": {
            "type": "string",
            "description": "Room smoking policy",
            "enum": [
              "SMOKING",
              "NONSMOKING",
              "SMOKING_AND_NONSMOKING"
            ]
          },
          "size": {
            "$ref": "#/components/schemas/Size"
          },
          "partner_reference_name": {
            "type": "string",
            "description": "Internal room name, visible only in API and Extranet"
          },
          "floor_numbers_located_on": {
            "type": "array",
            "description": "One or more floors where the unit is located; 0 is a ground floor",
            "items": {
              "type": "integer",
              "format": "int32",
              "description": "One or more floors where the unit is located; 0 is a ground floor"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/Occupancy"
          },
          "occupancy_details": {
            "$ref": "#/components/schemas/OccupancyDetails"
          },
          "extra_beds_configuration": {
            "$ref": "#/components/schemas/ExtraBedsConfiguration"
          },
          "unit_name_fallback": {
            "type": "string",
            "description": "Contains unit name (<code>EN_GB</code> locale) for any unit name ID, including those missing in meta (for debug purposes only; read only)"
          }
        }
      },
      "BulkUnitsUpdateRequest": {
        "description": "Bulk unit update request",
        "properties": {
          "units": {
            "type": "array",
            "description": "List of units to update. All units must belong to the same property. Maximum 100 units per request.",
            "items": {
              "$ref": "#/components/schemas/UnitUpdateRequest"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "units"
        ]
      },
      "ExtraBedsConfigurationUpdateRequest": {
        "properties": {
          "extra_beds": {
            "type": "integer",
            "format": "int32",
            "description": "Number of extra beds you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "cribs": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cribs you can provide",
            "maximum": 100,
            "minimum": 0
          },
          "is_crib_and_extra_bed_allowed": {
            "type": "boolean",
            "description": "Both extra beds and cribs can be provided (<code>true</code>) or only one of the options (<code>false</code>)?"
          }
        },
        "required": [
          "cribs",
          "extra_beds",
          "is_crib_and_extra_bed_allowed"
        ]
      },
      "OccupancyDetailsUpdateRequest": {
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of children excluding infants (3-17 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of infants (0-2 years old)",
            "maximum": 49,
            "minimum": 0
          },
          "max_infants_on_top": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of infants (0-2 years old) on top of maximum number of guests",
            "maximum": 49,
            "minimum": 0
          }
        },
        "required": [
          "max_adults",
          "max_children",
          "max_guests",
          "max_infants",
          "max_infants_on_top"
        ]
      },
      "OccupancyUpdateRequest": {
        "deprecated": true,
        "properties": {
          "max_guests": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of guests",
            "maximum": 50,
            "minimum": 1
          },
          "max_adults": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of adults",
            "maximum": 50,
            "minimum": 1
          },
          "max_children": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of children (0-17 years old)",
            "maximum": 49,
            "minimum": 0
          }
        },
        "required": [
          "max_adults",
          "max_children",
          "max_guests"
        ]
      },
      "UnitUpdateRequest": {
        "description": "Unit update schema",
        "properties": {
          "unit_id": {
            "type": "integer",
            "format": "int64",
            "description": "Id of the unit"
          },
          "property_id": {
            "type": "integer",
            "format": "int32",
            "description": "Property ID the unit belongs to. All units in a single request must belong to the same property."
          },
          "configuration": {
            "$ref": "#/components/schemas/ConfigurationRequest"
          },
          "unit_name_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>The list of available unit names can be found in meta (see <code>$.unit_names</code>)</li>\n<li>Set <code>debug_info</code> as <code>true</code> to retrieve the generated unit name (see <code>$.unit_name_fallback</code>)</li>\n</ul>\n"
          },
          "unit_name_source": {
            "type": "string",
            "description": " <ul>\n <li>PROVIDED uses the <code>unit_name_id</code> as the unit name source and <code>unit_name_id</code> must be set when using PROVIDED</li>\n <li>GENERATED generates the <code>unit_name_id</code> and <code>unit_name_id</code> must not be set when using GENERATED</li>\n </ul>\n",
            "enum": [
              "PROVIDED",
              "GENERATED"
            ]
          },
          "category_id": {
            "type": "integer",
            "format": "int32",
            "description": "<ul>\n<li>Category id for the unit</li>\n<li>Use meta to retrieve the supported categories (see <code>$.unit_categories</code>)</li>\n</ul>\n"
          },
          "number_of_units": {
            "type": "integer",
            "format": "int32",
            "description": "Number of units must be between 0 and 32000"
          },
          "smoking_policy": {
            "type": "string",
            "description": "Room smoking policy",
            "enum": [
              "SMOKING",
              "NONSMOKING",
              "SMOKING_AND_NONSMOKING"
            ]
          },
          "size": {
            "$ref": "#/components/schemas/SizeRequest"
          },
          "partner_reference_name": {
            "type": "string",
            "description": "Internal room name, visible only in API and Extranet"
          },
          "floor_numbers_located_on": {
            "type": "array",
            "description": "One or more floors where the unit is located; 0 is a ground floor",
            "items": {
              "type": "integer",
              "format": "int32",
              "description": "One or more floors where the unit is located; 0 is a ground floor"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/OccupancyUpdateRequest"
          },
          "occupancy_details": {
            "$ref": "#/components/schemas/OccupancyDetailsUpdateRequest"
          },
          "extra_beds_configuration": {
            "$ref": "#/components/schemas/ExtraBedsConfigurationUpdateRequest"
          }
        },
        "required": [
          "property_id",
          "unit_id"
        ]
      },
      "ApiResponseVoid": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "type": "null",
            "description": ""
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "ApiResponseObject": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "type": "null",
            "description": ""
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "ApiResponseListUnit": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Unit"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "ApiResponseUnitMeta": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/UnitMeta"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "BedType": {
        "properties": {
          "bed_type_id": {
            "type": "integer",
            "format": "int32"
          },
          "bed_type_name": {
            "type": "string"
          },
          "bed_type_description": {
            "type": "string"
          },
          "bed_type_description_imperial": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          }
        }
      },
      "PropertyCategory": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "code_ota": {
            "type": "integer",
            "format": "int32"
          },
          "code_booking_extended": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UnitCategory": {
        "properties": {
          "category_id": {
            "type": "integer",
            "format": "int32"
          },
          "category_name": {
            "type": "string"
          }
        }
      },
      "UnitMeta": {
        "properties": {
          "language_code": {
            "type": "string",
            "enum": [
              "EN_GB",
              "EN_US",
              "DE",
              "NL",
              "FR",
              "ES",
              "ES_AR",
              "ES_MX",
              "CA",
              "IT",
              "PT_PT",
              "PT_BR",
              "NO",
              "FI",
              "SV",
              "DA",
              "CS",
              "HU",
              "RO",
              "JA",
              "ZH_CN",
              "ZH_TW",
              "PL",
              "EL",
              "RU",
              "TR",
              "BG",
              "AR",
              "KA",
              "KO",
              "HE",
              "LV",
              "UK",
              "ID",
              "MS",
              "TH",
              "ET",
              "HR",
              "LT",
              "SK",
              "SR",
              "SL",
              "VI",
              "TL",
              "IS",
              "HI",
              "SQ"
            ]
          },
          "unit_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitType"
            }
          },
          "unit_names": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitName"
            }
          },
          "bed_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BedType"
            }
          },
          "property_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyCategory"
            }
          },
          "unit_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitCategory"
            }
          }
        }
      },
      "UnitName": {
        "properties": {
          "unit_name_id": {
            "type": "integer",
            "format": "int32"
          },
          "unit_name": {
            "type": "string"
          }
        }
      },
      "UnitType": {
        "properties": {
          "unit_type_id": {
            "type": "integer",
            "format": "int32"
          },
          "unit_type_name": {
            "type": "string"
          },
          "is_multi_room": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "valid_property_categories": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "suggested_unit_names": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitName"
            }
          }
        }
      },
      "BulkUnitsDeleteRequest": {
        "description": "Bulk unit delete request",
        "properties": {
          "units": {
            "type": "array",
            "description": "List of units to delete. All units must belong to the same property. Maximum 100 units per request.",
            "items": {
              "$ref": "#/components/schemas/UnitDeleteRequest"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "units"
        ]
      },
      "UnitDeleteRequest": {
        "description": "Unit delete schema",
        "properties": {
          "property_id": {
            "type": "integer",
            "format": "int32",
            "description": "Property ID the unit belongs to. All units in a single request must belong to the same property."
          },
          "unit_id": {
            "type": "integer",
            "format": "int64",
            "description": "Id of the unit to delete"
          }
        },
        "required": [
          "property_id",
          "unit_id"
        ]
      },
      "ApiResponseBulkUnitsCreateResponseError": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "type": "null",
            "description": "Always null when the request fails"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      },
      "ApiResponseVoidError": {
        "properties": {
          "ruid": {
            "type": "string",
            "writeOnly": true
          },
          "data": {
            "type": "null",
            "description": ""
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        }
      }
    }
  }
}