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
Pedido → Cancelar
AI-generatedSummary
Cancel a specific Pedido (order) within the tenant by its Pedido ID, optionally providing a cancellation reason and ensuring idempotency to avoid duplicate cancellations.
Inputs
- Pedido ID (required) — The unique identifier of the Pedido (order) to cancel within the tenant. Attempting to cancel a Pedido from another tenant (padaria) will result in a 404 error.
- Motivo — Optional reason for the cancellation.
- Token ID Dinamico — Optional dynamic token returned by multi-tenant bootstrap; must be used together with the dynamic Signing Secret.
- Signing Secret Dinamico — Optional ephemeral secret returned by bootstrap; should never be logged or output.
- Idempotency Key — Optional key for idempotency. Use the same key on retries to ensure the cancellation operation isn't applied multiple times (e.g., message ID from WhatsApp). If empty, no explicit idempotency key is sent.
Output shape
a single JSON response object with the cancellation result
The operation sends a POST request to the endpoint /api/v1/agent/pedido/{pedidoId}/cancelar with optional cancellation reason in the body. The response contains the API's cancellation result or error details if the operation fails. Idempotency is supported via the Idempotency Key header.