# Customer Tags

Create, read, update, delete, and subscribe to customer labels through the Store API.

Customer Tags require customer scopes: reads use `read_customers` and writes use `write_customers`. Tags label customer profiles and can participate in customer-group rules. They are separate from Product Tags and do not filter products. The slug is optional when creating a Customer Tag and is generated from its name when omitted.

## Endpoints

## Customer Tag limits

`GET /api/2025-01/customer-tags/limits`

Returns the field and request limits enforced by Customer Tag endpoints.

Scope: `read_customers`

```curl
curl 'https://api-store.tringify.com/api/2025-01/customer-tags/limits' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"data":{"bulk_create_max_count":50,"bulk_delete_max_count":500,"list_max_limit":200,"list_page_size":50,"max_per_customer":50,"max_per_store":500,"name_max_length":100,"page_size_options":[20,50,100],"search_max_length":200,"sort_columns":["name","customer_count","created_at"]}}
```

## List Customer Tags

`GET /api/2025-01/customer-tags`

Returns a paginated, searchable, and sortable list. Customer counts include assignments in the token's store only.

Scope: `read_customers`

```curl
curl 'https://api-store.tringify.com/api/2025-01/customer-tags?limit=50&page=1&search=vip&sort_by=name&sort_direction=asc' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"data":{"tags":[{"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191","name":"VIP","slug":"vip","customer_count":12,"created_at":"2026-08-01T09:30:00-04:00","updated_at":"2026-08-01T10:15:00-04:00"}],"total":1,"store_total":1,"page":1,"limit":50,"sort_by":"name","sort_direction":"asc"}}
```

## Get a Customer Tag

`GET /api/2025-01/customer-tags/{id}`

Returns the Customer Tag when it belongs to the token's store.

Scope: `read_customers`

```curl
curl 'https://api-store.tringify.com/api/2025-01/customer-tags/2ef71ce9-36a5-4eeb-a465-03b51e01d191' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"data":{"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191","name":"VIP","slug":"vip","customer_count":12,"created_at":"2026-08-01T09:30:00-04:00","updated_at":"2026-08-01T10:15:00-04:00"}}
```

## Create a Customer Tag

`POST /api/2025-01/customer-tags`

Creates a Customer Tag. Omit `slug` to generate it from the name.

Scope: `write_customers`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/customer-tags' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "VIP",
  "slug": "vip"
}'
```

Response:

```json
{"success":true,"data":{"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191","name":"VIP","slug":"vip","customer_count":12,"created_at":"2026-08-01T09:30:00-04:00","updated_at":"2026-08-01T10:15:00-04:00"}}
```

## Bulk create Customer Tags

`POST /api/2025-01/customer-tags/bulk-create`

Creates tags from names. Names that already exist, ignoring capitalization, are skipped; invalid names and names over the store limit are returned in `row_errors` with the same codes as Create a Customer Tag, and the other names are still created. The response is compact: `totals` counts `created`, `skipped` and `failed` names; `created` lists each new item's `id` and the `name` you sent; `skipped` and `row_errors` are unchanged. Get an item for its other fields.

Scope: `write_customers`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/customer-tags/bulk-create' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "names": [
    "VIP",
    "Wholesale"
  ]
}'
```

Response:

```json
{"success":true,"data":{"totals":{"created":1,"skipped":0,"failed":0},"created":[{"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191","name":"VIP"}],"skipped":[],"row_errors":[]}}
```

## Update a Customer Tag

`PUT /api/2025-01/customer-tags/{id}`

Updates provided fields. Omitted fields remain unchanged.

Scope: `write_customers`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/customer-tags/2ef71ce9-36a5-4eeb-a465-03b51e01d191' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "VIP",
  "slug": "vip"
}'
```

Response:

```json
{"success":true,"data":{"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191","name":"VIP","slug":"vip","customer_count":12,"created_at":"2026-08-01T09:30:00-04:00","updated_at":"2026-08-01T10:15:00-04:00"}}
```

## Tag customers

`POST /api/2025-01/customer-tags/{id}/customers`

Adds the tag to every listed customer of the token's store that does not have it. `added` is the number of customers tagged; `already_tagged` lists ids that already had the tag and `not_found` lists ids that are not customers of this store, so one bad id does not fail the batch. If any customer would go over its tag limit, no customer is changed and `STOREFRONT_CUST_TOO_MANY_TAGS` is returned. Each customer tagged sends `customers/update` with `changed_fields` `tags`. The message is CUSTOMERS_BULK_TAGGED when every id was tagged, otherwise CUSTOMERS_BULK_TAGGED_PARTIAL with the three counts. Duplicate ids count once.

Scope: `write_customers`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/customer-tags/2ef71ce9-36a5-4eeb-a465-03b51e01d191/customers' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "customer_ids": [
    "f37a970d-5f56-4ca8-9d4d-4ea10190f8a5"
  ]
}'
```

