Skip to main content

Create Room Master

Mutation Overview​

The createRoomMaster mutation allows you to create a new room master in Inventory. The returned fields include:

  • id
  • code
  • name

1. Criteria​

When building your mutation, you need to provide the following input fields:

Mandatory Input​

  • clientCode
  • code
  • name

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.

note

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

codeΒ  *Β  (String)

Room code

nameΒ  *Β  (String)

Room Name

clientCodeΒ  *Β  (String)

Client Code

Returned Fields​

RoomsRs (OBJECT)
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:

  • WARN: Warning message.
  • ERROR: Error message.
  • INFO: Info message.
external(ExternalMessage)

Specify the external message.

code(String)

External code.

messageΒ  *Β  (String)

External message.

correlationIDΒ  *Β  (ID)

Identifier to investigate the cause of the error.

rooms(InventoryRoom)

Collection of rooms.

idΒ  *Β  (Int)

Unique identifier for the room.

code(String)

Code of the room.

name(String)

Name of the room.

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