GET
Llistat de reserves
Scope:
crm:booking-services.readhttps://api.holded.com/api/v2/bookingsRetorna una llista paginada de reserves del teu compte.
Paràmetres
Paràmetres de consulta
start_date
string<date-time>opcionalFiltrar reserves a partir d'aquesta data (ISO 8601)
end_date
string<date-time>opcionalFiltrar reserves fins a aquesta data (ISO 8601)
service_id
stringopcionalFiltrar per identificador de servei
sort_field
stringopcionalCamp pel qual ordenar
"start_time""created_at"sort_order
stringopcionalAdreça d'ordenació
"asc""desc"cursor
stringopcionalCursor opac per a la paginació
limit
integeropcional= 50Nombre d'elements per pàgina
Petició
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())Respostes
Resposta
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
}Respostes exitoses
200Llistat de reservesapplication/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
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json