Tags
The tag object and the allowed CRUD operations on the related resource endpoint
Last updated
The tag object and the allowed CRUD operations on the related resource endpoint
Last updated
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 of the related resource and leveraged to a list of a specific resource type (e.g. a list of SKUs, a list of customers, etc.). Tags can be also and 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 is fired, and the associated tag(s) are automatically included in the callback's payload.
At the moment tags are available for the following resources:
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.
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.
Specifically:
Can retrieve the single tag associated with one of the resources above by querying the /api/tags/:id
endpoint.
Cannot list tags by querying the /api/tags
endpoint for any resource.
If a tag is associated both with one (or more) of the resources above and one (or more) of the prohibited resources (e.g. SKUs and orders), the tag will still be readable by sales channels and includable when fetching the allowed resource (e.g. SKUs).
Tags can be managed using API credentials. are allowed to read tags associated with a small subset of the taggable resources:
Can tags when reading one of the resources above (e.g. /api/skus/:id?include=tags
).
Check the related for all the information on how to tag a resource. See these examples — / — to learn how to export tags and these examples — / — to learn how to import tags.