Skip to main content

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

service_id
string
required
Unique identifier for the service (UUID)
name
string
required
Service name (max 150 characters)
description
string
Detailed service description
code
string
Unique service code for internal reference (max 50 characters)
price
number
required
Service price
tax_rate
number
Tax rate percentage (default: 21.0)
duration
integer
Service duration in minutes (default: 30)
status
string
Service status: activo or inactivo (default: activo)
created_at
datetime
Service creation timestamp
updated_at
datetime
Last update 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

name
string
required
Service name (max 150 characters)
description
string
Detailed service description
code
string
Unique service code (max 50 characters)
price
number
required
Service price
tax_rate
number
Tax rate percentage (default: 21.0)
duration
integer
Service duration in minutes (default: 30)
status
string
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

service_id
string
required
The unique service identifier

Response

Returns the service object.

Error Responses

400
error
Service ID is required
404
error
Service not found

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

service_id
string
required
The unique service identifier

Body Parameters

All fields are optional. Only include the fields you want to update.
name
string
Service name (max 150 characters)
description
string
Service description
code
string
Service code
price
number
Service price
tax_rate
number
Tax rate percentage
duration
integer
Service duration in minutes
status
string
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

service_id
string
required
The unique service identifier

Response

{
  "success": true
}
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.

Build docs developers (and LLMs) love