Skip to main content
GET
/
categories
Browse Categories
curl --request GET \
  --url https://htsapi.com/v1/categories \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 123,
      "code": "<string>",
      "normalized_code": "<string>",
      "description": "<string>",
      "indent": 123,
      "has_children": true
    }
  ]
}
Browse the hierarchical tree structure of codes. Returns top-level chapters or children of a specified parent code.

Parameters

ParameterTypeRequiredDescription
parentstringNoParent code to get children of (e.g., ‘8517’)
depthintegerNoHow many levels deep (default: 1, max: 3)

Example Request

Get top-level chapters:
curl -X GET "https://htsapi.com/v1/categories" \
  -H "Authorization: Bearer hts_your_api_key"
Get children of a specific code:
curl -X GET "https://htsapi.com/v1/categories?parent=8517&depth=1" \
  -H "Authorization: Bearer hts_your_api_key"

Example Response

{
  "data": [
    {
      "id": 1234,
      "code": "8517",
      "normalized_code": "8517",
      "description": "Telephone sets, including telephones for cellular networks or for other wireless networks",
      "indent": 0,
      "has_children": true
    },
    {
      "id": 1235,
      "code": "8518",
      "normalized_code": "8518",
      "description": "Microphones and stands therefor; loudspeakers, whether or not mounted in their enclosures",
      "indent": 0,
      "has_children": true
    }
  ]
}

Response Fields

  • has_children: Boolean indicating if the code has child codes
  • indent: Hierarchy level (0 = top level)

Use Cases

  • Build tree navigation interfaces
  • Explore code hierarchies
  • Display category structures
  • Implement breadcrumb navigation

Authorizations

Authorization
string
header
required

API key as Bearer token. Format: Bearer hts_your_api_key

Query Parameters

parent
string

Parent code to get children of

Maximum string length: 50
depth
integer
default:1

How many levels deep (default: 1, max: 3)

Required range: 1 <= x <= 3

Response

Category tree

data
object[]