Skip to main content

Manage Categories

This section describes how you can add and remove categories from charts through the API.

Note

Seats.io creates a draft chart version when you update a chart's categories. If a draft version already exists, that draft gets updated.
This does not apply to charts without events. For those charts we don't create a draft version.

Adding a category

curl https://api-{region}.seatsio.net/charts/{chartKey}/categories \
-u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"key": "1"}'
{
"key": "1",
"label": "Category 1",
"color": "#bbbbbb",
"accessible": true
}

Response is either:

  • 204 - No Content: if everything went well
  • 400 - Bad Request if something was wrong with the request, check the response body for more information.
  • 404 - Not Found: e.g. if the specified chart key does not exist

Removing a category

curl -X DELETE https://api-{region}.seatsio.net/charts/{chartKey}/categories/{categoryKey} -u aSecretKey:

Response is either:

  • 204 - No Content: if everything went well
  • 400 - Bad Request if something was wrong with the request, check the response body for more information.
  • 404 - Not Found: e.g. if the specified chart key does not exist, or if the category was not present on the chart.

Listing categories for a chart

curl -X GET https://api-{region}.seatsio.net/charts/{chartKey}/categories -u aSecretKey:

Response is either:

  • 200 - OK: if everything went well
  • 400 - Bad Request if something was wrong with the request, check the response body for more information.
  • 404 - Not Found: e.g. if the specified chart key does not exist, or if the category was not present on the chart.

Updating a category

curl -X PSOT https://api-{region}.seatsio.net/charts/{chartKey}/categories/{categoryKey} -u aSecretKey:
{
"label": "Updated label",
"color": "#bbbbbb",
"accessible": true
}

Response is either:

  • 204 - OK: if everything went well
  • 400 - Bad Request if something was wrong with the request, check the response body for more information.
  • 404 - Not Found: e.g. if the specified chart key does not exist, or if the category was not present on the chart.