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:
contextId
contextCode
supplierCodes
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.
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.
A collection of advise messages related to the operation. See AdviseMessage.
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.
contexts (InventoryContext)
A collection of contexts. See Context.
A collection of contexts. See Context.
contextId * (Int)
The ID of the context.
The ID of the context.
contextCode (String)
The code of the context.
The code of the context.
supplierCodes (String)
List of supplier codes with the context.
List of supplier codes with the context.
success * (Boolean)
Indicates whether the operation was successful.
Indicates whether the operation was successful.