Skip to main content
GET
/
categories
/
:identifier
curl --request GET \
  --url https://api.example.com/categories/1
{
  "id": 1,
  "name": "Teas",
  "slug": "teas",
  "isActive": true,
  "createdAt": "2024-03-10T12:00:00.000Z"
}
Retrieves a single category by its ID or slug.

Path Parameters

identifier
string
required
Category ID (numeric) or slug (string). The endpoint automatically detects whether the identifier is numeric or a slug.

Response

data
Category
Category object
curl --request GET \
  --url https://api.example.com/categories/1
{
  "id": 1,
  "name": "Teas",
  "slug": "teas",
  "isActive": true,
  "createdAt": "2024-03-10T12:00:00.000Z"
}

Build docs developers (and LLMs) love