Creating, Updating, and Deleting Tags

Creating a Tag

API Endpoint

POST /v1/collections/{collectionId}/tagcategories/tags

URL Parameters

  • collectionId the ID of the Collection which will be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Request Body

There are two required fields for creating a Tag.

  • value the name of the Tag
  • categoryId the ID of the Category that will contain the Tag
Sample Request
{
  "categoryId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "value":"My Tag"
}

Response

The response will include the value and categoryId that was sent in along with the id of the Tag that was created.

Sample Response
{
  "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "categoryId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "value" : "My Tag"
}

Updating a Tag

API Endpoint

PUT /v1/collections/{collectionId}/tagcategories/tags/{tagId}

URL Parameters

  • collectionId the ID of the Collection which will be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • tagId the ID of the Tag to update

Request Body

There are two required fields for updating a Tag.

  • value the name of the Tag
  • categoryId the ID of the Category that will contain the Tag. The categoryId can be changed to move a Tag from one Category to another.
Sample Request
{
  "categoryId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "value":"My Updated Tag"
}

Response

The response will include the id, value and categoryId of the Tag that was updated.

Sample Response
{
  "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "categoryId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "value" : "My Updated Tag"
}

Deleting a Tag

API Endpoint

DELETE /v1/collections/{collectionId}/tagcategories/tags/{tagId}

URL Parameters

  • collectionId the ID of the Collection which will be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • tagId the ID of the Tag to delete

Request Body

There is no request body for this call.

Response

There is no response body for this call. The response will have the HTTP 204 status code if the Tag is successfully deleted.