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"
}
]
}
}
}
}