Skip to main content
POST
/
v1
/
sourceGroupAlias
/
{sourceGroupAlias}
/
type
/
{sourceEntityType}
Query items from Auto Indexing source groups
curl --request POST \
  --url https://query.enterspeed.com/v1/sourceGroupAlias/{sourceGroupAlias}/type/{sourceEntityType} \
  --header 'Content-Length: <content-length>' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "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
  }
}
'
{
  "status": 0,
  "totalResults": 200,
  "results": [
    {
      "sku": "p-5427",
      "stockAmount": 20,
      "locationId": "warehouse-01",
      "_originId": "p-5427",
      "_sourceGuid": "9f741916-19e3-4791-9ebd-701634ba9b75",
      "_updatedAt": "2025-01-07T08:43:15.7351089Z"
    }
  ],
  "facets": [
    {
      "name": "Location",
      "field": "locationId",
      "groups": [
        {
          "value": "warehouse-01",
          "count": 95
        },
        {
          "value": "warehouse-02",
          "count": 78
        }
      ],
      "isValid": true
    }
  ],
  "nextPageToken": "WyIyMDI0LTAxLTAxIiwiYWJjMTIzIl0="
}

Headers

X-Api-Key
string
required

Api key to validate your environment.

Example:

"environment-1637c4d0-e878-4738-b866-152106a4f88c"

Content-Length
number
required

The length of the message body, in bytes (this header is automatically added by most clients).

Body

application/json

The query uses the same format as the Query items endpoint with the only exeption that aliases is not supported here.

The body is of type object.

Response

Valid request.

status
number
Example:

0

totalResults
number

The total number of results matched by query.

Example:

200

results
object[]

List of items from the index matched by the query provided.

Built in fields are prefixed with underscore (_).

facets
object[]

List of aggregated field values based on the requested facet fields.

nextPageToken
string | null

Continuation token for the next page of results. Pass this value in the pagination.nextPageToken field of the next request. null when no further results exist.

Example:

"WyIyMDI0LTAxLTAxIiwiYWJjMTIzIl0="