Create Localities
Mutation Overview
The createLocalities mutation allows you to create new localities that a hotel can have assigned in Inventory. The returned fields include:
idnamecountryCodeunLocode
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
countryCodename
Optional Input
unLocode
2. Settings
To create a locality, ensure that all mandatory fields are properly filled out and provide accurate identifiers for the locality.
Response Considerations
The mutation returns the created locality along with success status and possible advise messages.
LocalitiesRs (OBJECT)
localities(InventoryLocality) - A collection of created localities.id(Int) - Unique identifier for the locality.name(String) - Name of the locality.countryCode(String) - ISO 2-character country code.unLocode(String) - UN/LOCODE for Trade and Transport Locations.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Mutation Inputs
InventoryLocalitiesCreateInput (INPUT_OBJECT)
Represents a request to create a locality.
Represents a request to create a locality.
name * (String)
Sets the name of the locality.
countryCode * (String)
Sets the country code, as ISO2, of the locality.
unLocode(String)
United Nations code for Trade and Transport Locations. It is not mandatory but it is recommended in order to identify the locality unequivocally.
Returned Fields
LocalitiesRs (OBJECT)
Represents response data for localities.
Represents response data for localities.
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)
localities(InventoryLocality)
Collection of localities. id * (Int) Unique identifier for the locality. Name of the locality. ISO 2-character country code associated with the locality. UN/LOCODE associated with the locality.name(String)
countryCode(String)
unLocode(String)
success * (Boolean)
Indicates whether the response was successful based on the absence of advise messages.
Examples
{
"data": {
"inventory": {
"createLocalities": {
"localities": [
{
"name": "Palma de Mallorca",
"countryCode": "ES",
"id": 31104,
"unLocode": "ES-PMI"
}
]
}
}
}
}