Product Tag

Information

The Product tags resource type is used to apply a tag to a product (see Tags). You can apply more than one tag per call.

When applying a tag to a product, you can choose the parent category or a nested child category. For example, a product can be tagged with either Edibles or Gummies. When a product is tagged with the child, it will also populate the parent categories. In this example, choosing Gummies will also populate the parent categories, Candy and Edibles. For a complete breakdown of Category tags and Discovery tags, see Taxonomy Overview.

API Requests

The request types and routes available for this resource as well as details on how to structure your requests are below. See API Reference - ProductTag for examples on how the requests might look in various languages and to test the requests in the browser.

RequestRouteDescription
POST/catalog/v1/products/:id/relationships/tagsCreate a new product_tag (see Note 1 below)
DELETE/catalog/v1/products/:id/relationships/tagsDelete an existing product_tag

🚧

You cannot attach tags to a product that has been discontinued.

POST

To create a ProductTag or ProductTags, send a payload with the below structure to
/catalog/v1/products/PRODUCT_ID/relationships/tags?scope_by[organization_id]=ORGANIZATION_ID. You can add one tag (Example 1) or you can add many tags (Example 2) with each request.

{
  "data": [
    {
      "type": "tags",
      "id": "TAG_ID"
    }
  ]
}
{
  "data": [
    {
      "type": "tags",
      "id": "TAG_ID"
    },
    {
      "type": "tags",
      "id": "TAG_ID"
    },
    {
      "type": "tags",
      "id": "TAG_ID"
    }
  ]
}

Path

scope_by[organization_id] string
Required. Organization UUID.


product_id string
Required. The Product UUID.

Attributes

id string
Required. The Tag UUID.


type string
Required. Must be tags.

DELETE

To delete a ProductTag or ProductTags, send a payload with the below structure to
/catalog/v1/products/PRODUCT_ID/relationships/tags?scope_by[organization_id]=ORGANIZATION_ID. You can delete one tag (Example 1) or you can delete many tags (Example 2) with each request.

{
  "data": [
    {
      "type": "tags",
      "id": "TAG_ID"
    }
  ]
}
{
  "data": [
    {
      "type": "tags",
      "id": "TAG_ID"
    },
    {
      "type": "tags",
      "id": "TAG_ID"
    },
    {
      "type": "tags",
      "id": "TAG_ID"
    }
  ]
}

Path

scope_by[organization_id] string
Required. Organization UUID.


product_id string
Required. The Product UUID.

Attributes

id string
Required. The Tag UUID to apply to the Product.


type string
Required. Must be tags.