Search Label Assignments

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Search label assignments by a specific label, with optional filtering by entity ID and pagination. Use this endpoint to find which customers, products, or stores currently have a particular label assigned — for example, to audit all products tagged "Flash-Sale" before running a promotion, or to list all customers labelled "VIP".

Example request

curl --location 'https://eu.api.capillarytech.com/v2/labels/assignments/search?entityType=PRODUCT&labelId=116&limit=5' \
--header 'Authorization: Basic bmVlcmFqLmRvY3NlcDI1OjgyNmM0YzM0YTE2ODkxZjg0ZTdi'
curl --location 'https://eu.api.capillarytech.com/v2/labels/assignments/search?entityType=PRODUCT&labelId=116&offset=1&limit=2' \
--header 'Authorization: Basic bmVlcmFqLmRvYNmM0YzM0YTE2ODkxZjg0ZTdi'

Prerequisites

  • Basic authentication (Authorization: Basic {base64_credentials}) or OAuth (X-CAP-API-OAUTH-TOKEN).
  • Access to Label access group resource

Resource information

Pagination supportYes
Batch supportNo

Query parameters

FieldTypeRequiredDescription
entityTypeenumRequiredEntity type to search within. Supported values: CUSTOMER — applies the label to a customer. PRODUCT — applies the label to a product. STORE — applies the label to a store. Case-sensitive.
labelIdnumberConditionalUnique identifier of the label to search by. Provide exactly one of labelId, labelName, or labelExternalId.
labelNamestringConditionalName of the label to search by. Provide exactly one of labelId, labelName, or labelExternalId.
labelExternalIdstringConditionalExternal identifier of the label to search by. Provide exactly one of labelId, labelName, or labelExternalId.
entityIdstringOptionalFilters results to a specific entity ID.
limitnumberOptionalMaximum number of results to return per page. Between 1 and 50. Defaults to 10.
offsetnumberOptionalNumber of records to skip for pagination. Must be 0 or greater. Defaults to 0.

Example response

{
    "data": [
        {
            "entityId": "Cheese dip",
            "labelId": 116,
            "labelName": "DocDemo-Flash-Sale",
            "labelExternalId": "docdemo-flash-001",
            "expiryDate": "2026-09-03T18:29:59Z"
        },
        {
            "entityId": "107276",
            "labelId": 116,
            "labelName": "DocDemo-Flash-Sale",
            "labelExternalId": "docdemo-flash-001",
            "expiryDate": "2026-09-03T18:29:59Z"
        }
    ],
    "pagination": {
        "totalCount": 4,
        "limit": 2,
        "offset": 1
    }
}

Response parameters

FieldTypeDescription
dataarrayList of label assignment records matching the search criteria.
.entityIdstringIdentifier of the entity.
.labelIdnumberUnique identifier of the label.
.labelNamestringName of the label.
.labelExternalIdstringExternal identifier of the label.
.expiryDatestringExpiry date and time of the assignment in ISO-8601 format (server timezone). null if the assignment does not expire.
paginationobjectPagination metadata.
.totalCountnumberTotal number of matching records.
.limitnumberMaximum number of records returned in this response.
.offsetnumberNumber of records skipped.

Error and warning codes

Note: Validation errors for this endpoint are returned as {"message": "<error description>"} rather than the standard errors array.

CodeError numberTypeDescription
ASSIGNMENT_ENTITY_TYPE_REQUIRED23033ErrorentityType is required. HTTP 400.
ASSIGNMENT_INVALID_ENTITY_TYPE23034ErrorInvalid entity type. Supported values: CUSTOMER, PRODUCT, STORE. HTTP 400.
ASSIGNMENT_LABEL_SEARCH_IDENTIFIER_REQUIRED23036ErrorExactly one of labelId, labelName, or labelExternalId is required. HTTP 400.
ASSIGNMENT_INVALID_LIMIT23046Errorlimit must be between 1 and 50. HTTP 400.
ASSIGNMENT_INVALID_OFFSET23047Erroroffset must be 0 or greater. HTTP 400.

Query Params
string
enum
required
Allowed:
integer
string
string
string
integer
1 to 50
Defaults to 10
integer
≥ 0
Defaults to 0
Headers
string
string
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json