Retrieve a category

GET https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}

This API helps you to retrieve the details of a category.

You must specify the unique identifier of the location (center) as center_id and the unique identifier of the category as category_id in the API request. The API then retrieves the details of the category.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

GET /v1/centers/{center_id}/categories/{category_id}

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
center_id string Yes Mandatory Unique 32-character identifier of the center.
category_id string Yes Mandatory Unique 32-character identifier of the category.

Query parameters

Parameter Type Required Default Description
type enum (1, 2, 3, 4, 5, 6) No 1 Optional Indicates the type of categories: Services - 1, Products - 2, Memberships - 3, Packages - 4. Default value is Services.

Response

Success (200 OK)

{
  "id": "80e4819c-39d8-46e6-875d-be054c421280",
  "code": "",
  "name": "Hair Replacement",
  "parent_category_id": "41ac7424-8bde-461c-9c88-8e794c9ec77b",
  "description": "",
  "html_description": "",
  "show_in_catalog": true,
  "display_order": {}
}

Response fields

Field Type Description
id string
code string
name string
parent_category_id string
description string
html_description string
show_in_catalog boolean
display_order object

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
    "https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/centers/{center_id}/categories/{category_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded