Categories
Global catalog of service categories (barbershop, nails, spa, etc.). Hierarchy via parent_id. Public.
List Categories
GET /api/v1/categories
Full category tree.
Response 200
{
"success": true,
"status": "200",
"message": "Categories retrieved successfully",
"errors": null,
"data": [
{
"id": 1,
"name": "Hair",
"slug": "hair",
"position": 1,
"parent_id": null
},
{
"id": 2,
"name": "Barbershop",
"slug": "barbershop",
"position": 1,
"parent_id": 1
}
]
}
Get Category
GET /api/v1/categories/:id
Single category by ID.
Response 200
{
"success": true,
"status": "200",
"message": "Category retrieved successfully",
"errors": null,
"data": {
"id": 2,
"name": "Barbershop",
"slug": "barbershop",
"position": 1,
"parent_id": 1
}
}
Response 404
{
"success": false,
"status": "404",
"message": "Category not found",
"errors": null,
"data": null
}