Documentation contents

Integration guide

CRM integration: export and synchronization

Your CRM reads Mereu data through GET requests. This API cannot create or modify customers.

ResourceWhat to synchronizeScope
/data/customersBusiness-local identity, names, available contact details and marketing consent.customers:read
/data/cardsCards, program, status and balances calculated at read time.cards:read
/data/transactionsApplied Casa/POS ledger entries and exposed loyalty amounts.transactions:read
  1. Start each resource with mode=snapshot&limit=100. Read every page using next_cursor until it becomes null.
  2. Save pages to a staging dataset. Replace the active CRM dataset only after completing the export.
  3. Keep the initial snapshot’s sync_cursor. Then request the SAME resource with mode=changes and that cursor.
  4. Apply pages in order: insert or update by ID; for operation=delete, delete by record_id.
  5. 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.