Skip to main content

Categories

List categories

GET /access/api/v1/categories

Query parameters:

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page
termstringSearch by category name
parentstringFilter by parent category ID

Response:

{
"status": "success",
"currentPage": 1,
"totalPages": 11,
"totalDocuments": 541,
"hasNextPage": true,
"data": [
{
"_id": "6985925cd59ed6381f73dac2",
"name": "Footwear",
"slug": "footwear",
"featured": true,
"parent": null,
"image": {
"_id": "6985925dd59ed6381f73f026",
"type": "image/jpeg",
"size": "159472",
"title": "footwear.jpg",
"uploadUrl": "67e3cd865bf29cd7117f53a8/media/footwear.jpg"
},
"hasChildren": false
}
]
}

image is null if no image is set. hasChildren indicates whether the category has subcategories. uploadUrl is a relative path — prepend media.url from the settings response to build the full URL:

const imageUrl = settings.media.url + category.image.uploadUrl;

Get single category

GET /access/api/v1/categories/:id

:id accepts either the category slug or the category _id.

Response:

{
"status": "success",
"data": {
"_id": "6985925cd59ed6381f73dac2",
"name": "Footwear",
"slug": "footwear",
"featured": true,
"parent": null,
"description": "<p>Category description...</p>",
"date": "2026-02-05T02:15:46.782Z",
"image": {
"_id": "6985925dd59ed6381f73f026",
"type": "image/jpeg",
"size": "159472",
"title": "footwear.jpg",
"uploadUrl": "67e3cd865bf29cd7117f53a8/media/footwear.jpg"
},
"headerImage": {
"_id": "69ac367da7e93c257591ff5c",
"type": "image/png",
"size": "124694",
"title": "footwear-header.png",
"uploadUrl": "67e3cd865bf29cd7117f53a8/media/footwear-header.png"
}
}
}

image, headerImage, and parent may be null. description is an HTML string. Both uploadUrl fields are relative paths — prepend media.url from settings to build the full URL.

Possible errors: CATEGORY_NOT_FOUND