Multi query items from Auto Indexing source groups
Note: This endpoint is currently in preview
The Query API is used to query items in an index, this endpoint lets you query items ingested to Auto Indexing source groups with up to 5 queries requested in a single payload, each query defining the source groups alias and source entity type to perform the lookup in.
Headers
Api key to validate your environment.
"environment-1637c4d0-e878-4738-b866-152106a4f88c"
The length of the message body, in bytes (this header is automatically added by most clients).
Body
The query consists of a list of query objects, on the format just like when quering items in a single index, so refer to this section when looking into filters, sorting, pagination etc.
The only thing that differs with these query objects, is an addition of an sourceGroupAlias, sourceEntityType and a name fields, so you per query can define which index you want to perform the query against and also name the individual query. This means that this service can perform multiple queries on the same index, or perform queries on multiple indicies in one request, and also give you the ability to name queries for easier identification of the resulting result sets.
Note
The request payload can at most take 5 queries in one request.
[
{
"sourceGroupAlias": "erp",
"sourceEntityType": "price",
"name": "priceData",
"filters": {
"and": [
{
"field": "sku",
"operator": "equals",
"value": "p-1234",
"caseInsensitive": true
}
]
},
"facets": [
{
"name": "Is promotional",
"field": "isPromotional",
"size": 20
}
],
"sort": [{ "field": "salesPrice", "order": "desc" }],
"pagination": { "page": 0, "pageSize": 20 }
},
{
"sourceGroupAlias": "erp",
"sourceEntityType": "inventory",
"name": "inventoryData",
"filters": {
"and": [
{
"field": "locationId",
"operator": "equals",
"value": "warehouse-01",
"caseInsensitive": true
}
]
},
"facets": [
{
"name": "Location",
"field": "locationId",
"size": 20
}
],
"sort": [{ "field": "stockAmount", "order": "desc" }],
"pagination": { "page": 0, "pageSize": 20 }
}
]
Response
Valid request.
The response is of type object.