Saltar al contenido principal
GET

Obtener horarios disponibles de una ubicación

Scope:crm:booking-services.read
https://api.holded.com/api/v2/booking-locations/{locationId}/slots

Devuelve los horarios disponibles para un servicio específico en una ubicación en un día determinado.

Parámetros

Parámetros de ruta

locationIdstringobligatorio

ID de la ubicación (ObjectId hexadecimal de 24 caracteres)

Parámetros de consulta

service_idstringobligatorio

Identificador del servicio

daystring<date>obligatorio

Fecha 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/json
object
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:textnumberdateemailselectradiocheckbox
requiredboolean

Whether the field is required

Respuestas de error

400Solicitud incorrectaapplication/json
401API key inválida o no proporcionadaapplication/json
403Permisos insuficientesapplication/json
404Ubicación no encontradaapplication/json
429Límite de solicitudes excedidoapplication/json