booking_create
Create a new session/appointment for a client. providerId is optional — if omitted, the system auto-assigns a provider using the agenda assignment strategy (round_robin, least_booked, etc.). When a client has a titular provider, that provider is preferred automatically. Without providerId and without publicAgendaId, the org default public agenda is used. Preconditions: (1) service must exist and be active, (2) client must exist (use client_create first). Use availability_get_slots to find valid time slots before calling this. Set retroactive: true to register past sessions (skips slot validation, sets status to completed by default). Use autoCharge: true with retroactive to auto-generate the charge. Retroactive sessions are tagged with self_declared provenance. Max 365 days in the past. Past dates are auto-detected as retroactive — the retroactive flag is optional (system infers it from scheduledAt).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| apiKey | No | ||
| orgSlug | Yes | ||
| clientId | Yes | ||
| duration | No | ||
| modalidad | No | ||
| serviceId | Yes | ||
| autoCharge | No | ||
| providerId | No | ||
| retroactive | No | ||
| scheduledAt | Yes | ||
| idempotencyKey | No | ||
| publicAgendaId | No | ||
| retroactiveStatus | No |