http://localhost:8000/api/category
All routes below are prefixed with this base URL.
Fetch all categories with their subcategories.
{
"success": true,
"count": 1,
"data": [
{
"_id": "69a5b5e4930e55ca0f4c92d0",
"name": "Plastic",
"price": "20"
"icon": "📦",
"description": "Plastic bottles, containers, bags, and other plastic items",
"subcategories": [
{
"name": "Bottles",
"_id": "69a5b5f2930e55ca0f4c92d7"
}
],
"createdAt": "2026-03-02T16:08:04.877Z",
"updatedAt": "2026-03-02T16:08:18.609Z",
"__v": 1
}
]
}