Skip to content
Cartly Developers

Product Tags API

Manage product tags across your catalog: list, rename, merge, and delete tags via the Admin API.

Overview

Tags are free-form labels attached to products. They power collection filtering, search facets, and custom storefront logic. The Tags API provides centralized management — rename a tag once and it updates across all products.

Endpoints

MethodPathDescription
GET/admin/tagsList all tags with product counts
PUT/admin/tags/:tag/renameRename a tag across all products
DELETE/admin/tags/:tagRemove a tag from all products

GET /admin/tags — List all tags

bash
curl -X GET "https://cartly.pro/admin/tags" \
  -H "Authorization: Bearer ADMIN_JWT"

# Response
# [
#   { "tag": "summer", "count": 24 },
#   { "tag": "sale", "count": 12 },
#   { "tag": "new-arrival", "count": 8 }
# ]

PUT /admin/tags/:tag/rename — Rename a tag

bash
curl -X PUT "https://cartly.pro/admin/tags/summer/rename" \
  -H "Authorization: Bearer ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{}'

# Query param: ?new_name=summer-collection
# Updates all products that have the "summer" tag

DELETE /admin/tags/:tag — Remove a tag

bash
curl -X DELETE "https://cartly.pro/admin/tags/old-promo" \
  -H "Authorization: Bearer ADMIN_JWT"

# Removes "old-promo" tag from all products
# Returns: 204 No Content

Using Tags on Products

Tags are stored as a []string field on products. To add or update tags on a product:

PUT /admin/products/:id
{
  "tags": ["summer", "sale", "new-arrival"]
}

Collection Tag Filtering

Collections support tag-based filtering via the tag_filter field. When set, only products with matching tags are included in the collection results.

Set or update via: PUT /admin/collections/:id with "tag_filter": "summer".