ERP & Accounting Integration

Guide

Connect Glance with your ERP or accounting system to keep financial data synchronized.

Data Export

Use the Reports API to export financial data:

  • POST /reports/income — Revenue and expense summary
  • POST /reports/expenses — Detailed expense report
  • POST /reports/documents — All document data for a period
  • POST /reports/maam — VAT report for tax filing

Custom Fields for Mapping

Use Custom Fields to store ERP-specific IDs on clients and products:

{
  "name": "ERP Customer ID",
  "type": "TEXT",
  "entityTypes": [
    "ENTITIES"
  ],
  "isRequired": false
}

Sync Strategy

Poll the change feed rather than a date range. A date window re-reads everything in it on every pass and still misses a document that was cancelled or settled without its date moving:

  1. Call GET /documents with updatedSince once, then follow the cursor it returns on every pass after that — see Incremental Sync
  2. Match documents to your ERP records by externalId — set it to your own id when you create the document, and look it back up with GET /documents/by-external-id/:externalId
  3. Send an Idempotency-Key on every create, so a retry after a timeout cannot issue a second document
  4. Use GET /settings for the VAT rate and company details
  5. Use the Reports API for period-end reconciliation
Or skip the polling. Subscribe to document.created and document.status_changed and let Glance push the changes to you — see Webhooks. Keep the cursor sweep as a backstop for anything a failed delivery dropped.

Last updated