Create Room Master
Mutation Overviewβ
The createRoomMaster mutation allows you to create a new room master in Inventory. The returned fields include:
idcodename
1. Criteriaβ
When building your mutation, you need to provide the following input fields:
Mandatory Inputβ
clientCodecodename
2. Settingsβ
To build your createRoomMaster input, you need to provide your client code in the field clientCode and specify the code and name you wish to set for the new room type.
Your ClientCode can be retrieved from any Travelgate's access with a Channel Manager.
See My Connections and click "Get form data" in the selected access. The code in Password is equivalent to the ClientCode.
{
"input":{
"clientCode": "CDOC",
"code": "STD",
"name": "Standard"
}
}
Response Considerationsβ
The mutation returns the created room object along with success status and possible advise messages.
RoomsRs (OBJECT)β
rooms(InventoryRoom) - A collection of created rooms.id(Int) - Unique identifier.code(String) - Room code.name(String) - Room name.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputsβ
InventoryRoomMasterCreateInput (INPUT_OBJECT)
Room master create input data
Room master create input data
codeΒ *Β (String)
Room code
nameΒ *Β (String)
Room Name
clientCodeΒ *Β (String)
Client Code
Returned Fieldsβ
RoomsRs (OBJECT)
Represents the response data for retrieving rooms.
Represents the response data for retrieving rooms.
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)
rooms(InventoryRoom)
Collection of rooms. idΒ *Β (Int) Unique identifier for the room. Code of the room. Name of the room.code(String)
name(String)
successΒ *Β (Boolean)
Indicates whether the response was successful based on the absence of advise messages.
Examplesβ
{
"data": {
"inventory": {
"roomsMaster": {
"rooms": [
{
"id": 47915,
"code": "STD",
"name": "Standard"
}
]
}
}
}
}