Search label assignments

Search label assignments (GET)

Searches label assignments across entities using label or entity filters. Returns a paginated list of matching assignments.

Example request

curl -X GET "https://{host}/api_gateway/v2/labels/assignments/search?entityType=PRODUCT&labelName=Summer+Sale&limit=10&offset=0" \
  -H "Authorization: Bearer {token}"

Prerequisites

  • Requires authentication with a valid bearer token.
  • The token must have read access to the Labels resource.

Resource information

Pagination supportYes
Batch supportNo

Query parameters

FieldTypeRequiredDescription
entityTypeenumRequiredEntity type to search assignments for. One of: CUSTOMER, PRODUCT, STORE.
labelIdintegerConditionalSystem-assigned label identifier. At most one of labelId, labelName, or labelExternalId may be provided.
labelNamestringConditionalDisplay name of the label. At most one of labelId, labelName, or labelExternalId may be provided.
labelExternalIdstringConditionalCaller-defined label identifier. At most one of labelId, labelName, or labelExternalId may be provided.
entityIdstringOptionalFilter results to a single entity identifier.
limitintegerOptionalNumber of results to return per page. Between 1 and 50. Defaults to 10.
offsetintegerOptionalNumber of results to skip. Minimum 0. Defaults to 0.

Example response

{
  "data": [
    {
      "entityId": "SKU-001",
      "labelId": 101,
      "labelName": "Summer Sale",
      "labelExternalId": "SUMMER_SALE",
      "expiryDate": "2026-08-31"
    }
  ],
  "pagination": {
    "totalCount": 1,
    "limit": 10,
    "offset": 0
  },
  "errors": []
}

Response parameters

FieldTypeDescription
dataarrayMatching assignment records.
.entityIdstringEntity identifier.
.labelIdintegerSystem-assigned identifier of the label.
.labelNamestringDisplay name of the label.
.labelExternalIdstringCaller-defined identifier of the label, or null if not set.
.expiryDatestringExpiry date in YYYY-MM-DD format, or null if the assignment does not expire.
paginationobjectPagination metadata.
.totalCountintegerTotal number of assignments matching the filters.
.limitintegerMaximum number of results returned in this response.
.offsetintegerNumber of results skipped before this page.
errorsarrayAny errors encountered during the search.

Error and warning codes

CodeError numberTypeDescription
LABEL_INVALID_ENTITY_TYPE23006ErrorentityType is not one of CUSTOMER, PRODUCT, STORE. HTTP 400.
ASSIGNMENT_INVALID_LIMIT23046Errorlimit is outside the range 1–50. HTTP 400.
ASSIGNMENT_INVALID_OFFSET23047Erroroffset is negative. HTTP 400.