GET
Obtener horarios disponibles de una ubicación
Scope:
crm:booking-services.readhttps://api.holded.com/api/v2/booking-locations/{locationId}/slotsDevuelve los horarios disponibles para un servicio específico en una ubicación en un día determinado.
Parámetros
Parámetros de ruta
locationId
stringobligatorioID de la ubicación (ObjectId hexadecimal de 24 caracteres)
Parámetros de consulta
service_id
stringobligatorioIdentificador del servicio
day
string<date>obligatorioFecha en formato AAAA-MM-DD
Petición
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())Respuestas
Respuesta
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
}
]
}Respuestas exitosas
200Listado de horarios 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
Respuestas de error
400Solicitud incorrectaapplication/json401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Ubicación no encontradaapplication/json429Límite de solicitudes excedidoapplication/json