Unit types and units reflect room categories and rooms or apartments.
Unit types
Unit types in a hotel are room categories such as 'single rooms' or 'double rooms'.
Each unit in a unit type share the same properties such as how many guests can share a unit.
Unit types are usually tightly coupled to the properties pricing rules.
Units
A unit can be seen as a hotel room, a flat or anything else which can be booked for a time period.
Units belong to a unitType and share their properties such as possible occupancy.
Its uncommon that a unit is assigned to a different unitType but it may happen. For instance a small double room could be converted to a single room.
Batch creation of unit types
POST /batch/unit-types
Create up to 100 new unit types with one request.
Request body
application/vnd.api+json · UnitType[]
Create many unit types in a batch request. Operation can be expected to take longer than usual. Use createUnitType whenever possible. (method may change).
name (string, required)code (string, required)maxOccupancy (integer) – Max person who can rent this unit typemaxAdults (integer) – Max adults allowed in this unit type. Maps to OTA `MaxAdults` (AgeQualifyingCode=10). Required by Booking.com / Expedia for occupancy-based filtering and pricing.maxChildren (integer) – Max children allowed in this unit type. Maps to OTA `MaxChildren` (AgeQualifyingCode=8).quantity (integer) – Number of units of this unit type. Computed server-side from the count of child units; cannot be set via the request body.
Responses
201400The server could not understand the request due to invalid syntax.
422The request body failed validation.
500An unexpected error occurred on the server.
Batch creation of units
POST /batch/units
Create up to 100 new units with one request.
Request body
application/vnd.api+json · Unit[]
Create many units in a batch request. Operation can be expected to take longer than usual. Use createUnit whenever possible. (method may change).
name (string, required)floor (string)status (any) – Operational/housekeeping status of the unit. Owned by the unit (inventory) domain, not by reservations. Optional: when omitted on creation the unit defaults to Dirty, and reservation/stay sync must not set it at all — a unit outlives any single reservation and its status is managed separately.unitTypeId (string (uuid)) – The id of the unit type (category) this unit belongs to
Responses
201400The server could not understand the request due to invalid syntax.
422The request body failed validation.
500An unexpected error occurred on the server.