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.

Pedido → Anexar Imagem

AI-generated

Summary

Attach a reference photo to an existing order by sending a base64-encoded image with optional mime type and caption, ensuring idempotency via a key to prevent duplicate attachments.

Inputs

  • Token ID Dinamico — Optional dynamic token returned by multi-tenant bootstrap; must be used with the dynamic Signing Secret.
  • Signing Secret Dinamico — Optional ephemeral secret returned by bootstrap; never log this value.
  • Idempotency Key — Optional idempotency key to avoid duplicate attachments; use the same key (e.g., WhatsApp message ID) for retries.
  • Pedido ID (required) — The tenant-specific order ID to which the image will be attached. Orders from other bakeries return 404.
  • Imagem (base64) (required) — The image that the client sent, encoded in base64. Accepts data-URL (with mime type) or pure base64 (then MIME must be specified). Max size 5 MB; supports PNG, JPG, WEBP formats.
  • MIME (se base64 puro) — Required only when 'Imagem (base64)' is pure base64 without data-URL prefix. Leave empty if using data-URL.
  • Legenda — Optional short text caption describing the photo, e.g., the caption sent with the image.

Output shape

A single JSON object representing the API response to the image attachment request.

The operation is idempotent when using the same Idempotency Key, ensuring that retries do not result in duplicate attachments. The image is attached literally to the order; no OCR or interpretation is done.

Examples

Example 1: Attach a client-sent photo to an order by providing the order ID and the photo in base64 data-URL format, with an optional caption and idempotency key based on the WhatsApp message ID.

Set 'Pedido ID' to the target order's UUID; provide 'Imagem (base64)' as the data-URL string; optionally specify 'Legenda' and reuse the WhatsApp 'Message ID' as 'Idempotency Key'.

Links

Discussion