Services
Base path: /api/services
GET /services
Get all services with category data.
Auth: Logged in
Response:
[
{
"id": 1,
"name": "Haircut",
"duration_min": 30,
"price": 25.00,
"category_id": 1,
"category_name": "Hair",
"category_color": "#6e56cf",
"vat_rate_id": null
}
]
POST /services
Create a new service.
Auth: Admin
Request body:
| Field | Type | Required |
|---|---|---|
name | string | Yes |
duration_min | integer | Yes |
price | number | Yes |
category_id | integer | No |
vat_rate_id | integer | No |
PUT /services/:id
Update a service.
Auth: Admin
Request body: name, duration_min, price, category_id, position
DELETE /services/:id
Delete a service.
Auth: Admin
Categories
GET /services/categories
Get all service categories.
POST /services/categories
Create a new category.
Auth: Admin
| Field | Type | Required | Default |
|---|---|---|---|
name | string | Yes | — |
color | string (hex) | No | #6e56cf |
PUT /services/categories/:id
Update a category (name, colour, position).
Auth: Admin
DELETE /services/categories/:id
Delete a category.
Auth: Admin