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 TravelgateX'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  *  (Enum of AdviseMessageLevel)
Indicates the level of importance of the message. Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO

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