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:
id
name
countryCode
unLocode
1. Criteria
When building your mutation, you need to provide the following input fields:
Mandatory Input
countryCode
name
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.
Sets the name of the locality.
countryCode * (String)
Sets the country code, as ISO2, of the locality.
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.
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.
Collection of advise messages.
code * (ID)
AM code: The following codes can be returned:
AM code: The following codes can be returned:
description * (String)
Error description
Error description
level * (Enum of AdviseMessageLevel)
Indicates the level of importance of the message.
Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO
Indicates the level of importance of the message. Possible values: ERROR, WARN, INFO.
Possible values:
WARN
ERROR
INFO
external (ExternalMessage)
Specify the external message.
Specify the external message.
code (String)
External code.
External code.
message * (String)
External message.
External message.
correlationID * (ID)
Identifier to investigate the cause of the error.
Identifier to investigate the cause of the error.
localities (InventoryLocality)
Collection of localities.
Collection of localities.
id * (Int)
Unique identifier for the locality.
Unique identifier for the locality.
name (String)
Name of the locality.
Name of the locality.
countryCode (String)
ISO 2-character country code associated with the locality.
ISO 2-character country code associated with the locality.
unLocode (String)
UN/LOCODE associated with the locality.
UN/LOCODE associated with the locality.
success * (Boolean)
Indicates whether the response was successful based on the absence of advise messages.
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"
}
]
}
}
}
}