Overview
The Services API allows you to manage beauty services offered by your center, including pricing, duration, and service codes. Services can be included in packs and bonuses.
The Service Object
Unique identifier for the service (UUID)
Service name (max 150 characters)
Detailed service description
Unique service code for internal reference (max 50 characters)
Tax rate percentage (default: 21.0)
Service duration in minutes (default: 30)
Service status: activo or inactivo (default: activo)
Service creation timestamp
List Services
curl -X GET "https://api.beils.com/api/services" \
-H "Authorization: Bearer YOUR_TOKEN"
Retrieves a list of all services in the system.
Query Parameters
Search services by name, description, or code (partial match)
Response
Returns an array of service objects, ordered by creation date (newest first).
[
{
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Deep Cleansing Facial",
"description": "Professional facial treatment with deep cleansing and hydration",
"code": "SRV-FACIAL-001",
"price": 65.00,
"tax_rate": 21.0,
"duration": 60,
"status": "activo",
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
},
{
"service_id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Relaxing Massage",
"description": "Full body relaxing massage with aromatherapy",
"code": "SRV-MASSAGE-001",
"price": 80.00,
"tax_rate": 21.0,
"duration": 90,
"status": "activo",
"created_at": "2024-03-14T14:20:00Z",
"updated_at": "2024-03-14T14:20:00Z"
}
]
Create Service
curl -X POST "https://api.beils.com/api/services" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Deep Cleansing Facial",
"description": "Professional facial treatment with deep cleansing and hydration",
"code": "SRV-FACIAL-001",
"price": 65.00,
"tax_rate": 21.0,
"duration": 60,
"status": "activo"
}'
Creates a new service in the system.
Body Parameters
Service name (max 150 characters)
Detailed service description
Unique service code (max 50 characters)
Tax rate percentage (default: 21.0)
Service duration in minutes (default: 30)
Service status: activo or inactivo (default: activo)
Response
Returns the created service object.
{
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Deep Cleansing Facial",
"description": "Professional facial treatment with deep cleansing and hydration",
"code": "SRV-FACIAL-001",
"price": 65.00,
"tax_rate": 21.0,
"duration": 60,
"status": "activo",
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
Get Service
curl -X GET "https://api.beils.com/api/services/{service_id}" \
-H "Authorization: Bearer YOUR_TOKEN"
Retrieves a specific service by ID.
Path Parameters
The unique service identifier
Response
Returns the service object.
Error Responses
Update Service
curl -X PUT "https://api.beils.com/api/services/{service_id}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Deep Cleansing Facial - Premium",
"price": 75.00,
"duration": 75
}'
Updates an existing service. Only provided fields will be updated.
Path Parameters
The unique service identifier
Body Parameters
All fields are optional. Only include the fields you want to update.
Service name (max 150 characters)
Service duration in minutes
Service status: activo or inactivo
Response
Returns the updated service object.
Delete Service
curl -X DELETE "https://api.beils.com/api/services/{service_id}" \
-H "Authorization: Bearer YOUR_TOKEN"
Deletes a service from the system.
Path Parameters
The unique service identifier
Response
Deleting a service will remove it from any packs or bonuses it’s associated with. Ensure these are updated before deletion.
Use Cases
Scheduling Integration
The duration field is essential for appointment scheduling. When creating bookings, the system uses the service duration to calculate appointment end times and prevent scheduling conflicts.
Service Bundles
Services can be included in Packs to create service bundles with special pricing. Multiple services can be combined with products to create comprehensive treatment packages.
Loyalty Programs
Services can be associated with Bonuses to create session-based loyalty programs where clients purchase multiple sessions at a discounted rate.