Get label assignments

Get label assignments (GET)

Returns all label assignments for a specified list of entities.

Example request

curl -X GET "https://{host}/api_gateway/v2/labels/assignments?entityType=PRODUCT&entityIds=SKU-001,SKU-002&includeInactive=false" \
  -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 supportNo
Batch supportYes

Query parameters

FieldTypeRequiredDescription
entityTypeenumRequiredEntity type to retrieve assignments for. One of: CUSTOMER, PRODUCT, STORE.
entityIdsstringRequiredComma-separated list of entity identifiers. Maximum 10 IDs per request.
includeInactivebooleanOptionalWhen true, includes expired assignments in the response. Defaults to false.

Example response

{
  "data": [
    {
      "entityId": "SKU-001",
      "labels": [
        {
          "labelId": 101,
          "labelName": "Summer Sale",
          "labelExternalId": "SUMMER_SALE",
          "expiryDate": "2026-08-31"
        }
      ]
    }
  ]
}

Response parameters

FieldTypeDescription
dataarrayLabel assignments grouped by entity.
.entityIdstringEntity identifier.
.labelsarrayLabels currently assigned to this entity.
..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.

Error and warning codes

CodeError numberTypeDescription
LABEL_INVALID_ENTITY_TYPE23006ErrorentityType is not one of CUSTOMER, PRODUCT, STORE. HTTP 400.
ASSIGNMENT_ENTITY_IDS_EXCEEDED23042ErrorMore than 10 entity IDs in entityIds. HTTP 400.