Tags

The tag object and the allowed CRUD operations on the related resource endpoint

One or more tags (max 10 per resource) can be associated with most of the other resources to group them under predefined labels that can be used as anchors to build custom logic and processes on top of our APIs.

Tags can be included as associations of the related resource and leveraged to filter a list of a specific resource type (e.g. a list of SKUs, a list of customers, etc.). Tags can be also exported and imported in JSON or CSV format, both standalone and together with the related resources.

When a resource is tagged (or the list of the associated tags changes) the tagged event is triggered, the related webhook is fired, and the associated tag(s) are automatically included in the callback's payload.

Taggable resources

At the moment tags are available for the following resources:

If a resource is already associated with one or more tags, tagging the resource by updating the relationship will remove all the currently associated tags and replace it with the new list of tags. If you just need to change the list of the tags currently associated with a resource you can patch the taggable resource and send the trigger attributes _add_tags and _remove_tags.

You can still tag orders that are no longer editable, just make sure to pass in your PATCH request only the tag relationship, without changing any other attribute.

Validations

The use of tags is subject to specific restrictions and validations:

  • A maximum of 10 tags is allowed for each single resource object.

  • Each tag's name must be unique within a specific organization.

  • Each tag's name can have a maximum length of 25 chars.

  • Each tag's name must be alphanumeric and can contain underscores, hyphens, and colons (i.e. the allowed list of characters is: a—z, A—Z, 0—9, _, -, :). Spaces are not allowed.

Tags names aren't case-sensitive. If you use uppercase letters they will be converted to lowercase, so we recommend directly choosing lowercase names.

Sales channel abilities

Tags can be managed using integration API credentials. Sales channels are allowed to read tags associated with a small subset of the taggable resources:

Specifically:

  • Can retrieve the single tag associated with one of the resources above by querying the /api/tags/:id endpoint.

  • Can include tags when reading one of the resources above (e.g. /api/skus/:id?include=tags).

  • Cannot list tags by querying the /api/tags endpoint for any resource.

How-to

Check the related guide for all the information on how to tag a resource. See these examples — CSV / JSON — to learn how to export tags and these examples — CSV / JSON — to learn how to import tags.

Last updated