ERP and management systems guide
REST integration (not MCP). Contacts are available on every plan with the API; deals and tasks (CRM) need the Business plan.
1. The key
Create a service key with the "ERP / management system" template, restrict it to your server's IP and set the expiry (365 days, say). Keep the key in the ERP's secret store and rotate it once a year.
2. Map the fields
| In the ERP | In Atendlly |
|---|---|
| Customer code | the contact's identifier |
| Order / opportunity number | the deal's external_id |
| Name, e-mail, phone | name, email, phone (E.164 or a Brazilian number) |
| Other data (CPF, birth date…) | custom_attributes (up to 30 fields) |
3. Initial load and sync
# initial load: every contact, 100 per page, following next_cursor until has_more = false
curl "https://atende.suporteja.com.br/v1/contacts?updated_since=1970-01-01T00:00:00Z&limit=100" -H "Authorization: Bearer $KEY"
Then sync with updated_since (the largest updated_at you saw) and subscribe to the contact_created,
contact_updated and conversation_status_changed webhooks (see webhooks).
4. Writes without duplicates
# customer by the ERP code: creates or updates (200 or 201)
curl -X PUT "https://atende.suporteja.com.br/v1/contacts/by_identifier/CLI-000123" -H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" -d '{"name": "Smile Clinic", "email": "contact@smile.example"}'
# deal by the order number (Business): creates or updates; repeating never duplicates
curl -X PUT "https://atende.suporteja.com.br/v1/crm/deals/by_external_id/PED-98765" -H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" -d '{"title": "Order 98765", "value_cents": 54000, "contact_id": 812}'
For the other POSTs, send Idempotency-Key (see idempotency).
5. Limits and errors
Handle 429 honouring Retry-After, with exponential backoff. See rate limits and
errors.
Common ERPs
Bling, Omie, Tiny, TOTVS and Sankhya have no native integration: use the customer code as identifier and the order
number as external_id, as above. On the deal, the timeline shows "Integration «key name»" and the source api.