Response:

```json
{"success":true,"data":{"added":2,"already_tagged":["0b6a2f8e-3c1d-4e5f-9a7b-8c9d0e1f2a3b"],"not_found":[]},"code":"CUSTOMERS_BULK_TAGGED_PARTIAL","message":"Customers tagged: 2, already tagged: 1, not found: 0."}
```

## Untag customers

`POST /api/2025-01/customer-tags/{id}/customers/remove`

Removes the tag from every listed customer of the token's store that has it. `removed` is the number of customers untagged; `not_tagged` lists ids that did not have the tag and `not_found` lists ids that are not customers of this store. Each customer untagged sends `customers/update` with `changed_fields` `tags`. The message is CUSTOMERS_BULK_UNTAGGED when every id was untagged, otherwise CUSTOMERS_BULK_UNTAGGED_PARTIAL. Duplicate ids count once.

Scope: `write_customers`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/customer-tags/2ef71ce9-36a5-4eeb-a465-03b51e01d191/customers/remove' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "customer_ids": [
    "f37a970d-5f56-4ca8-9d4d-4ea10190f8a5"
  ]
}'
```

Response:

```json
{"success":true,"data":{"removed":2,"not_tagged":[],"not_found":[]},"code":"CUSTOMERS_BULK_UNTAGGED","message":"Tag removed from 2 customers."}
```

## Delete a Customer Tag

`DELETE /api/2025-01/customer-tags/{id}`

If assignments or customer-group rules depend on the tag, retry with the returned confirmation token.

Scope: `write_customers`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/customer-tags/2ef71ce9-36a5-4eeb-a465-03b51e01d191' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"data":{"deleted":true,"id":"2ef71ce9-36a5-4eeb-a465-03b51e01d191"}}
```

## Bulk delete Customer Tags

`POST /api/2025-01/customer-tags/bulk-delete`

Deletes the selected store-scoped UUIDs transactionally. Dependency changes can require a fresh confirmation retry.

Scope: `write_customers`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/customer-tags/bulk-delete' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "tag_ids": [
    "2ef71ce9-36a5-4eeb-a465-03b51e01d191"
  ]
}'
```

Response:

```json
{"success":true,"data":{"deleted":["2ef71ce9-36a5-4eeb-a465-03b51e01d191"],"failed":[]}}
```

## Fields

| Field | Type | Create | Update | Required | Translatable |
| --- | --- | --- | --- | --- | --- |
| `name` | text | Yes | Yes | create | No |
| `slug` | slug | Yes | Yes | - | No |
| `customer_count` | integer | No | No | - | No |
| `created_at` | datetime | No | No | - | No |
| `updated_at` | datetime | No | No | - | No |

## Webhook events

Subscribe to these events to keep your integration in sync with customer tags. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

## Customer tag created

Event: `customer_tags/create` · App scope: `read_customers` · Staff permission: `customers:write`

Fired when a customer tag is created. Adding the tag to or removing it from a customer sends customers/update (`tags`).

```json
{
  "tag": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "customer_count": 128,
    "id": "5d2e8b1a-6c3f-4e2a-9b1d-2f8c7a4e6b10",
    "name": "VIP",
    "slug": "vip",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Customer tag updated

Event: `customer_tags/update` · App scope: `read_customers` · Staff permission: `customers:write`

Fired when a customer tag is renamed.

```json
{
  "changed_fields": [
    "name",
    "slug"
  ],
  "current": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "customer_count": 128,
    "id": "5d2e8b1a-6c3f-4e2a-9b1d-2f8c7a4e6b10",
    "name": "VIP",
    "slug": "vip",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "previous": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "customer_count": 128,
    "id": "5d2e8b1a-6c3f-4e2a-9b1d-2f8c7a4e6b10",
    "name": "VIP",
    "slug": "vip",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Customer tag deleted

Event: `customer_tags/delete` · App scope: `read_customers` · Staff permission: `customers:write`

Fired when a customer tag is deleted. The tag is removed from its customers without a customers/update for each.

```json
{
  "tag": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "customer_count": 128,
    "id": "5d2e8b1a-6c3f-4e2a-9b1d-2f8c7a4e6b10",
    "name": "VIP",
    "slug": "vip",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

