Salon Services
Services are linked to a specific salon. Each master can have their own price for a service (service_master_prices).
List Services
GET /api/v1/salons/:id/services
List of salon services with prices per master. Public.
Response 200
{
"success": true,
"status": "200",
"message": "Services retrieved successfully",
"errors": null,
"data": [
{
"id": "uuid",
"name": "Men's Haircut",
"description": "Classic cut",
"duration_min": 30,
"category": "barbershop",
"masters": [
{
"master_id": "uuid",
"price": 150.0,
"first_name": "Ion",
"last_name": "Popescu"
}
]
}
]
}
Add Service
POST /api/v1/salons/:id/services
Add a service to the salon. Salon owner only.
Request
{
"service": {
"name": "Men's Haircut",
"description": "Classic cut",
"duration_min": 30,
"category_id": "uuid"
}
}
Response 201
{
"success": true,
"status": "201",
"message": "Service added successfully",
"errors": null,
"data": {
"id": "uuid",
"name": "Men's Haircut",
"description": "Classic cut",
"duration_min": 30,
"category": "barbershop",
"masters": []
}
}
Update Service
PATCH /api/v1/salons/:id/services/:salon_service_id
Update a service. Salon owner only.
Request
{
"service": {
"name": "Updated Name",
"duration_min": 45
}
}
Response 200
Same body as POST response.
Delete Service
DELETE /api/v1/salons/:id/services/:salon_service_id
Delete a service. Salon owner only.
Response 200
{
"success": true,
"status": "200",
"message": "Service deleted successfully",
"errors": null,
"data": null
}
List Service Masters
GET /api/v1/salons/:id/services/:salon_service_id/masters
List of masters assigned to a service with prices. Public.
Response 200
{
"success": true,
"status": "200",
"message": "Masters retrieved successfully",
"errors": null,
"data": [
{
"master_id": "uuid",
"price": 150.0,
"first_name": "Ion",
"last_name": "Popescu"
}
]
}
Assign Master to Service
POST /api/v1/salons/:id/services/:salon_service_id/masters
Assign a master to a service with a price. Salon owner only.
Request
{
"master_id": "uuid",
"price": 150.0
}
Response 201
{
"success": true,
"status": "201",
"message": "Master assigned successfully",
"errors": null,
"data": {
"master_id": "uuid",
"price": 150.0,
"first_name": "Ion",
"last_name": "Popescu"
}
}
Update Master Price
PATCH /api/v1/salons/:id/services/:salon_service_id/masters/:master_id
Update a master's price for a service. Salon owner only.
Request
{
"price": 200.0
}
Response 200
{
"success": true,
"status": "200",
"message": "Price updated successfully",
"errors": null,
"data": {
"master_id": "uuid",
"price": 200.0,
"first_name": "Ion",
"last_name": "Popescu"
}
}
Remove Master from Service
DELETE /api/v1/salons/:id/services/:salon_service_id/masters/:master_id
Remove a master from a service. Salon owner only.
Response 200
{
"success": true,
"status": "200",
"message": "Master removed successfully",
"errors": null,
"data": null
}