CRM integration: export and synchronization
Your CRM reads Mereu data through GET requests. This API cannot create or modify customers.
| Resource | What to synchronize | Scope |
|---|---|---|
| /data/customers | Business-local identity, names, available contact details and marketing consent. | customers:read |
| /data/cards | Cards, program, status and balances calculated at read time. | cards:read |
| /data/transactions | Applied Casa/POS ledger entries and exposed loyalty amounts. | transactions:read |
- Start each resource with
mode=snapshot&limit=100. Read every page usingnext_cursoruntil it becomesnull. - Save pages to a staging dataset. Replace the active CRM dataset only after completing the export.
- Keep the initial snapshot’s
sync_cursor. Then request the SAME resource withmode=changesand that cursor. - Apply pages in order: insert or update by ID; for
operation=delete, delete byrecord_id. - Commit the data and new cursor in the SAME CRM database transaction. If saving fails, resume from the previously saved cursor.
On 410 CURSOR_EXPIRED, start a new full snapshot and replace the local dataset. If authorization or connection changes, rebuild the export and remove data you can no longer access. There is no total exported-row quota; respect request limits.
Changes describe current state, not an immutable historical audit. A replayed event can carry newer content: do not skip its body just because you have seen the same event_id. Process sequentially and apply operation=delete / deleted=true, including removing local contact data.
Snapshot pages read current rows; changes after the snapshot anchor cover updates during pagination. Transactions still in flight can temporarily delay visibility. changed_at is not a version number.
customer.id is the card UUID within this business. Do not automatically merge people across businesses. In the ledger, id and original_id are native entry IDs; only a non-null financial_transaction_id works with financial transaction and refund endpoints. Staff operations may not have this ID.
Periodically read /account for the current currency and time zone. Store CRM mappings in your own system; /resource-links is retired (410). Do not put contact data in identifiers or logs.