Inventory Contexts
Query Overview
Inventory Context is a term used to describe hotel codes used in Inventory. This should not be confused with the standard concept Context; as this Inventory Context is exclusively related to the Inventory scope.
Some Channel Managers need to work with their native hotel codes instead of mapping the Inventory hotel IDs that we autogenerate. Therefore, these Channels will require a special Inventory Context for Set Up and Product Load operations.
To retrieve the Inventory Context values, you can use the inventoryContexts query that returns a list of all the existing Inventory Contexts created. The returned fields include:
contextIdcontextCodesupplierCodes
1. Criteria
When building your query, you can provide the following input field:
Optional Input
supplierCodes- A list of supplier codes to retrieve their Inventory Context.
2. Settings
This query allows retrieving all Inventory Contexts or filtering specific ones by providing supplier codes.
The supplierCodes field can be used to filter contexts based on specific suppliers.
{
"input": {
"supplierCodes": ["SUP001", "SUP002"]
}
}
Response Considerations
The query returns a collection of Inventory Contexts along with success status and possible advise messages.
InventoryContextsRs (OBJECT)
contexts(InventoryContext) - A collection of retrieved Inventory Contexts.contextId(Int) - Unique identifier for the context.contextCode(String) - Code of the context.supplierCodes(String) - List of supplier codes associated with the context.
success(Boolean) - Indicates whether the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.code(ID) - AM code.type(String) - Error type.description(String) - Error description.level(Enum of AdviseMessageLevel) - Importance level (ERROR, WARN, INFO).external(ExternalMessage) - External message details.correlationID(ID) - Identifier for debugging.
Query Inputs
InventoryContextsFilterInput (INPUT_OBJECT)
Inventory Contexts filter input.
Inventory Contexts filter input.
supplierCodes(String)
Supplier codes to retrieve their context.
Returned Fields
InventoryContextsRs (OBJECT)
Represents a response object for the Context operations.
Represents a response object for the Context operations.
adviseMessages(AdviseMessage)
A collection of advise messages related to the operation. See AdviseMessage. 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)
contexts(InventoryContext)
A collection of contexts. See Context. contextId * (Int) The ID of the context. The code of the context. List of supplier codes with the context.contextCode(String)
supplierCodes(String)
success * (Boolean)
Indicates whether the operation was successful.