Borrador
Endpoints
Todos los endpoints de la v1 de un vistazo, con los formatos más comunes de request y respuesta.
El contrato legible por máquina está en el repositorio, en packages/openapi/openapi.yaml (OpenAPI 3.1).
Agenda
| Método | Path | Scope | Descripción |
|---|---|---|---|
| GET | /slots | slots:read | Horarios disponibles para un servicio |
| POST | /holds | bookings:write | Crear pre-reserva de 10 minutos |
| POST | /holds/{id}/confirm | bookings:write | Confirmar (o pending_payment si pide seña) |
| DELETE | /holds/{id} | bookings:write | Liberar pre-reserva |
| GET | /bookings | bookings:read | Listar (filtros: from, to, status, resource_id, customer_id) |
| POST | /bookings | bookings:write | Pre-reserva + confirmación en una llamada |
| GET / PATCH | /bookings/{id} | bookings:read / write | Leer, actualizar notas o datos de intake |
| POST | /bookings/{id}/cancel | bookings:write | Cancelar |
| POST | /bookings/{id}/reschedule | bookings:write | Mover a un nuevo inicio |
| POST | /bookings/{id}/check-in | bookings:write | Marcar llegada |
| POST | /bookings/{id}/no-show | bookings:write | Marcar ausencia |
Catálogo
| Método | Path | Scope |
|---|---|---|
| GET / POST | /services | config:read / config:write |
| GET / POST | /resources | config:read / config:write |
| GET | /resource-groups | config:read |
| POST | /schedules/{id}/overrides | config:write |
Clientes y conversaciones
| Método | Path | Scope |
|---|---|---|
| GET | /customers | customers:read |
| DELETE | /customers/{id} | customers:read + rol owner (anonimiza, LGPD) |
| GET | /conversations | messages:read |
| GET / POST | /conversations/{id}/messages | messages:read / messages:write |
| POST | /conversations/{id}/handoff | messages:write |
Plataforma
| Método | Path | Scope |
|---|---|---|
| GET | /me | cualquiera |
| GET / POST | /webhook-endpoints | webhooks:manage |
| GET | /events | bookings:read |
Ejemplo: slots
GET /v1/slots?service_id=svc_laser&from=2026-10-20T09:00:00-03:00&to=2026-10-20T20:00:00-03:00&around=2026-10-20T18:00:00-03:00
{
"data": [
{ "start": "2026-10-20T17:45:00-03:00", "end": "2026-10-20T18:30:00-03:00", "resource_ids": ["res_ana", "res_laser1", "res_room2"] },
{ "start": "2026-10-20T18:45:00-03:00", "end": "2026-10-20T19:30:00-03:00", "resource_ids": ["res_carla", "res_laser1", "res_room1"] }
],
"unavailable_reason": null
}
Ejemplo: objeto de reserva
{
"id": "bkg_7Qx1",
"status": "confirmed",
"service_id": "svc_laser",
"start": "2026-10-20T17:45:00-03:00",
"end": "2026-10-20T18:30:00-03:00",
"party_size": 1,
"customer": { "id": "cus_31", "name": "Marina", "phone": "+5521988887777", "locale": "pt" },
"allocations": [
{ "resource_id": "res_ana", "start": "2026-10-20T17:45:00-03:00", "end": "2026-10-20T18:40:00-03:00", "units": 1 },
{ "resource_id": "res_laser1", "start": "2026-10-20T17:45:00-03:00", "end": "2026-10-20T18:40:00-03:00", "units": 1 },
{ "resource_id": "res_room2", "start": "2026-10-20T17:45:00-03:00", "end": "2026-10-20T18:40:00-03:00", "units": 1 }
],
"payment": { "status": "paid", "amount_cents": 5000 },
"source": "whatsapp",
"created_at": "2026-10-19T11:02:13-03:00"
}
Las asignaciones incluyen el buffer (acá, 10 minutos después del servicio).