curl --request GET \
--url https://api.example.com/api/agenda/bookings{
"bookings": [
{
"booking_id": "<string>",
"client_id": "<string>",
"client": {
"name": "<string>",
"surname": "<string>",
"phone": "<string>"
},
"staff_id": {},
"staff": {
"name": "<string>",
"surname": "<string>"
},
"item_type": "<string>",
"item_id": "<string>",
"status": "<string>",
"booking_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"duration": 123,
"notes": {},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"401 Unauthorized": {}
}Retrieve a list of bookings with optional filtering by date range, staff member, or client
curl --request GET \
--url https://api.example.com/api/agenda/bookings{
"bookings": [
{
"booking_id": "<string>",
"client_id": "<string>",
"client": {
"name": "<string>",
"surname": "<string>",
"phone": "<string>"
},
"staff_id": {},
"staff": {
"name": "<string>",
"surname": "<string>"
},
"item_type": "<string>",
"item_id": "<string>",
"status": "<string>",
"booking_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"duration": 123,
"notes": {},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"401 Unauthorized": {}
}auth_token cookie.
Authorization: Bearer YOUR_TOKEN
2024-03-012024-03-31Show Booking Object
service or packpending: Booking created but not confirmedconfirmed: Booking confirmedcompleted: Service completedcancelled: Booking cancelledno_show: Client did not show up09:3010:3060curl -X GET 'https://api.beils.com/api/agenda/bookings' \
-H 'Authorization: Bearer YOUR_TOKEN'
[
{
"booking_id": "abc123-def456-ghi789",
"client_id": "client-uuid-123",
"client": {
"name": "María",
"surname": "García",
"phone": "+34 600 123 456"
},
"staff_id": "staff-uuid-456",
"staff": {
"name": "Ana",
"surname": "López"
},
"item_type": "service",
"item_id": "service-uuid-789",
"status": "confirmed",
"booking_date": "2024-03-15T00:00:00.000Z",
"start_time": "10:00",
"end_time": "11:00",
"duration": 60,
"notes": "Client prefers window seat",
"created_at": "2024-03-01T08:30:00.000Z",
"updated_at": "2024-03-01T08:30:00.000Z"
}
]
{
"statusCode": 401,
"statusMessage": "Unauthorized: Token is missing or invalid"
}
start and end parameters must be provided togetherbooking_date ascending, then start_time ascending