Núcleo Wondai icon

Núcleo Wondai

Atendimento de IA no Núcleo Wondai: preparar conversa (GATE liga/desliga + contexto operacional ANTES da LLM), buscar cliente, resolver catálogo (fuzzy), criar/alterar/cancelar pedido, consultar contexto e registrar conversa. Assinatura HMAC; o tenant vem do token.

Agendamento → Criar

AI-generated

Summary

Create a new appointment (agendamento) by specifying required details such as contact phone, patient name, professional ID, procedure ID, and start time, with optional contact name and end time. Uses idempotency key to ensure operation idempotence.

Inputs

  • Token ID Dinamico — Optional dynamic token returned by multi-tenant bootstrap; must be used together with dynamic Signing Secret.
  • Signing Secret Dinamico — Optional ephemeral secret returned by bootstrap; never log this value.
  • Telefone (required) — Official contact/canal phone number in E.164 format; does not identify the patient alone.
  • Nome do Contato — Optional administrative name of the person conversing on the channel.
  • Nome do Paciente (required) — Name of the patient who will receive the appointment; may differ from the WhatsApp contact.
  • Profissional (ID) (required) — UUID of the professional for the appointment; scheduling an occupied time slot returns HTTP 409 (unavailable).
  • Procedimento (ID) (required) — UUID of the procedure (from Procedure Resolver); defines the real duration of the appointment.
  • Início (required) — ISO 8601 datetime string specifying the start of the appointment.
  • Fim (opcional) — Optional ISO 8601 datetime string for the end time; if empty, end time is calculated as start time plus procedure duration or defaults to 30 minutes.
  • Idempotency Key — Idempotency key for operation; if empty, a UUID is generated automatically to avoid duplicate creation on retries.

Output shape

a single JSON object representing the created appointment, including a token for administrative proof if successfully created

The operation is idempotent and requires an idempotency key; if the key is omitted, the node auto-generates one. A HTTP 400 error occurs if no idempotency key is supplied by the client or node. The created appointment's token allows authenticated subsequent modifications. Errors during creation are returned with relevant HTTP status and error messages.

Links

Discussion