Tagging resources
How to tag a resource via API
Most of Commerce Layer's resources can be tagged using one or more existing tags. To do that, you need to update the resource setting the relationship with the desired tag(s).
Updating resourcesA maximum of 10 tags is allowed for each single resource object.
Example
The following request tags the resource identified by the "xYZkjABcde" ID with the two tags identified by the "geJmexflJQ" and "mWJAPvfBaV" IDs:
Removing tags
To remove one or more tags from a resource you need to update the resource setting the relationship with the updated list of tags. To remove all the tags from a resource, just set the tags relationship as an empty array.
Deleting a tag automatically removes any existing association.
Example
The following request removes all the tags associated with the resource identified by the "xYZkjABcde" ID:
Last updated