Listing, Creating, Updating, and Deleting Tag Categories

Listing Tag Categories

API Endpoint

GET /v1/collections/{collectionId}/tagscategories

URL Parameters

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

Request Body

There is no request body, this is a GET request.

Response

The response will include an array of Tag Categories, including that category's id, name and whether it is the Collection's defaultCategory. Additionally, there will be an array of tags that are part of the Tag Category.

Sample Response
[
  {
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "dateCreated": "2016-01-01T00:00:00.000+0000",
    "createdBy": {
      "email": "xxx@xyz.com"
    },
    "defaultCategory": true,
    "name": "Fruits",
    "tags": [
      {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "value": "Apple"
      },
      {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "value": "Banana"
      }
    ]
  },
  {
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "dateCreated": "2016-01-01T00:00:00.000+0000",
    "createdBy": {
      "email": "xxx@xyz.com"
    },
    "name": "Colors",
    "tags": [
      {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "value": "Orange"
      }
    ]
  }
]

Creating a Tag Category

API Endpoint

POST /v1/collections/{collectionId}/tagscategories

URL Parameters

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

Request Body

There one required field for creating a Tag Category...

  • name the name of the tag category
Sample Request
{
  "name":"My Tag Category"
}

Response

The response will include the name along with the id of the Tag Category that was created.

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

Updating a Tag Category

API Endpoint

PUT /v1/collections/{collectionId}/tagcategories/{tagCategoryId}

URL Parameters

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

Request Body

There is one required fields for updating a Tag Category.

  • name the name of the tag
Sample Request
{
  "value":"My Updated Tag Category"
}

Response

The response will include the id and the name of the Tag Category that was updated.

Sample Response
{
  "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name" : "My Updated Tag Category"
}

Deleting a Tag Category

API Endpoint

DELETE /v1/collections/{collectionId}/tagCategories/{tagCategoryId}

URL Parameters

  • collectionId the ID of the Collection which will be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • tagCategoryId the ID of the Tag Category 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 Category is successfully deleted.