API Reference
Complete REST API to integrate all SalonBookIt features into your application.
Introduction
The SalonBookIt API allows you to:
- Query business, services and professionals information
- Check schedule availability
- Create and manage bookings
- Manage customers and their points program
- Process payments with Stripe
Base URL
https://app.salonbookit.com/api/v1
Response format
All responses follow the same format:
JSON (Success)
{
"success": true,
"data": {
// Response data
}
}
JSON (Error)
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Error description"
}
}
Authentication
The API uses two authentication methods:
API Key (Always required)
Identifies your business. Sent in the header X-API-Key.
X-API-Key: hh_pub_live_abc123...
JWT Token (Private endpoints)
Authenticates the customer. Sent in the header Authorization.
Authorization: Bearer eyJhbG...
See the complete authentication guide.
Available endpoints
Catalog (Public)
| Method | Endpoint | Description |
|---|---|---|
| GET | /negocio/ |
Business information |
| GET | /servicios/ |
Services list |
| GET | /servicios/{id}/ |
Service detail |
| GET | /peluqueros/ |
Professionals list |
| GET | /peluqueros/{id}/ |
Professional detail |
| GET | /disponibilidad/{peluquero}/{fecha}/ |
Available schedules |
| GET | /categorias/ |
Service categories |
| GET | /productos/ |
Store products |
Authentication
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/registro/ |
Register new customer |
| POST | /auth/login/ |
Log in |
| POST | /auth/verify-otp/ |
Verify OTP |
| POST | /auth/refresh/ |
Renew JWT token |
Bookings (Authenticated)
| Method | Endpoint | Description |
|---|---|---|
| POST | /reservas/crear/ |
Create booking |
| GET | /cliente/reservas/ |
My bookings |
| GET | /reservas/{id}/ |
Booking detail |
| POST | /reservas/{id}/cancelar/ |
Cancel booking |
Payments
| Method | Endpoint | Description |
|---|---|---|
| POST | /pagos/intent/ |
Create PaymentIntent |
| POST | /pagos/confirmar/ |
Confirm payment |
Customer (Authenticated)
| Method | Endpoint | Description |
|---|---|---|
| GET | /cliente/perfil/ |
My profile |
| PUT | /cliente/perfil/ |
Update profile |
| GET | /cliente/puntos/ |
My points |
Pagination
Endpoints that return lists support pagination:
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | Page number |
page_size |
integer | 20 | Items per page (max 100) |
Paginated response
JSON
{
"success": true,
"data": {
"items": [...],
"pagination": {
"page": 1,
"page_size": 20,
"total_items": 45,
"total_pages": 3,
"has_next": true,
"has_prev": false
}
}
}
Filters
Many endpoints support filters via query parameters. Check each endpoint's documentation for available filters.
Example
HTTP
GET /api/v1/servicios/?categoria=1&activo=true&lang=es
HTTP codes
| Code | Meaning |
|---|---|
200 OK |
Successful request |
201 Created |
Resource created successfully |
400 Bad Request |
Error in sent parameters |
401 Unauthorized |
Required or invalid authentication |
403 Forbidden |
No permissions for this action |
404 Not Found |
Resource not found |
429 Too Many Requests |
Rate limit exceeded |
500 Internal Server Error |
Server error |
See the complete error reference.