You need to be the account Owner (only the Owner generates the key) and the contact must exist in AttendTo: each order is matched to a contact by phone number or email. Make sure your customer list is there first by importing a CSV into the "Base de Contatos" (Contact base), or let contacts originate from WhatsApp conversations. Prefer to start without coding? The Monitor also accepts order import by CSV.
In the dashboard, open "Integrações" (Integrations) (side menu), the "Pedidos" (Orders) tab, and on the "Receber pedidos" (Receive orders) card, click "Gerar chave" (Generate key). Copy and store it right away: for security, it is shown only once and afterward only in masked form. Generating a new one invalidates the previous one immediately.
Treat the key like a password: it lives only on your server, never on a website, app, or public repository.
Replace SUA_CHAVE and use a phone number or email that exists in your contacts:
curl -X POST https://api.attendto.com.br/api/integrations/orders \
-H "X-Api-Key: SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"orders":[{"external_id":"PED-1001","amount_cents":18990,"phone":"5511999990001","status":"pago","ordered_at":"2026-06-15"}]}'Expected response:
{
"received": 1,
"imported": 1,
"updated": 0,
"matched_customers": 1,
"invalid": 0,
"errors": []
}Open the "Monitor de sucesso" (Success monitor) and see the order reflected in the groups.
In real time (trigger the send when the order is created or paid) or on a schedule (a job every 15 to 60 minutes sends new or changed orders, in batches of 100 to 500).
Sending is idempotent by external_id: resending the same order never duplicates it, it only updates it. This also works for changing the status from "pendente" (pending) to "pago" (paid). When in doubt, resend.
| Field | Required | Description |
|---|---|---|
| external_id | yes | The order ID in your system. It is the idempotency key: resending the same ID updates the order and never duplicates it. |
| amount_cents | yes | Total amount in cents (integer). R$ 189.90 becomes 18990. Alternative: "amount" as text ("189,90"). |
| phone / email | at least one | Matches the order to the contact. Phone number with country and area code (e.g., 5511999990001). |
| status | no | Default "pago" (paid). Accepts "pendente" (pending)/"aberto" (open) and "cancelado" (canceled)/"estornado" (reversed)/"reembolsado" (refunded), in Portuguese or English. |
| ordered_at | no | Order date: ISO (2026-06-15, with or without time) or dd/mm/yyyy. If empty, the submission date is used. |
| currency | no | Default "BRL". |
| items | no | Order items: {"sku","title","quantity","unit_price_cents"}. With a SKU registered in "Ofertas" (Offers), the product is linked and stock is deducted on paid orders. |
Each error comes with the index of the item in the batch; the other orders are processed normally.
| Reason | What to do |
|---|---|
| external_id missing | Send your system's order ID. |
| amount_cents/amount invalid | The amount must be positive and in cents in amount_cents. |
| customer not found (phone/email) | The contact doesn't exist in AttendTo yet. Import your customer list into the "Base de Contatos" (Contact base) or check the phone number format (country code + area code). |
| ordered_at invalid | Use an ISO date or dd/mm/yyyy. |
| external_id duplicated in the batch | The same order appeared twice in the same request. |
On the same "Integrações" (Integrations) screen, in the "Webhooks" tab, register an address in your system to receive notices instantly: when orders come in (the "Pedidos importados" (Orders imported) notice confirms each batch), when a lead qualifies, goes to an agent, changes stage, or becomes a sale. Each notice is signed, retried up to 6 times, and kept in the delivery log.
See the 13 events in the webhooks documentation (in Portuguese)Questions about your first integration? Talk to us in the dashboard chat — our team will work through it with you.
Open "Integrações" (Integrations) in the dashboard