GET
Listado de reservas
Scope:
crm:booking-services.readhttps://api.holded.com/api/v2/bookingsDevuelve una lista paginada de reservas de tu cuenta.
Parámetros
Parámetros de consulta
start_date
string<date-time>opcionalFiltrar reservas a partir de esta fecha (ISO 8601)
end_date
string<date-time>opcionalFiltrar reservas hasta esta fecha (ISO 8601)
service_id
stringopcionalFiltrar por identificador de servicio
sort_field
stringopcionalCampo por el que ordenar
"start_time""created_at"sort_order
stringopcionalDirección de ordenación
"asc""desc"cursor
stringopcionalCursor opaco para paginación
limit
integeropcional= 50Número de elementos por página
Petición
python
import requests
url = "https://api.holded.com/api/v2/bookings?start_date=2024-01-01T00:00:00+00:00&end_date=2024-12-31T23:59:59+00:00&service_id=value"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
json
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"start_time": "2024-01-15T10:30:00+00:00",
"end_time": "2024-01-15T11:30:00+00:00",
"duration": 3600,
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-15T10:30:00Z",
"status": "confirmed",
"service": {
"id": "507f1f77bcf86cd799439011",
"name": "string",
"description": "string",
"duration": 3600,
"subtotal": {
"amount": "...",
"currency": "..."
},
"total": {
"amount": "...",
"currency": "..."
}
},
"space": {
"id": "507f1f77bcf86cd799439011",
"name": "string"
},
"outcome": {
"document_id": "string",
"type": "string",
"exported_at": "2024-01-15T10:30:00Z"
},
"custom_fields": [
{
"key": "...",
"label": "...",
"type": "...",
"value": "..."
}
]
}
],
"cursor": "string",
"has_more": false
}Respuestas exitosas
200Listado de reservasapplication/jsonobject
items[]object[]
idstring
Unique identifier of the booking
start_timestring<date-time>
Start time in ISO 8601 format
end_timestring<date-time>
End time in ISO 8601 format
durationinteger
Duration in seconds
created_atstring<date-time>
Creation timestamp in ISO 8601 format
updated_atstring<date-time> | null
Last update timestamp in ISO 8601 format
statusstring
Booking status
Enum:
confirmedcancelledserviceobject
Service associated with this booking
spaceobject
Space where the booking takes place
outcomeobject | null
Exported document linked to this booking
custom_fields[]object[]
Custom field values associated with the booking
cursorstring | null
has_moreboolean
Respuestas de error
400Fecha, service_id o cursor con formato incorrectoapplication/json401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json429Límite de solicitudes excedidoapplication/json