Actions34
- Cliente Actions
- Catálogo Actions
- Pedido Actions
- Conversa Actions
- Contexto Actions
- Telemetria Actions
- Canal WhatsApp Actions
- Paciente Actions
- Procedimento Actions
- Agenda Actions
- Agendamento Actions
- Lembrete Odonto Actions
Agendamento → Alterar
AI-generatedSummary
Alter an existing appointment's details such as start and end times, associated procedure and professional, and status by providing administrative proof for authorization.
Inputs
- Token ID Dinamico — Optional dynamic token returned by the multi-tenant bootstrap; used together with the dynamic Signing Secret.
- Signing Secret Dinamico — Optional ephemeral secret from the bootstrap; do not log or expose this value.
- Telefone Oficial do Canal (required) — Official channel phone number from the authenticated channel envelope; must not come from $fromAI.
- Nome do Paciente (required) — Patient name provided by the contact to identify the correct person.
- Token do Agendamento (required) — Appointment token generated prior to the LLM; provide a fixed expression from a secure branch, never from $fromAI.
- Agendamento ID (required) — UUID of the appointment, obtained from a prior authorized query in the same deterministic branch.
- Início (remarcar) — ISO 8601 start time of the appointment for rescheduling; leave empty to keep the current start time.
- Fim (remarcar) — ISO 8601 end time for rescheduling; leave empty to keep or recalculate based on the start time.
- Procedimento (ID, alterar) — UUID of the new procedure to link to the appointment; leave empty to leave unchanged, use 'null' to unlink.
- Profissional (ID, alterar) — UUID of the new professional assigned to the appointment; leave empty to leave unchanged. Overlap results in HTTP 409 conflict.
- Status — New status transition for the appointment. Valid transitions: scheduled→confirmed/canceled; confirmed→completed/missed/canceled. Invalid transitions get HTTP 409.
- Idempotency Key — Idempotency key for safe retries; if empty, a UUID is generated automatically. Use the same key on retries to avoid duplicate changes.
Output shape
The API response to the PATCH request updating the appointment; typically includes the updated appointment details or error information.
The operation uses a PATCH HTTP method to /api/v1/agent/agendamento/{agendamentoId} with a JSON payload containing proof and changes. Status 409 indicates conflicting data, e.g., overlapping schedules or invalid status transitions. Idempotency key ensures safe retries without applying changes multiple times.
Examples
Example 1: Change appointment start time and professional
Provide appointment ID, official phone, patient name, appointment token, new start ISO datetime, and new professional UUID.
Example 2: Update appointment status to confirmed
Provide appointment ID, official phone, patient name, appointment token, and status='confirmado'.