Get/Search labels

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

Enables you to search or retrieve a paginated list of labels for an organization. Labels are flexible metadata tags applied to customers, products, or stores, used as building blocks in promotions, audience segments, and analytics.

Filter results by entity type (CUSTOMER, PRODUCT, or STORE), status, or a search term that matches label names or external IDs. Results are ordered by lastUpdatedOn DESC (most recently updated first).

Example request

curl --location 'https://eu.api.capillarytech.com/v2/labels?limit=10' \
--header 'Authorization: Basic bmVlcmFqLmRvY3NlcDI1OjgyN2NjYjBlZWE4YTcwNmM0YzM0YTE2ODkxZjg0ZTdi'
curl --location 'https://eu.api.capillarytech.com/v2/labels?entityType=CUSTOMER&limit=10' \
--header 'Authorization: Basic bmVlcmFqLmRvY3NlcDI1YTcwNmM0YzM0YTE2ODkxZjg0ZTdi'
curl --location 'https://eu.api.capillarytech.com/v2/labels?offset=5&limit=3' \
--header 'Authorization: Basic bmVlcmFqLmRvY3NlcDI1lZWE4YTcwNmM0YzM0YTE2ODkxZjg0ZTdi'
curl --location 'https://eu.api.capillarytech.com/v2/labels?q=DocDemo&entityType=PRODUCT&limit=10' \
--header 'Authorization: Basic bmVlcmFqLmRvY3NlcDI1OjgyN2NjYj\0YTE2ODkxZjg0ZTdi'

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
entityTypeenumOptionalFilters labels by entity type. Supported values: CUSTOMER, PRODUCT, STORE. Defaults to PRODUCT.
qstringOptionalSearch term to filter labels by name or external ID. Matches partial strings. Case insensitive.
statusenumOptionalFilters labels by status. Supported values: ACTIVE, ARCHIVED. Defaults to ACTIVE.
limitnumberOptionalMaximum number of labels to return per page. Between 1 and 100. Defaults to 50.
offsetnumberOptionalNumber of records to skip for pagination. Must be 0 or greater. Defaults to 0.

Example response

{
    "totalCount": 118,
    "limit": 10,
    "offset": 0,
    "labels": [
        {
            "id": 119,
            "externalId": "docdemo-clearance-001",
            "name": "DocDemo-Clearance",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "RELATIVE",
                "unit": "YEARS",
                "value": 2
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T04:20:47Z",
            "createdBy": 75216507,
            "lastUpdatedOn": "2026-06-05T11:42:45Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 102,
            "externalId": "summersale101",
            "name": "Summer Sale101",
            "description": "Updated: High-value customer segment (Gold tier)",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "FIXED_DATE",
                "expiryDate": "2099-12-31T23:59:59+05:30"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-02T14:23:07Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T11:42:45Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 120,
            "externalId": "docdemo-summer-002",
            "name": "DocDemo-Summer-Sale_update",
            "description": "Updated: Summer 2026 sale products",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "FIXED_DATE",
                "expiryDate": "2100-06-30T23:59:59+05:30"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T05:15:09Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T11:28:26Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 128,
            "externalId": "docdemo-vip-0",
            "name": "DocDemo-VIP-Customer0",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "NONE"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T10:11:14Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T10:11:14Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 127,
            "externalId": "docdemo-vip-008",
            "name": "DocDemo-VIP-Customer8",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "NONE"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T10:08:43Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T10:08:43Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 126,
            "externalId": "docdemo-vip-007",
            "name": "DocDemo-VIP-Customer7",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "NONE"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T09:42:49Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T09:42:49Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 125,
            "externalId": "docdemo-vip-006",
            "name": "DocDemo-VIP-Customer6",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "FIXED_DATE",
                "expiryDate": "2027-12-31T23:59:59+05:30"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T09:41:12Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T09:41:12Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 124,
            "externalId": "docdemo-vip-005",
            "name": "DocDemo-VIP-Customer5",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "FIXED_DATE",
                "expiryDate": "2027-12-31T23:59:59+05:30"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T09:39:58Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T09:39:58Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 123,
            "externalId": "docdemo-vip-004",
            "name": "DocDemo-VIP-Customer4",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "FIXED_DATE",
                "expiryDate": "2027-12-31T23:59:59+05:30"
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T09:38:00Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T09:38:00Z",
            "lastUpdatedBy": 75197399
        },
        {
            "id": 122,
            "externalId": "docdemo-vip-003",
            "name": "DocDemo-VIP-Customer3",
            "description": "High-value customer segment",
            "entityType": "PRODUCT",
            "expiryConfig": {
                "type": "RELATIVE",
                "unit": "MONTHS",
                "value": 6
            },
            "status": "ACTIVE",
            "createdOn": "2026-06-05T09:30:30Z",
            "createdBy": 75197399,
            "lastUpdatedOn": "2026-06-05T09:30:30Z",
            "lastUpdatedBy": 75197399
        }
    ]
}

Response parameters

FieldTypeDescription
totalCountnumberTotal number of labels matching the filter criteria.
limitnumberMaximum number of labels returned in this response.
offsetnumberNumber of records skipped.
labelsarrayList of label objects.
.idnumberUnique identifier of the label.
.externalIdstringExternal identifier of the label.
.namestringName of the label.
.descriptionstringDescription of the label.
.entityTypestringEntity type the label applies to. One of CUSTOMER, PRODUCT, or STORE.
.expiryConfigobjectExpiry configuration for the label.
..typestringExpiry type. One of NONE, FIXED_DATE, or RELATIVE.
..expiryDatestringExpiry date in ISO-8601 format. Present when type is FIXED_DATE.
..unitstringDuration unit. Present when type is RELATIVE. One of DAYS, MONTHS, or YEARS.
..valuenumberDuration value. Present when type is RELATIVE.
..roundingUnitstringRounding unit for the expiry duration. Present when type is RELATIVE and a rounding unit is configured.
.statusstringStatus of the label. One of ACTIVE or ARCHIVED.
.createdOnstringUTC timestamp when the label was created. Format: YYYY-MM-DDThh:mm:ssZ (server timezone).
.createdBynumberID of the user who created the label.
.lastUpdatedOnstringUTC timestamp when the label was last updated. Format: YYYY-MM-DDThh:mm:ssZ (server timezone).
.lastUpdatedBynumberID of the user who last updated the label.

Error and warning codes

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

CodeError numberTypeDescription
LABEL_INVALID_ENTITY_TYPE23006ErrorInvalid entity type. Supported values: CUSTOMER, PRODUCT, STORE. HTTP 400.
LABEL_INVALID_STATUS23016ErrorInvalid status value. Supported values: ACTIVE, ARCHIVED. HTTP 400.
LABEL_INVALID_LIMIT23017Errorlimit must be between 1 and 100. HTTP 400.
LABEL_INVALID_OFFSET23018Erroroffset must be 0 or greater. HTTP 400.

Query Params
string
enum
Defaults to PRODUCT
Allowed:
string
string
enum
Defaults to ACTIVE
Allowed:
integer
1 to 100
Defaults to 50
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