{
"swagger": "2.0",
"info": {
"title": "apaleo Inventory API",
"description": "Setup and manage properties (hotels, etc.) and all the entites in them to rent out:\nUnits such as rooms, parking lots, beds, meeting rooms, etc. Units can be combined into groups (single rooms, double rooms).",
"version": "v1"
},
"paths": {
"/inventory/v1/properties": {
"get": {
"tags": [
"Property"
],
"summary": "Get a properties list",
"description": "Get the list of properties.
You need to be authorized (no particular scope required)",
"operationId": "InventoryPropertiesGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "status",
"description": "Filter result by property status",
"type": "array",
"items": {
"enum": [
"Test",
"Live"
],
"type": "string"
}
},
{
"in": "query",
"name": "includeArchived",
"description": "Include archived properties in the result. If not set, or set to false, it only returns non-archived properties",
"type": "boolean"
},
{
"in": "query",
"name": "countryCode",
"description": "Filter result by country code",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "pageNumber",
"description": "Page number, 1-based. Default value is 1 (if this is not set or not positive). Results in 204 if there are no items on that page.",
"type": "integer",
"default": 1
},
{
"in": "query",
"name": "pageSize",
"description": "Page size. If this is not set or not positive, the pageNumber is ignored and all items are returned.",
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: actions. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"actions"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all properties.",
"schema": {
"$ref": "#/definitions/PropertyListModel"
}
},
"204": {
"description": "There are no properties found."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
},
"post": {
"tags": [
"Property"
],
"summary": "Creates a property",
"description": "Use this call to create a new property.
You must have at least one of these scopes: 'properties.create, setup.manage'.",
"operationId": "InventoryPropertiesPost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the property.",
"required": true,
"schema": {
"$ref": "#/definitions/CreatePropertyModel"
}
}
],
"responses": {
"201": {
"description": "Creation of the new property was successful.",
"schema": {
"$ref": "#/definitions/PropertyCreatedModel"
},
"headers": {
"Location": {
"description": "The location of the created resource.",
"type": "string"
}
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.create",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/properties/$count": {
"get": {
"tags": [
"Property"
],
"summary": "Return total count of properties",
"description": "Return total count of properties
You need to be authorized (no particular scope required)",
"operationId": "InventoryProperties$countGet",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CountModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/inventory/v1/properties/{id}": {
"head": {
"tags": [
"Property"
],
"summary": "Check if a property exists",
"description": "Check if a property exists by id.
You need to be authorized (no particular scope required)",
"operationId": "InventoryPropertiesByIdHead",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The property exists."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
}
},
"security": [
{
"oauth2": [ ]
}
]
},
"get": {
"tags": [
"Property"
],
"summary": "Get a property",
"description": "Get a property by id.
You need to be authorized (no particular scope required)",
"operationId": "InventoryPropertiesByIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "languages",
"description": "'all' or comma separated list of two-letter language codes (ISO Alpha-2)",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: actions. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"actions"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all the property data.",
"schema": {
"$ref": "#/definitions/PropertyModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
},
"patch": {
"tags": [
"Property"
],
"summary": "Allows to modify property",
"description": "Here's a list of allowed operations:\r\n- Replace Name\r\n- Add, replace and remove Description\r\n- Replace CompanyName\r\n- Add, replace and remove ManagingDirectors\r\n- Replace CommercialRegisterEntry\r\n- Replace TaxId\r\n- Replace Location\r\n- Add, replace and remove BankAccount\r\n- Replace PaymentTerms\r\n- Set IsTemplate
You must have at least one of these scopes: 'properties.manage, setup.manage'.",
"operationId": "InventoryPropertiesByIdPatch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Define the list of operations to be applied to the resource. Learn more about JSON Patch here: http://jsonpatch.com/.",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
],
"responses": {
"204": {
"description": "Success"
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.manage",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/property-actions/{id}/clone": {
"post": {
"tags": [
"PropertyActions"
],
"summary": "Clones a property",
"description": "Use this call to clone a specific property.\r\nThis operation creates a new property with inventory and rate plans from the specified property.
You must have at least one of these scopes: 'properties.create, setup.manage'.",
"operationId": "InventoryProperty-actionsByIdClonePost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property.",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the property.",
"required": true,
"schema": {
"$ref": "#/definitions/CreatePropertyModel"
}
}
],
"responses": {
"201": {
"description": "Cloning of the existing property was successful.",
"schema": {
"$ref": "#/definitions/PropertyCreatedModel"
},
"headers": {
"Location": {
"description": "The location of the created resource.",
"type": "string"
}
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.create",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/property-actions/{id}/archive": {
"put": {
"tags": [
"PropertyActions"
],
"summary": "Archive a property",
"description": "Use this endpoint to archive an existing live property\r\nThis operation set the IsArchived flag to true
You must have at least one of these scopes: 'properties.manage, setup.manage'.",
"operationId": "InventoryProperty-actionsByIdArchivePut",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.manage",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/property-actions/{id}/set-live": {
"put": {
"tags": [
"PropertyActions"
],
"summary": "Move property to live",
"description": "Use this endpoint to move an existing test property to live\r\nThis operation changes the property status to 'Live'
You must have at least one of these scopes: 'properties.manage, setup.manage'.",
"operationId": "InventoryProperty-actionsByIdSet-livePut",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.manage",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/property-actions/{id}/reset": {
"put": {
"tags": [
"PropertyActions"
],
"summary": "Reset a test property and delete all transactional data",
"description": "Use this endpoint to delete all transactional data related to some test property\r\nThis operation deletes all transactional data related to the specified property. The property must be in 'Test' status.
You must have at least one of these scopes: 'properties.manage, setup.manage'.",
"operationId": "InventoryProperty-actionsByIdResetPut",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the property",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"properties.manage",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/types/countries": {
"get": {
"tags": [
"Types"
],
"summary": "Returns a list of supported countries.",
"description": "Returns a list of ISO country codes that could be used to create properties.
You need to be authorized (no particular scope required)",
"operationId": "InventoryTypesCountriesGet",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Success.",
"schema": {
"$ref": "#/definitions/CountryListModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [ ]
}
]
}
},
"/inventory/v1/units/{id}": {
"patch": {
"tags": [
"Unit"
],
"summary": "Allows to patch unit",
"description": "Here's a list of allowed operations:\r\n- Set unit condition\r\n- Set unit description\r\n- Set unit name\r\n- Set unit unitGroupId\r\n- Set unit maxPersons\r\n- Add unit attribute\r\n- Remove unit attribute
You must have at least one of these scopes: 'units.manage, setup.manage'.",
"operationId": "InventoryUnitsByIdPatch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Define the list of operations to be applied to the resource. Learn more about JSON Patch here: http://jsonpatch.com/.",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
],
"responses": {
"200": {
"description": "Success"
},
"204": {
"description": "The unit was successfully modified."
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.manage",
"setup.manage",
"admin"
]
}
]
},
"get": {
"tags": [
"Unit"
],
"summary": "Get a unit",
"description": "Get a unit by id.
You must have at least one of these scopes: 'units.read, setup.read, setup.manage'.",
"operationId": "InventoryUnitsByIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "languages",
"description": "'all' or comma separated list of two-letter language codes (ISO Alpha-2)",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: property, unitGroup, connectedUnits. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"property",
"unitGroup",
"connectedUnits"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all the unit data.",
"schema": {
"$ref": "#/definitions/UnitModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"head": {
"tags": [
"Unit"
],
"summary": "Check if a unit exists",
"description": "Check if a unit exists by id.
You must have at least one of these scopes: 'units.read, setup.read, setup.manage'.",
"operationId": "InventoryUnitsByIdHead",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The unit exists."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
}
},
"security": [
{
"oauth2": [
"units.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"delete": {
"tags": [
"Unit"
],
"summary": "Delete a unit",
"description": "Use this call to delete a unit.
You must have at least one of these scopes: 'units.delete, setup.manage'.",
"operationId": "InventoryUnitsByIdDelete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Deletion of the unit was successful."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.delete",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/units": {
"patch": {
"tags": [
"Unit"
],
"summary": "Allows to patch one or more units",
"description": "Here's a list of allowed operations:\r\n- Set unit condition\r\n- Set unit description\r\n- Set unit name\r\n- Set unit unitGroupId\r\n- Set unit maxPersons\r\n- Add unit attribute\r\n- Remove unit attribute
You must have at least one of these scopes: 'units.manage, setup.manage'.",
"operationId": "InventoryUnitsPatch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "unitIds",
"required": true,
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "body",
"name": "body",
"description": "Define the list of operations to be applied to the resource. Learn more about JSON Patch here: http://jsonpatch.com/.",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
],
"responses": {
"204": {
"description": "Units were successfully modified."
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.manage",
"setup.manage",
"admin"
]
}
]
},
"get": {
"tags": [
"Unit"
],
"summary": "Get a units list",
"description": "Get the list of units.
You must have at least one of these scopes: 'units.read, setup.read, setup.manage'.",
"operationId": "InventoryUnitsGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "propertyId",
"description": "Return units for specific property",
"type": "string"
},
{
"in": "query",
"name": "unitGroupId",
"description": "Return units for the specific unit group - DEPRECATED: This property will be removed 20.04.2022. Use `UnitGroupIds` instead",
"type": "string"
},
{
"in": "query",
"name": "unitGroupIds",
"description": "Return units with the specific unit groups",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "unitAttributeIds",
"description": "Return units with the specific unit attributes",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "isOccupied",
"description": "Return only occupied or vacant units",
"type": "boolean"
},
{
"in": "query",
"name": "maintenanceType",
"description": "Return units with the specific maintenance type",
"type": "string",
"enum": [
"OutOfService",
"OutOfOrder",
"OutOfInventory"
]
},
{
"in": "query",
"name": "condition",
"description": "Return units with a specific condition",
"type": "string",
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
]
},
{
"in": "query",
"name": "textSearch",
"description": "This will filter all units where the provided text is contained in the unit name. The search is case insensitive.",
"type": "string"
},
{
"in": "query",
"name": "pageNumber",
"description": "Page number, 1-based. Default value is 1 (if this is not set or not positive). Results in 204 if there are no items on that page.",
"type": "integer",
"default": 1
},
{
"in": "query",
"name": "pageSize",
"description": "Page size. If this is not set or not positive, the pageNumber is ignored and all items are returned.",
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: property, unitGroup, connectedUnits. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"property",
"unitGroup",
"connectedUnits"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all units.",
"schema": {
"$ref": "#/definitions/UnitListModel"
}
},
"204": {
"description": "No units were found."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"post": {
"tags": [
"Unit"
],
"summary": "Create a unit",
"description": "Use this call to create a new unit.
You must have at least one of these scopes: 'units.create, setup.manage'.",
"operationId": "InventoryUnitsPost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the unit.",
"required": true,
"schema": {
"$ref": "#/definitions/CreateUnitModel"
}
}
],
"responses": {
"201": {
"description": "Creation of the new unit was successful.",
"schema": {
"$ref": "#/definitions/UnitCreatedModel"
},
"headers": {
"Location": {
"description": "The location of the created resource.",
"type": "string"
}
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.create",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/units/$count": {
"get": {
"tags": [
"Unit"
],
"summary": "Returns number of units",
"description": "Returns number of units matching the filter criteria
You must have at least one of these scopes: 'units.read, setup.read, setup.manage'.",
"operationId": "InventoryUnits$countGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "propertyId",
"description": "Return units for specific property",
"type": "string"
},
{
"in": "query",
"name": "unitGroupId",
"description": "Return units for the specific unit group - DEPRECATED: This property will be removed 20.04.2022. Use `UnitGroupIds` instead",
"type": "string"
},
{
"in": "query",
"name": "unitGroupIds",
"description": "Return units with the specific unit groups",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "unitAttributeIds",
"description": "Return units with the specific unit attributes",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "isOccupied",
"description": "Return only occupied or vacant units",
"type": "boolean"
},
{
"in": "query",
"name": "maintenanceType",
"description": "Return units with the specific maintenance type",
"type": "string",
"enum": [
"OutOfService",
"OutOfOrder",
"OutOfInventory"
]
},
{
"in": "query",
"name": "condition",
"description": "Return units with a specific condition",
"type": "string",
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
]
},
{
"in": "query",
"name": "textSearch",
"description": "This will filter all units where the provided text is contained in the unit name. The search is case insensitive.",
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CountModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/units/bulk": {
"post": {
"tags": [
"Unit"
],
"summary": "Create multiple units",
"description": "Use this call to create multiple units, following a naming rule.
You must have at least one of these scopes: 'units.create, setup.manage'.",
"operationId": "InventoryUnitsBulkPost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the units.",
"required": true,
"schema": {
"$ref": "#/definitions/BulkCreateUnitsModel"
}
}
],
"responses": {
"200": {
"description": "Success.",
"schema": {
"$ref": "#/definitions/BulkUnitsCreatedModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"units.create",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/unit-attributes/{id}": {
"get": {
"tags": [
"UnitAttribute"
],
"summary": "Get unit attribute by id",
"description": "Get unit attribute by id
You must have at least one of these scopes: 'unitattributes.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-attributesByIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit attribute",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returns unit attribute with specified id",
"schema": {
"$ref": "#/definitions/UnitAttributeDefinitionModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitattributes.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"patch": {
"tags": [
"UnitAttribute"
],
"summary": "Allows to modify unit attribute",
"description": "Here's a list of allowed operations:\r\n- Replace / Remove Description
You must have at least one of these scopes: 'unitattributes.manage, setup.manage'.",
"operationId": "InventoryUnit-attributesByIdPatch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "Id of unit attribute",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Define the list of operations to be applied to the resource. Learn more about JSON Patch here: http://jsonpatch.com/.",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitattributes.manage",
"setup.manage",
"admin"
]
}
]
},
"delete": {
"tags": [
"UnitAttribute"
],
"summary": "Deletes unit attribute",
"description": "Deletes unit attribute
You must have at least one of these scopes: 'unitattributes.delete, setup.manage'.",
"operationId": "InventoryUnit-attributesByIdDelete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "Id of unit attribute",
"required": true,
"type": "string"
}
],
"responses": {
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitattributes.delete",
"setup.manage",
"admin"
]
}
]
},
"head": {
"tags": [
"UnitAttribute"
],
"summary": "Check if a unit attribute exists",
"description": "Check if a unit attribute exists
You must have at least one of these scopes: 'unitattributes.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-attributesByIdHead",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit attribute.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The unit attribute exists."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
}
},
"security": [
{
"oauth2": [
"unitattributes.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/unit-attributes": {
"get": {
"tags": [
"UnitAttribute"
],
"summary": "Get unit attribute list",
"description": "Get unit attribute list
You must have at least one of these scopes: 'unitattributes.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-attributesGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "pageNumber",
"description": "Page number, 1-based. Default value is 1 (if this is not set or not positive). Results in 204 if there are no items on that page.",
"type": "integer",
"default": 1
},
{
"in": "query",
"name": "pageSize",
"description": "Page size. If this is not set or not positive, the pageNumber is ignored and all items are returned.",
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "Returns unit attribute list for given account",
"schema": {
"$ref": "#/definitions/UnitAttributeDefinitionListModel"
}
},
"204": {
"description": "No unit attributes present for given account"
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitattributes.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"post": {
"tags": [
"UnitAttribute"
],
"summary": "Create a unit attribute",
"description": "Use this call to create a new unit attribute.
You must have at least one of these scopes: 'unitattributes.create, setup.manage'.",
"operationId": "InventoryUnit-attributesPost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The unit attribute.",
"required": true,
"schema": {
"$ref": "#/definitions/CreateUnitAttributeDefinitionModel"
}
}
],
"responses": {
"201": {
"description": "Creation of the new unit attribute was successful.",
"schema": {
"$ref": "#/definitions/UnitAttributeDefinitionCreatedModel"
},
"headers": {
"Location": {
"description": "The location of the created resource.",
"type": "string"
}
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitattributes.create",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/unit-groups": {
"post": {
"tags": [
"UnitGroup"
],
"summary": "Create a unit group",
"description": "Use this call to create a new unit group.
You must have at least one of these scopes: 'unitgroups.create, setup.manage'.",
"operationId": "InventoryUnit-groupsPost",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Idempotency-Key",
"description": "Unique key for safely retrying requests without accidentally performing the same operation twice. \nWe'll always send back the same response for requests made with the same key, \nand keys can't be reused with different request parameters. Keys expire after 24 hours.",
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the unit group.",
"required": true,
"schema": {
"$ref": "#/definitions/CreateUnitGroupModel"
}
}
],
"responses": {
"201": {
"description": "Creation of the new unit group was successful.",
"schema": {
"$ref": "#/definitions/UnitGroupCreatedModel"
},
"headers": {
"Location": {
"description": "The location of the created resource.",
"type": "string"
}
}
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.create",
"setup.manage",
"admin"
]
}
]
},
"get": {
"tags": [
"UnitGroup"
],
"summary": "Get all unit groups, or all unit groups for a property",
"description": "Get the list of unit groups.
You must have at least one of these scopes: 'unitgroups.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-groupsGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "propertyId",
"description": "Return unit groups for specific property",
"type": "string"
},
{
"in": "query",
"name": "unitGroupTypes",
"type": "array",
"items": {
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot",
"Other"
],
"type": "string"
}
},
{
"in": "query",
"name": "pageNumber",
"description": "Page number, 1-based. Default value is 1 (if this is not set or not positive). Results in 204 if there are no items on that page.",
"type": "integer",
"default": 1
},
{
"in": "query",
"name": "pageSize",
"description": "Page size. If this is not set or not positive, the pageNumber is ignored and all items are returned.",
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: property, connectedUnitGroups. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"property",
"connectedUnitGroups"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all unit groups.",
"schema": {
"$ref": "#/definitions/UnitGroupListModel"
}
},
"204": {
"description": "There are no unit groups found."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/unit-groups/$count": {
"get": {
"tags": [
"UnitGroup"
],
"summary": "Returns number of unit groups",
"description": "Returns number of unit groups matching the filter criteria
You must have at least one of these scopes: 'unitgroups.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-groups$countGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "propertyId",
"description": "Return unit groups for specific property",
"type": "string"
},
{
"in": "query",
"name": "unitGroupTypes",
"type": "array",
"items": {
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot",
"Other"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CountModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
}
},
"/inventory/v1/unit-groups/{id}": {
"head": {
"tags": [
"UnitGroup"
],
"summary": "Check if a unit group exists",
"description": "Check if a unit group exists by id.
You must have at least one of these scopes: 'unitgroups.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-groupsByIdHead",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit group.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The unit group exists."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
}
},
"security": [
{
"oauth2": [
"unitgroups.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"get": {
"tags": [
"UnitGroup"
],
"summary": "Get a unit group",
"description": "Get a unit group by id.
You must have at least one of these scopes: 'unitgroups.read, setup.read, setup.manage'.",
"operationId": "InventoryUnit-groupsByIdGet",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit group.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "languages",
"description": "'all' or comma separated list of two-letter language codes (ISO Alpha-2)",
"type": "array",
"items": {
"type": "string"
}
},
{
"in": "query",
"name": "expand",
"description": "List of all embedded resources that should be expanded in the response. Possible values are: property, connectedUnitGroups. All other values will be silently ignored.",
"type": "array",
"items": {
"enum": [
"property",
"connectedUnitGroups"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Return all the unit group data.",
"schema": {
"$ref": "#/definitions/UnitGroupModel"
}
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.read",
"setup.read",
"setup.manage",
"admin"
]
}
]
},
"put": {
"tags": [
"UnitGroup"
],
"summary": "Replace a unit group",
"description": "Use this call to modify a unit group.
You must have at least one of these scopes: 'unitgroups.manage, setup.manage'.",
"operationId": "InventoryUnit-groupsByIdPut",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit group.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The definition of the unit group.",
"required": true,
"schema": {
"$ref": "#/definitions/ReplaceUnitGroupModel"
}
}
],
"responses": {
"200": {
"description": "Success"
},
"204": {
"description": "Replace of the unit group was successful."
},
"404": {
"description": "The Request-URI could not be found."
},
"415": {
"description": "Unsupported media type."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.manage",
"setup.manage",
"admin"
]
}
]
},
"delete": {
"tags": [
"UnitGroup"
],
"summary": "Delete a unit group",
"description": "Use this call to delete a unit group.
You must have at least one of these scopes: 'unitgroups.delete, setup.manage'.",
"operationId": "InventoryUnit-groupsByIdDelete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id of the unit group.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Deletion of the unit group was successful."
},
"404": {
"description": "The Request-URI could not be found."
},
"400": {
"description": "Bad request."
},
"401": {
"description": "You are unauthorized."
},
"403": {
"description": "Forbidden."
},
"500": {
"description": "An unexpected error occurred."
},
"503": {
"description": "The server is currently unavailable. Please try later."
},
"422": {
"description": "Validation errors in the request body or query params.",
"schema": {
"$ref": "#/definitions/MessageItemCollection"
}
}
},
"security": [
{
"oauth2": [
"unitgroups.delete",
"setup.manage",
"admin"
]
}
]
}
}
},
"definitions": {
"ActionModel[PropertyAction,NotAllowedPropertyActionReason]": {
"required": [
"action",
"isAllowed"
],
"type": "object",
"properties": {
"action": {
"enum": [
"Delete",
"Archive",
"SetLive",
"Reset"
],
"type": "string"
},
"isAllowed": {
"type": "boolean"
},
"reasons": {
"type": "array",
"items": {
"$ref": "#/definitions/ActionReasonModel[NotAllowedPropertyActionReason]"
}
}
}
},
"ActionReasonModel[NotAllowedPropertyActionReason]": {
"required": [
"code",
"message"
],
"type": "object",
"properties": {
"code": {
"enum": [
"DeleteNotAllowedForPropertyNotInStatusTest",
"ArchiveNotAllowedForPropertyNotInStatusLive",
"ArchiveNotAllowedForPropertyWhichIsAlreadyArchived",
"SetToLiveNotAllowedForPropertyNotInStatusTest",
"SetToLiveNotAllowedForPropertyInNonLiveAccount",
"ResetNotAllowedForPropertyNotInStatusTest"
],
"type": "string"
},
"message": {
"minLength": 1,
"type": "string"
}
}
},
"AddressModel": {
"required": [
"addressLine1",
"city",
"countryCode",
"postalCode"
],
"type": "object",
"properties": {
"addressLine1": {
"minLength": 1,
"type": "string"
},
"addressLine2": {
"type": "string"
},
"postalCode": {
"minLength": 1,
"type": "string"
},
"city": {
"minLength": 1,
"type": "string"
},
"regionCode": {
"type": "string"
},
"countryCode": {
"type": "string"
}
}
},
"BankAccountModel": {
"type": "object",
"properties": {
"iban": {
"type": "string"
},
"bic": {
"type": "string"
},
"bank": {
"type": "string"
}
}
},
"BulkCreateUnitsModel": {
"required": [
"units"
],
"type": "object",
"properties": {
"units": {
"type": "array",
"items": {
"$ref": "#/definitions/CreateUnitModel"
}
}
},
"example": "{\n \"units\": [\n {\n \"propertyId\": \"MUC\",\n \"name\": \"A.201\",\n \"description\": {\n \"en\": \"Single room\",\n \"de\": \"Einzelzimmer\"\n },\n \"unitGroupId\": \"MUC-SGL\",\n \"maxPersons\": 1,\n \"condition\": \"Clean\",\n \"attributes\": [],\n \"connectedUnits\": []\n },\n {\n \"propertyId\": \"MUC\",\n \"name\": \"A.103\",\n \"description\": {\n \"en\": \"Double room\",\n \"de\": \"Doppelzimmer\"\n },\n \"unitGroupId\": \"MUC-DBL\",\n \"maxPersons\": 2,\n \"condition\": \"Clean\",\n \"attributes\": [],\n \"connectedUnits\": []\n },\n {\n \"propertyId\": \"MUC\",\n \"name\": \"S.102\",\n \"description\": {\n \"en\": \"Suite room\",\n \"de\": \"Suite Zimmer\"\n },\n \"unitGroupId\": \"MUC-SUI\",\n \"maxPersons\": 3,\n \"condition\": \"Clean\",\n \"attributes\": [],\n \"connectedUnits\": [\n {\n \"unitId\": \"MUC-MTA\"\n },\n {\n \"unitId\": \"MUC-JQI\"\n }\n ]\n }\n ]\n}"
},
"BulkUnitsCreatedModel": {
"required": [
"ids"
],
"type": "object",
"properties": {
"ids": {
"description": "The unit ids",
"type": "array",
"items": {
"type": "string"
}
}
},
"example": "{\n \"ids\": [\n \"MUC-CFP\",\n \"MUC-XTA\",\n \"MUC-CPZ\"\n ]\n}"
},
"ConnectedUnitGroupModel": {
"required": [
"description",
"id",
"memberCount",
"name"
],
"type": "object",
"properties": {
"id": {
"description": "The unit group id",
"type": "string"
},
"name": {
"description": "The name for the unit group",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit group",
"minLength": 1,
"type": "string"
},
"memberCount": {
"format": "int32",
"description": "The number of units taken from this connected unit group",
"type": "integer"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit group",
"type": "integer"
}
}
},
"ConnectedUnitModel": {
"required": [
"condition",
"description",
"id",
"maxPersons",
"name",
"unitGroupId"
],
"type": "object",
"properties": {
"id": {
"description": "The unit id",
"type": "string"
},
"name": {
"description": "The name for the unit",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit",
"minLength": 1,
"type": "string"
},
"unitGroupId": {
"description": "The unit group id",
"type": "string"
},
"condition": {
"description": "The current status of the unit",
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
],
"type": "string"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit",
"type": "integer"
}
}
},
"CountModel": {
"required": [
"count"
],
"type": "object",
"properties": {
"count": {
"format": "int64",
"type": "integer"
}
},
"example": "{\n \"count\": 50\n}"
},
"CountryListModel": {
"required": [
"countryCodes"
],
"type": "object",
"properties": {
"countryCodes": {
"description": "List of ISO country codes.",
"type": "array",
"items": {
"type": "string"
}
}
},
"example": "{\n \"countryCodes\": [\n \"DE\",\n \"US\"\n ]\n}"
},
"CreateAddressModel": {
"required": [
"addressLine1",
"city",
"countryCode",
"postalCode"
],
"type": "object",
"properties": {
"addressLine1": {
"minLength": 1,
"type": "string"
},
"addressLine2": {
"type": "string"
},
"postalCode": {
"minLength": 1,
"type": "string"
},
"city": {
"minLength": 1,
"type": "string"
},
"regionCode": {
"description": "The ISO 3166-2 code",
"maxLength": 6,
"minLength": 2,
"type": "string"
},
"countryCode": {
"description": "The country code, in ISO 3166-1 alpha-2 code",
"maxLength": 2,
"minLength": 2,
"type": "string"
}
}
},
"CreateConnectedUnitGroupModel": {
"required": [
"memberCount",
"unitGroupId"
],
"type": "object",
"properties": {
"unitGroupId": {
"description": "The connected unit group id",
"type": "string"
},
"memberCount": {
"format": "int32",
"description": "The number of units for this connected unit group",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
}
}
},
"CreateConnectedUnitModel": {
"required": [
"unitId"
],
"type": "object",
"properties": {
"unitId": {
"description": "The connected unit id",
"type": "string"
}
}
},
"CreatePropertyModel": {
"required": [
"code",
"commercialRegisterEntry",
"companyName",
"currencyCode",
"defaultCheckInTime",
"defaultCheckOutTime",
"location",
"name",
"paymentTerms",
"taxId",
"timeZone"
],
"type": "object",
"properties": {
"code": {
"description": "The code for the property that can be shown in reports and table views",
"maxLength": 10,
"minLength": 3,
"pattern": "^[a-zA-Z0-9_]*$",
"type": "string"
},
"name": {
"description": "The name for the property",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"companyName": {
"description": "The legal name of the company running the property.",
"minLength": 1,
"type": "string"
},
"managingDirectors": {
"description": "The managing director(s) of the company, as they should appear on invoices",
"type": "string"
},
"commercialRegisterEntry": {
"description": "The entry in the Commercial Reigster of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"taxId": {
"description": "The Tax-ID of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the property",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"location": {
"$ref": "#/definitions/CreateAddressModel"
},
"bankAccount": {
"$ref": "#/definitions/BankAccountModel"
},
"paymentTerms": {
"description": "The payment terms used for all rate plans",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"timeZone": {
"description": "The time zone name of the property from the IANA Time Zone Database.\r\n(see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)",
"minLength": 1,
"type": "string"
},
"defaultCheckInTime": {
"description": "The default check-in time
A time (without fractional second part) as defined in the ISO8601:2004",
"type": "string"
},
"defaultCheckOutTime": {
"description": "The default check-out time
A time (without fractional second part) as defined in the ISO8601:2004",
"type": "string"
},
"currencyCode": {
"description": "The currency a property works with.",
"type": "string"
}
},
"example": "{\n \"code\": \"MUC\",\n \"name\": {\n \"en\": \"Demo Hotel Munich\",\n \"de\": \"Demo Hotel München\"\n },\n \"companyName\": \"Hotel Münchner GmbH\",\n \"managingDirectors\": \"Franz-Josef Gruber\",\n \"commercialRegisterEntry\": \"Amtsgericht München, HRB 279336\",\n \"taxId\": \"DE311053702\",\n \"description\": {\n \"en\": \"This is the demo hotel Munich\",\n \"de\": \"Dies ist das Demo Hotel München\"\n },\n \"location\": {\n \"addressLine1\": \"Marienplatz 1\",\n \"postalCode\": \"80331\",\n \"city\": \"München\",\n \"countryCode\": \"DE\"\n },\n \"bankAccount\": {\n \"iban\": \"DE44 5001 0517 5407 3249 31\",\n \"bic\": \"SSKMDEMMXXX\",\n \"bank\": \"Stadtsparkasse München\"\n },\n \"paymentTerms\": {\n \"en\": \"Pay on checkout\",\n \"de\": \"Zahlung bei Checkout\"\n },\n \"timeZone\": \"Europe/Berlin\",\n \"defaultCheckInTime\": \"17:00:00\",\n \"defaultCheckOutTime\": \"11:00:00\",\n \"currencyCode\": \"EUR\"\n}"
},
"CreateUnitAttributeDefinitionModel": {
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"description": "The name of the unit attribute",
"maxLength": 50,
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description of the unit attribute",
"type": "string"
}
},
"example": "{\n \"name\": \"Floor 1\",\n \"description\": \"Floor number\"\n}"
},
"CreateUnitAttributeModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "Id of unit attribute",
"type": "string"
}
}
},
"CreateUnitGroupModel": {
"required": [
"code",
"description",
"maxPersons",
"name",
"propertyId"
],
"type": "object",
"properties": {
"code": {
"description": "The code for the unit group that can be shown in reports and table views",
"maxLength": 10,
"minLength": 3,
"pattern": "^[a-zA-Z0-9_]*$",
"type": "string"
},
"propertyId": {
"description": "The id of the property where unit group will be created",
"type": "string"
},
"name": {
"description": "The name for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"description": {
"description": "The description for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit group",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
},
"rank": {
"format": "int32",
"description": "The unit group rank\r\nRestrictions:\r\n- Should be greater or equal to one",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
},
"type": {
"description": "The unit group type",
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot"
],
"type": "string"
},
"connectedUnitGroups": {
"description": "The list of connected unit groups this unit group is composed of",
"type": "array",
"items": {
"$ref": "#/definitions/CreateConnectedUnitGroupModel"
}
}
},
"example": "{\n \"code\": \"DBL\",\n \"propertyId\": \"MUC\",\n \"name\": {\n \"en\": \"Double Room\",\n \"de\": \"Doppelzimmer\"\n },\n \"description\": {\n \"en\": \"This is a nice room with as kingsize bed and flat screen\",\n \"de\": \"Dies ist ein schönes Zimmer mit Kingsize-Bett und Flachbildschirm\"\n },\n \"maxPersons\": 4,\n \"rank\": 1,\n \"type\": \"BedRoom\"\n}"
},
"CreateUnitModel": {
"required": [
"description",
"maxPersons",
"name",
"propertyId"
],
"type": "object",
"properties": {
"propertyId": {
"description": "The id of the property where the unit will be created",
"type": "string"
},
"name": {
"description": "The name for the unit",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"unitGroupId": {
"description": "The id of the unit group",
"type": "string"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
},
"condition": {
"description": "Condition of the unit",
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
],
"type": "string"
},
"attributes": {
"description": "Collection of user defined attributes of unit",
"type": "array",
"items": {
"$ref": "#/definitions/CreateUnitAttributeModel"
}
},
"connectedUnits": {
"description": "The list of units this unit is composed of",
"type": "array",
"items": {
"$ref": "#/definitions/CreateConnectedUnitModel"
}
}
},
"example": "{\n \"propertyId\": \"MUC\",\n \"name\": \"S.102\",\n \"description\": {\n \"en\": \"Suite room\",\n \"de\": \"Suite Zimmer\"\n },\n \"unitGroupId\": \"MUC-SUI\",\n \"maxPersons\": 3,\n \"condition\": \"Clean\",\n \"attributes\": [],\n \"connectedUnits\": [\n {\n \"unitId\": \"MUC-MTA\"\n },\n {\n \"unitId\": \"MUC-JQI\"\n }\n ]\n}"
},
"EmbeddedPropertyModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The property id",
"type": "string"
},
"code": {
"description": "The code for the property that can be shown in reports and table views",
"type": "string"
},
"name": {
"description": "The name for the property",
"type": "string"
},
"description": {
"description": "The description for the property",
"type": "string",
"readOnly": true
}
}
},
"EmbeddedUnitGroupModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The unit group id",
"type": "string"
},
"code": {
"description": "The code for the unit group that can be shown in reports and table views",
"type": "string"
},
"name": {
"description": "The name for the unit group",
"type": "string"
},
"description": {
"description": "The description for the unit group",
"type": "string"
},
"type": {
"description": "The unit group type",
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot",
"Other"
],
"type": "string"
}
}
},
"EmbeddedUnitModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The unit id",
"type": "string"
},
"name": {
"description": "The name for the unit",
"type": "string"
},
"description": {
"description": "The description for the unit",
"type": "string"
},
"unitGroupId": {
"description": "The unit group id",
"type": "string"
}
}
},
"MessageItemCollection": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
},
"Operation": {
"type": "object",
"properties": {
"value": { },
"path": {
"type": "string"
},
"op": {
"type": "string"
},
"from": {
"type": "string"
}
}
},
"PropertyCreatedModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The property id",
"type": "string"
}
},
"example": "{\n \"id\": \"MUC\"\n}"
},
"PropertyItemModel": {
"required": [
"code",
"commercialRegisterEntry",
"companyName",
"created",
"currencyCode",
"id",
"isArchived",
"isTemplate",
"location",
"name",
"paymentTerms",
"status",
"taxId",
"timeZone"
],
"type": "object",
"properties": {
"id": {
"description": "The property id",
"type": "string"
},
"code": {
"description": "The code for the property that can be shown in reports and table views",
"type": "string"
},
"propertyTemplateId": {
"description": "The id of the property used as a template while creating the property",
"type": "string"
},
"isTemplate": {
"description": "Whether the property can be used as a template for other properties",
"type": "boolean"
},
"name": {
"description": "The name for the property",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the property",
"type": "string"
},
"companyName": {
"description": "The legal name of the company running the property.",
"minLength": 1,
"type": "string"
},
"managingDirectors": {
"description": "The managing director(s) of the company, as they should appear on invoices",
"type": "string"
},
"commercialRegisterEntry": {
"description": "The entry in the Commercial Register of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"taxId": {
"description": "The Tax-ID of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"location": {
"$ref": "#/definitions/AddressModel"
},
"bankAccount": {
"$ref": "#/definitions/BankAccountModel"
},
"paymentTerms": {
"description": "The payment terms used for all rate plans",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"timeZone": {
"description": "The time zone name of the property from the IANA Time Zone Database.\r\n(see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)",
"minLength": 1,
"type": "string"
},
"currencyCode": {
"description": "The currency a property works with.",
"type": "string"
},
"created": {
"format": "date-time",
"description": "Date of creation
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"status": {
"description": "The status of the property",
"enum": [
"Test",
"Live"
],
"type": "string"
},
"isArchived": {
"description": "Is the property archived",
"type": "boolean"
},
"actions": {
"description": "The list of actions for this property",
"type": "array",
"items": {
"$ref": "#/definitions/ActionModel[PropertyAction,NotAllowedPropertyActionReason]"
}
}
}
},
"PropertyListModel": {
"required": [
"count",
"properties"
],
"type": "object",
"properties": {
"properties": {
"description": "List of properties",
"type": "array",
"items": {
"$ref": "#/definitions/PropertyItemModel"
}
},
"count": {
"format": "int64",
"description": "Total count of items",
"type": "integer"
}
},
"example": "{\n \"properties\": [\n {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"isTemplate\": true,\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\",\n \"companyName\": \"Company\",\n \"commercialRegisterEntry\": \"CRE\",\n \"taxId\": \"Tax\",\n \"location\": {\n \"addressLine1\": \"Marienplatz 1\",\n \"postalCode\": \"80331\",\n \"city\": \"München\",\n \"countryCode\": \"DE\"\n },\n \"paymentTerms\": {\n \"de\": \"Zahlbar bei Check In\",\n \"en\": \"Payment on check-in\"\n },\n \"timeZone\": \"Europe/Berlin\",\n \"currencyCode\": \"EUR\",\n \"created\": \"0001-01-01T00:00:00Z\",\n \"status\": \"Test\",\n \"isArchived\": false\n },\n {\n \"id\": \"BER\",\n \"code\": \"BER\",\n \"propertyTemplateId\": \"MUC\",\n \"isTemplate\": false,\n \"name\": \"Demo Hotel Berlin\",\n \"description\": \"This is the demo hotel Berlin\",\n \"companyName\": \"Company\",\n \"commercialRegisterEntry\": \"CRE\",\n \"taxId\": \"Tax\",\n \"location\": {\n \"addressLine1\": \"Mohrenstraße 30\",\n \"postalCode\": \"10117\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\"\n },\n \"paymentTerms\": {\n \"de\": \"Zahlbar bei Check In\",\n \"en\": \"Payment on check-in\"\n },\n \"timeZone\": \"Europe/Berlin\",\n \"currencyCode\": \"EUR\",\n \"created\": \"0001-01-01T00:00:00Z\",\n \"status\": \"Test\",\n \"isArchived\": false\n }\n ],\n \"count\": 0\n}"
},
"PropertyModel": {
"description": "With this request you can create a new property",
"required": [
"code",
"commercialRegisterEntry",
"companyName",
"created",
"currencyCode",
"id",
"isArchived",
"isTemplate",
"location",
"name",
"paymentTerms",
"status",
"taxId",
"timeZone"
],
"type": "object",
"properties": {
"id": {
"description": "The property id",
"type": "string"
},
"code": {
"description": "The code for the property that can be shown in reports and table views",
"type": "string"
},
"propertyTemplateId": {
"description": "The id of the property used as a template while creating the property",
"type": "string"
},
"isTemplate": {
"description": "Whether the property can be used as a template for other properties",
"type": "boolean"
},
"name": {
"description": "The name for the property",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"description": {
"description": "The description for the property",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"companyName": {
"description": "The legal name of the company running the property.",
"minLength": 1,
"type": "string"
},
"managingDirectors": {
"description": "The managing director(s) of the company, as they should appear on invoices",
"type": "string"
},
"commercialRegisterEntry": {
"description": "The entry in the Commercial Register of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"taxId": {
"description": "The Tax-ID of the company running the property, as it should appear on invoices",
"minLength": 1,
"type": "string"
},
"location": {
"$ref": "#/definitions/AddressModel"
},
"bankAccount": {
"$ref": "#/definitions/BankAccountModel"
},
"paymentTerms": {
"description": "The payment terms used for all rate plans",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"timeZone": {
"description": "The time zone name of the property from the IANA Time Zone Database.\r\n(see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)",
"minLength": 1,
"type": "string"
},
"currencyCode": {
"description": "The currency a property works with.",
"type": "string"
},
"created": {
"format": "date-time",
"description": "Date of creation
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"status": {
"description": "The status of the property",
"enum": [
"Test",
"Live"
],
"type": "string"
},
"isArchived": {
"description": "Is the property archived",
"type": "boolean"
},
"actions": {
"description": "The list of actions for this property",
"type": "array",
"items": {
"$ref": "#/definitions/ActionModel[PropertyAction,NotAllowedPropertyActionReason]"
}
}
},
"example": "{\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"propertyTemplateId\": \"BER\",\n \"isTemplate\": false,\n \"name\": {\n \"en\": \"Demo Hotel Munich\",\n \"de\": \"Demo Hotel München\"\n },\n \"description\": {\n \"en\": \"This is the demo hotel Munich\",\n \"de\": \"Dies ist das Demo Hotel München\"\n },\n \"companyName\": \"Hotel Münchner GmbH\",\n \"managingDirectors\": \"Franz-Josef Gruber\",\n \"commercialRegisterEntry\": \"Amtsgericht München, HRB 279336\",\n \"taxId\": \"DE311053702\",\n \"location\": {\n \"addressLine1\": \"Marienplatz 1\",\n \"postalCode\": \"80331\",\n \"city\": \"München\",\n \"countryCode\": \"DE\"\n },\n \"bankAccount\": {\n \"iban\": \"DE44 5001 0517 5407 3249 31\",\n \"bic\": \"SSKMDEMMXXX\",\n \"bank\": \"Stadtsparkasse München\"\n },\n \"paymentTerms\": {\n \"en\": \"Pay on checkout\",\n \"de\": \"Zahlung bei Checkout\"\n },\n \"timeZone\": \"Europe/Berlin\",\n \"currencyCode\": \"EUR\",\n \"created\": \"0001-01-01T00:00:00Z\",\n \"status\": \"Test\",\n \"isArchived\": false\n}"
},
"ReplaceConnectedUnitGroupModel": {
"required": [
"memberCount",
"unitGroupId"
],
"type": "object",
"properties": {
"unitGroupId": {
"description": "The connected unit group id",
"type": "string"
},
"memberCount": {
"format": "int32",
"description": "The number of units for this connected unit group",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
}
}
},
"ReplaceUnitGroupModel": {
"required": [
"description",
"name"
],
"type": "object",
"properties": {
"name": {
"description": "The name for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"description": {
"description": "The description for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit group.\r\nIf this value is increased, the surcharges for the related rate plans must be specified in order for the rate plans to be sellable for the new possible occupancies.",
"type": "integer"
},
"rank": {
"format": "int32",
"description": "The unit group rank\r\nRestrictions:\r\n- Should be greater or equal to one",
"maximum": 2147483647,
"minimum": 1,
"type": "integer"
},
"connectedUnitGroups": {
"description": "The list of connected unit groups this unit group is composed of",
"type": "array",
"items": {
"$ref": "#/definitions/ReplaceConnectedUnitGroupModel"
}
}
},
"example": "{\n \"name\": {\n \"en\": \"Double Room\",\n \"de\": \"Doppelzimmer\"\n },\n \"description\": {\n \"en\": \"This is a nice room with as kingsize bed and flat screen\",\n \"de\": \"Dies ist ein schönes Zimmer mit Kingsize-Bett und Flachbildschirm\"\n },\n \"maxPersons\": 4,\n \"rank\": 2\n}"
},
"UnitAttributeDefinitionCreatedModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The unit attribute id",
"type": "string"
}
},
"example": "{\n \"id\": \"FLOOR\"\n}"
},
"UnitAttributeDefinitionListModel": {
"required": [
"count",
"unitAttributes"
],
"type": "object",
"properties": {
"unitAttributes": {
"description": "List of unit attributes",
"type": "array",
"items": {
"$ref": "#/definitions/UnitAttributeDefinitionModel"
}
},
"count": {
"format": "int64",
"description": "Total count of items",
"type": "integer"
}
},
"example": "{\n \"unitAttributes\": [\n {\n \"id\": \"KQOSXHLS\",\n \"name\": \"Floor 1\",\n \"description\": \"Floor number\"\n },\n {\n \"id\": \"ADVFSSUL\",\n \"name\": \"Street view\",\n \"description\": \"View from the room\"\n }\n ],\n \"count\": 2\n}"
},
"UnitAttributeDefinitionModel": {
"required": [
"id",
"name"
],
"type": "object",
"properties": {
"id": {
"description": "The id of the unit attribute",
"type": "string"
},
"name": {
"description": "The name of the unit attribute",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description of the unit attribute",
"type": "string"
}
},
"example": "{\n \"id\": \"KQOSXHLS\",\n \"name\": \"Floor 1\",\n \"description\": \"Floor number\"\n}"
},
"UnitAttributeModel": {
"required": [
"id",
"name"
],
"type": "object",
"properties": {
"id": {
"description": "Id of unit attribute",
"type": "string"
},
"name": {
"description": "The name of the unit attribute",
"minLength": 1,
"type": "string"
},
"description": {
"description": "Description of unit attribute",
"type": "string"
}
}
},
"UnitCreatedModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The unit id",
"type": "string"
}
},
"example": "{\n \"id\": \"MUC-CFP\"\n}"
},
"UnitGroupCreatedModel": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "The unit group id",
"type": "string"
}
},
"example": "{\n \"id\": \"MUC-DBL\"\n}"
},
"UnitGroupItemModel": {
"required": [
"code",
"description",
"id",
"memberCount",
"name",
"property",
"type"
],
"type": "object",
"properties": {
"id": {
"description": "The unit group id",
"type": "string"
},
"code": {
"description": "The code for the unit group that can be shown in reports and table views",
"type": "string"
},
"name": {
"description": "The name for the unit group",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit group",
"minLength": 1,
"type": "string"
},
"memberCount": {
"format": "int32",
"description": "Number of units in this group",
"type": "integer"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit group",
"type": "integer"
},
"rank": {
"format": "int32",
"description": "The unit group rank",
"type": "integer"
},
"type": {
"description": "The unit group type",
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot",
"Other"
],
"type": "string"
},
"property": {
"$ref": "#/definitions/EmbeddedPropertyModel"
},
"connectedUnitGroups": {
"description": "The list of connected unit groups this unit group is composed of",
"type": "array",
"items": {
"$ref": "#/definitions/ConnectedUnitGroupModel"
}
}
}
},
"UnitGroupListModel": {
"required": [
"count",
"unitGroups"
],
"type": "object",
"properties": {
"unitGroups": {
"description": "List of unit groups",
"type": "array",
"items": {
"$ref": "#/definitions/UnitGroupItemModel"
}
},
"count": {
"format": "int64",
"description": "Total count of items",
"type": "integer"
}
},
"example": "{\n \"unitGroups\": [\n {\n \"id\": \"MUC-DBL\",\n \"code\": \"DBL\",\n \"name\": \"Double Room\",\n \"description\": \"This is a nice room with as kingsize bed and flat screen\",\n \"memberCount\": 2,\n \"maxPersons\": 4,\n \"rank\": 2,\n \"type\": \"BedRoom\",\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n }\n },\n {\n \"id\": \"BER-SUIT\",\n \"code\": \"SUIT\",\n \"name\": \"Suite Room\",\n \"description\": \"This is a nice suite with two rooms combined\",\n \"memberCount\": 1,\n \"maxPersons\": 3,\n \"rank\": 1,\n \"type\": \"BedRoom\",\n \"property\": {\n \"id\": \"BER\",\n \"code\": \"BER\",\n \"name\": \"Demo Hotel Berlin\",\n \"description\": \"This is the demo hotel Berlin\"\n },\n \"connectedUnitGroups\": [\n {\n \"id\": \"BER-SGL\",\n \"name\": \"Single room\",\n \"description\": \"This is a nice room with a single bed\",\n \"memberCount\": 2,\n \"maxPersons\": 1\n },\n {\n \"id\": \"BER-DBL\",\n \"name\": \"Double room\",\n \"description\": \"This is a nice room with as kingsize bed and flat screen\",\n \"memberCount\": 1,\n \"maxPersons\": 2\n }\n ]\n }\n ],\n \"count\": 0\n}"
},
"UnitGroupModel": {
"required": [
"code",
"description",
"id",
"maxPersons",
"memberCount",
"name",
"property",
"type"
],
"type": "object",
"properties": {
"id": {
"description": "The unit group id",
"type": "string"
},
"code": {
"description": "The code for the unit group that can be shown in reports and table views",
"type": "string"
},
"property": {
"$ref": "#/definitions/EmbeddedPropertyModel"
},
"name": {
"description": "The name for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"memberCount": {
"format": "int32",
"description": "Number of units in this group",
"type": "integer"
},
"description": {
"description": "The description for the unit group",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit group",
"type": "integer"
},
"rank": {
"format": "int32",
"description": "The unit group rank",
"type": "integer"
},
"type": {
"description": "The unit group type",
"enum": [
"BedRoom",
"MeetingRoom",
"EventSpace",
"ParkingLot",
"Other"
],
"type": "string"
},
"connectedUnitGroups": {
"description": "The list of connected unit groups this unit group is composed of",
"type": "array",
"items": {
"$ref": "#/definitions/ConnectedUnitGroupModel"
}
}
},
"example": "{\n \"id\": \"MUC-DBL\",\n \"code\": \"DBL\",\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n },\n \"name\": {\n \"en\": \"Double Room\",\n \"de\": \"Doppelzimmer\"\n },\n \"memberCount\": 0,\n \"description\": {\n \"en\": \"This is a nice room with as kingsize bed and flat screen\",\n \"de\": \"Dies ist ein schönes Zimmer mit Kingsize-Bett und Flachbildschirm\"\n },\n \"maxPersons\": 4,\n \"rank\": 2,\n \"type\": \"BedRoom\"\n}"
},
"UnitItemMaintenanceModel": {
"required": [
"id",
"type"
],
"type": "object",
"properties": {
"id": {
"description": "The id for the scheduled maintenance",
"type": "string"
},
"type": {
"description": "The type of maintenance that is planned for the unit. A small repair (OutOfService),\r\na bigger disfunction that does not allow to sell the unit (OutOfOrder) or is it\r\neven under construction and should reduce the house count (OutOfInventory)",
"enum": [
"OutOfService",
"OutOfOrder",
"OutOfInventory"
],
"type": "string"
}
}
},
"UnitItemModel": {
"required": [
"created",
"description",
"id",
"maxPersons",
"name",
"property",
"status"
],
"type": "object",
"properties": {
"id": {
"description": "The unit id",
"type": "string"
},
"name": {
"description": "The name for the unit",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit",
"minLength": 1,
"type": "string"
},
"property": {
"$ref": "#/definitions/EmbeddedPropertyModel"
},
"unitGroup": {
"$ref": "#/definitions/EmbeddedUnitGroupModel"
},
"connectingUnit": {
"$ref": "#/definitions/EmbeddedUnitModel"
},
"status": {
"$ref": "#/definitions/UnitItemStatusModel"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit",
"type": "integer"
},
"created": {
"format": "date-time",
"description": "Date of creation
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"attributes": {
"description": "Collection of user defined attributes of unit",
"type": "array",
"items": {
"$ref": "#/definitions/UnitAttributeModel"
}
},
"connectedUnits": {
"description": "Collection of connected units",
"type": "array",
"items": {
"$ref": "#/definitions/ConnectedUnitModel"
}
}
}
},
"UnitItemStatusModel": {
"required": [
"condition",
"isOccupied"
],
"type": "object",
"properties": {
"isOccupied": {
"type": "boolean"
},
"condition": {
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
],
"type": "string"
},
"maintenance": {
"$ref": "#/definitions/UnitItemMaintenanceModel"
}
}
},
"UnitListModel": {
"required": [
"count",
"units"
],
"type": "object",
"properties": {
"units": {
"description": "List of units",
"type": "array",
"items": {
"$ref": "#/definitions/UnitItemModel"
}
},
"count": {
"format": "int64",
"description": "Total count of items",
"type": "integer"
}
},
"example": "{\n \"units\": [\n {\n \"id\": \"MUC-MTA\",\n \"name\": \"A.101\",\n \"description\": \"Single room\",\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n },\n \"unitGroup\": {\n \"id\": \"MUC-SGL\",\n \"code\": \"SGL\",\n \"name\": \"Single\",\n \"description\": \"Single\",\n \"type\": \"BedRoom\"\n },\n \"connectingUnit\": {\n \"id\": \"MUC-QKY\",\n \"name\": \"S.101\",\n \"description\": \"Suite room\",\n \"unitGroupId\": \"MUC-SUI\"\n },\n \"status\": {\n \"isOccupied\": true,\n \"condition\": \"Dirty\",\n \"maintenance\": {\n \"id\": \"MUC-MTA-SGHZD\",\n \"type\": \"OutOfService\"\n }\n },\n \"maxPersons\": 1,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"attributes\": [\n {\n \"id\": \"GRTDTLDD\",\n \"name\": \"Floor 2\",\n \"description\": \"Floor number\"\n },\n {\n \"id\": \"KQOSXHLS\",\n \"name\": \"Street view\",\n \"description\": \"View from the room\"\n }\n ],\n \"connectedUnits\": []\n },\n {\n \"id\": \"MUC-JQI\",\n \"name\": \"A.102\",\n \"description\": \"Double room\",\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n },\n \"unitGroup\": {\n \"id\": \"MUC-DBL\",\n \"code\": \"DBL\",\n \"name\": \"Double\",\n \"description\": \"Double\",\n \"type\": \"BedRoom\"\n },\n \"connectingUnit\": {\n \"id\": \"MUC-QKY\",\n \"name\": \"S.101\",\n \"description\": \"Suite room\",\n \"unitGroupId\": \"MUC-SUI\"\n },\n \"status\": {\n \"isOccupied\": false,\n \"condition\": \"Clean\",\n \"maintenance\": {\n \"id\": \"MUC-JQI-GSZGK\",\n \"type\": \"OutOfOrder\"\n }\n },\n \"maxPersons\": 2,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"attributes\": [\n {\n \"id\": \"GRTDTLDD\",\n \"name\": \"Floor 2\",\n \"description\": \"Floor number\"\n }\n ],\n \"connectedUnits\": []\n },\n {\n \"id\": \"MUC-QKY\",\n \"name\": \"S.101\",\n \"description\": \"Suite room\",\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n },\n \"unitGroup\": {\n \"id\": \"MUC-SUI\",\n \"code\": \"SUI\",\n \"name\": \"Suite\",\n \"description\": \"Suite\",\n \"type\": \"BedRoom\"\n },\n \"status\": {\n \"isOccupied\": false,\n \"condition\": \"Clean\",\n \"maintenance\": {\n \"id\": \"MUC-JQI-GSZGK\",\n \"type\": \"OutOfOrder\"\n }\n },\n \"maxPersons\": 3,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"attributes\": [\n {\n \"id\": \"GRTDTLDD\",\n \"name\": \"Floor 2\",\n \"description\": \"Floor number\"\n }\n ],\n \"connectedUnits\": [\n {\n \"id\": \"MUC-MTA\",\n \"name\": \"A.101\",\n \"description\": \"Single room\",\n \"unitGroupId\": \"MUC-SGL\",\n \"condition\": \"Clean\",\n \"maxPersons\": 1\n },\n {\n \"id\": \"MUC-JQI\",\n \"name\": \"A.102\",\n \"description\": \"Double room\",\n \"unitGroupId\": \"MUC-DBL\",\n \"condition\": \"Clean\",\n \"maxPersons\": 2\n }\n ]\n }\n ],\n \"count\": 3\n}"
},
"UnitMaintenanceModel": {
"required": [
"from",
"id",
"to",
"type"
],
"type": "object",
"properties": {
"id": {
"description": "The id for the scheduled maintenance",
"type": "string"
},
"from": {
"format": "date-time",
"description": "Date and time the scheduled maintenance window starts
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"to": {
"format": "date-time",
"description": "Date and time the scheduled maintenance window ends
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"type": {
"description": "The type of maintenance that is planned for the unit. A small repair (OutOfService),\r\na bigger disfunction that does not allow to sell the unit (OutOfOrder) or is it\r\neven under construction and should reduce the house count (OutOfInventory)",
"enum": [
"OutOfService",
"OutOfOrder",
"OutOfInventory"
],
"type": "string"
},
"description": {
"description": "The description text for the maintenance",
"type": "string"
}
}
},
"UnitModel": {
"required": [
"created",
"description",
"id",
"maxPersons",
"name",
"property",
"status"
],
"type": "object",
"properties": {
"id": {
"description": "The unit id",
"type": "string"
},
"name": {
"description": "The name for the unit",
"minLength": 1,
"type": "string"
},
"description": {
"description": "The description for the unit",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"property": {
"$ref": "#/definitions/EmbeddedPropertyModel"
},
"unitGroup": {
"$ref": "#/definitions/EmbeddedUnitGroupModel"
},
"connectingUnit": {
"$ref": "#/definitions/EmbeddedUnitModel"
},
"status": {
"$ref": "#/definitions/UnitStatusModel"
},
"maxPersons": {
"format": "int32",
"description": "Maximum number of persons for the unit",
"type": "integer"
},
"created": {
"format": "date-time",
"description": "Date of creation
A date and time (without fractional second part) in UTC or with UTC offset as defined in ISO8601:2004",
"type": "string"
},
"attributes": {
"description": "Collection of user defined attributes of unit",
"type": "array",
"items": {
"$ref": "#/definitions/UnitAttributeModel"
}
},
"connectedUnits": {
"description": "Collection of connected units",
"type": "array",
"items": {
"$ref": "#/definitions/ConnectedUnitModel"
}
}
},
"example": "{\n \"id\": \"MUC-MTA\",\n \"name\": \"A.101\",\n \"description\": {\n \"en\": \"First Floor Room 1\",\n \"de\": \"1.OG Zimmer 1\"\n },\n \"property\": {\n \"id\": \"MUC\",\n \"code\": \"MUC\",\n \"name\": \"Demo Hotel Munich\",\n \"description\": \"This is the demo hotel Munich\"\n },\n \"unitGroup\": {\n \"id\": \"MUC-DBL\",\n \"code\": \"DBL\",\n \"name\": \"Double\",\n \"description\": \"Double\",\n \"type\": \"BedRoom\"\n },\n \"connectingUnit\": {\n \"id\": \"MUC-QKY\",\n \"name\": \"S.101\",\n \"description\": \"Suite room\",\n \"unitGroupId\": \"MUC-SUI\"\n },\n \"status\": {\n \"isOccupied\": false,\n \"condition\": \"Clean\",\n \"maintenance\": {\n \"id\": \"MUC-MTA-SGHZD\",\n \"from\": \"2024-03-27T17:51:27.6602259+01:00\",\n \"to\": \"2024-03-29T17:51:27.6602259+01:00\",\n \"type\": \"OutOfService\",\n \"description\": \"The remote control for the TV needs to be replaced.\"\n }\n },\n \"maxPersons\": 2,\n \"created\": \"0001-01-01T00:00:00Z\",\n \"attributes\": [\n {\n \"id\": \"KQOSXHLS\",\n \"name\": \"Floor 3\",\n \"description\": \"Floor number\"\n },\n {\n \"id\": \"ADVFSSUL\",\n \"name\": \"Street view\",\n \"description\": \"View from the room\"\n }\n ],\n \"connectedUnits\": []\n}"
},
"UnitStatusModel": {
"required": [
"condition",
"isOccupied"
],
"type": "object",
"properties": {
"isOccupied": {
"type": "boolean"
},
"condition": {
"enum": [
"Clean",
"CleanToBeInspected",
"Dirty"
],
"type": "string"
},
"maintenance": {
"$ref": "#/definitions/UnitMaintenanceModel"
}
}
}
},
"securityDefinitions": {
"oauth2": {
"type": "oauth2",
"flow": "implicit",
"authorizationUrl": "https://identity.apaleo.com/connect/authorize",
"scopes": {
"admin": "Full access",
"reservations.import": "Import reservations"
}
}
}
}