Create Rooms
Mutation Overview
The createRoomsSetUp mutation allows you to create new rooms for an existing hotel rate in Inventory. The returned fields include:
codemasteridcodename
activeexternalCodestandardusesnumberOfGuestsminAgemaxAgepaxType
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
clientCodesupplierCodehotelCoderateCoderoomscodemasterCodeactivestandardusesnumberOfGuestspaxType
Optional Input
contextCoderoomsexternalCode
2. Settings
To create a room, ensure that all mandatory fields are properly filled out and associate the room with the correct hotel and rate.
Response Considerations
The mutation returns the created room along with success status and possible advise messages.
RoomsSetUpRs (OBJECT)
rooms(InventoryRoomSetUp) - A collection of created rooms.code(String) - The room code.master(InventoryMasterRoom) - The master room details.id(Int) - The master room ID.code(String) - The master room code.name(String) - The master room name.
active(Boolean) - Indicates if the room is active.externalCode(String) - The external code associated with the room.standard(Int) - The standard occupancy of the room.uses(InventoryRoomUse) - The list of guest types allowed in the room.numberOfGuests(Int) - The number of guests allowed.minAge(Int) - The minimum age allowed for guests.maxAge(Int) - The maximum age allowed for guests.paxType(Enum of InventoryPaxType) - The type of guests allowed.- Possible values:
INFANT,CHILD,ADULT
- Possible values:
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputs
InventoryRoomsSetupCreateInput (INPUT_OBJECT)
Rooms setup create input.
Rooms setup create input.
clientCode * (String)
Client code.
supplierCode * (String)
Travelgate Supplier/Channel code.
rateCode * (String)
Rate code associated with the rooms.
rooms * (InventoryRoomSetupInput)
Rooms input data. code * (String) Code associated with the room. masterCode * (String) Master code of the room. active * (Boolean) Indicates whether the room is active. External code associated with the room. standard * (Int) Standard of the room. Typically the number of guests. uses * (InventoryRoomUseInput) List of uses associated with the room. The format is Adults-Children-Infants numberOfGuests * (Int) Gets or sets the number of guests allowed in the room. paxType * (InventoryPaxType) Gets or sets the type of guests allowed in the room.
PaxType
Possible values:externalCode(String)
INFANT: Represents an infant guest.CHILD: Represents a child guest.ADULT: Represents an adult guest.
hotelCode * (String)
Code associated with the hotel.
contextCode(String)
Context code.
Returned Fields
RoomsSetUpRs (OBJECT)
Represents the response object for room setup operations.
Represents the response object for room setup operations.
adviseMessages(AdviseMessage)
Collection of advise messages. code * (ID) AM code: The following codes can be returned: description * (String) Error description level * (AdviseMessageLevel) Indicates the level of importance of the message.
Possible values: ERROR, WARN, INFO.
Possible values: Specify the external message. External code. message * (String) External message. correlationID * (ID) Identifier to investigate the cause of the error.WARN: Warning message.ERROR: Error message.INFO: Info message.external(ExternalMessage)
code(String)
rateCode(String)
Rate code associated with the rooms.
rooms(InventoryRoomSetUp)
Collection of room setup responses. Code associated with the room. Master of the room. id * (Int) Id associated with the room master. Code associated with the room. Name associated with the room. active * (Boolean) Indicates whether the room is active. External code associated with the room. standard * (Int) Standard of the room. Typically the number of guests. uses * (InventoryRoomUse) List of uses associated with the room. numberOfGuests * (Int) Gets or sets the number of guests allowed in the room. minAge * (Int) Gets or sets the minimum age allowed for guests in the room. maxAge * (Int) Gets or sets the maximum age allowed for guests in the room. paxType * (InventoryPaxType) Gets or sets the type of guests allowed in the room.
PaxType
Possible values:code(String)
master(InventoryMasterRoom)
code(String)
name(String)
externalCode(String)
INFANT: Represents an infant guest.CHILD: Represents a child guest.ADULT: Represents an adult guest.
success * (Boolean)
Indicates whether the operation was successful based on the absence of advise messages.
Examples
Create a new room for a rate
With the following mutation, we are going to create a new room with standard occupancy 2 with the following occupancy uses:
- 1 adult (1-0-0)
- 2 adults (2-0-0)
- 1 adult and 1 child (1-1-0)
- 1 adult and 1 infant (1-0-1)
- 1 adult, 1 child and 1 infant (1-1-1)