GET
Obtenir horaris disponibles d'una ubicació
Scope:
crm:booking-services.readhttps://api.holded.com/api/v2/booking-locations/{locationId}/slotsRetorna els horaris disponibles per a un servei específic en una ubicació en un dia determinat.
Paràmetres
Paràmetres de ruta
locationId
stringobligatoriID de la ubicació (ObjectId hexadecimal de 24 caràcters)
Paràmetres de consulta
service_id
stringobligatoriIdentificador del servei
day
string<date>obligatoriData en format AAAA-MM-DD
Petició
python
import requests
url = "https://api.holded.com/api/v2/booking-locations/{locationId}/slots?service_id=value&day=2024-01-15"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
json
{
"items": [
{
"from": "2024-01-15T10:30:00+01:00",
"to": "2024-01-15T11:30:00+01:00",
"duration": 3600
}
],
"form": [
{
"key": "name",
"label": "Name",
"type": "text",
"required": true
}
]
}Respostes exitoses
200Llistat d'horaris disponiblesapplication/jsonobject
items[]object[]
fromstring<date-time>
Slot start in ISO 8601 format with timezone offset. Pass this value directly as `date_time` when creating a booking.
tostring<date-time>
Slot end in ISO 8601 format with timezone offset
durationinteger
Slot duration in seconds
form[]object[]
Booking form fields that must be collected from the user and passed as custom_fields when creating the booking.
keystring
Field key to use in custom_fields
labelstring
Human-readable field label
typestring
Field type
Enum:
textnumberdateemailselectradiocheckboxrequiredboolean
Whether the field is required
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Ubicació no trobadaapplication/json429Límit de sol·licituds exceditapplication/json