Tags are a subset of vWork's Health and Safety module and are generally not enabled by default.
Tags need to be defined in your account before they can be added to your assets. This can be done via the website or via the Tags API route. This section of the documentation assumes some tags already exist for your account.
Once created, you can add specific tags to your assets. Jobs associated with an asset will inherit the tags from the asset. This will prevent your dispatchers from assigning jobs to workers that do not have the required qualifications for a certain job.
If you need to include a tag on the asset, you can PUT or POST an array of tag IDs in the job XML.
The following example adds tag 123 and tag 456 to the asset.
<taggings type="array">
<tagging>
<tag_id>123</tag_id>
</tagging>
<tagging>
<tag_id>456</tag_id>
</tagging>
</taggings>To remove 1 tag from an asset, you would PUT the following XML to the asset. (In this situation, you reference the tag ID from the asset, not the tag ID from the account.)
<?xml version="1.0" encoding="utf-8"?>
<asset>
<taggings type="array">
<tagging>
<id>11407022</id>
<_destroy>true</_destroy>
</tagging>
</taggings>
</asset> If you wish to remove all tags from an asset, then you can PUT an empty array, like so:
<?xml version="1.0" encoding="utf-8"?>
<asset>
<taggings type="array">
</taggings>
</asset> You can retrieve a list of tags for your account via the API using the tags route.