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étodoPathScopeDescripción
GET/slotsslots:readHorarios disponibles para un servicio
POST/holdsbookings:writeCrear pre-reserva de 10 minutos
POST/holds/{id}/confirmbookings:writeConfirmar (o pending_payment si pide seña)
DELETE/holds/{id}bookings:writeLiberar pre-reserva
GET/bookingsbookings:readListar (filtros: from, to, status, resource_id, customer_id)
POST/bookingsbookings:writePre-reserva + confirmación en una llamada
GET / PATCH/bookings/{id}bookings:read / writeLeer, actualizar notas o datos de intake
POST/bookings/{id}/cancelbookings:writeCancelar
POST/bookings/{id}/reschedulebookings:writeMover a un nuevo inicio
POST/bookings/{id}/check-inbookings:writeMarcar llegada
POST/bookings/{id}/no-showbookings:writeMarcar ausencia
MétodoPathScope
GET / POST/servicesconfig:read / config:write
GET / POST/resourcesconfig:read / config:write
GET/resource-groupsconfig:read
POST/schedules/{id}/overridesconfig:write

Clientes y conversaciones

MétodoPathScope
GET/customerscustomers:read
DELETE/customers/{id}customers:read + rol owner (anonimiza, LGPD)
GET/conversationsmessages:read
GET / POST/conversations/{id}/messagesmessages:read / messages:write
POST/conversations/{id}/handoffmessages:write

Plataforma

MétodoPathScope
GET/mecualquiera
GET / POST/webhook-endpointswebhooks:manage
GET/eventsbookings: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).