Dictionary - Product Categories

The categories dictionary provides the taxonomy of all product categories.
Use it to enrich products, build filters, or power a category tree in your UI.

Base URL: https://api.salescaddy.ai/api


Endpoints

  • GET /categories
    Returns the full dictionary (JSON). With export=true → CSV file (binary).

  • GET /categories/{categoryId}
    Returns details for a specific category.

Headers

  • Authorization: Bearer <token> — required
  • X-On-Behalf-Of-User: [email protected] — required only when export=true

Example — Get all categories (JSON)

curl -X 'GET' \
  'https://api.salescaddy.ai/api/dictionary/product-categories' \
  -H 'accept: application/json' \
-H "Authorization: Bearer $TOKEN"
const url = "https://api.salescaddy.ai/api/categories";
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.TOKEN}` } });
console.log(await res.json());
import os, requests
r = requests.get("https://api.salescaddy.ai/api/categories",
                 headers={"Authorization": f"Bearer {os.environ['TOKEN']}"})
print(r.json())
using System.Net.Http.Headers;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", TOKEN);
var res = await http.GetAsync("https://api.salescaddy.ai/api/categories");
Console.WriteLine(await res.Content.ReadAsStringAsync());

Sample response (trimmed):

[
  {
    "id": "0021cc0f-8110-4bc5-8fa0-536ad7052d5d",
    "name": "Virtual Desktop Infrastructure (VDI)"
  },
  {
    "id": "002f4fa6-ea2d-41e8-a776-3876b3080674",
    "name": "URL Shortener"
  },
  {
    "id": "00310aff-86ea-4e11-b032-8606c598ddab",
    "name": "Tax & Revenue Collection"
  },
  {
    "id": "0050a89e-7e31-400d-87d6-a546b3b3671c",
    "name": "Other Political"
  },
....
]

Tips & best practices

  • Categories form a hierarchy (use parentId to build a tree).
  • Use categoryId when searching products or joining usage metrics.
  • Cache this dictionary (changes infrequently).
  • For large analytics, prefer CSV export.

Errors

CodeMeaningHow to fix
400Bad requestValidate query/path.
401UnauthorizedProvide/refresh Bearer token.
403ForbiddenCheck client permissions; include X-On-Behalf-Of-User for CSV.
404Not foundCategory not found.
429Rate limit exceededRetry with exponential backoff.
500Internal server errorRetry later; contact support if persistent.