Skip to content

Sync open items from your ERP

Goal: every open invoice in your ERP appears in COMMITLY as an open item on its expected payment date, and disappears once it is paid or cancelled.

You need: API credentials (Quickstart), read access to open invoices in your ERP, a scheduler (cron, a serverless function, an iPaaS such as Make or Zapier).

  1. Map your categories once. Call GET /categories/ and decide which COMMITLY category each invoice type belongs to (for example customer invoices → “Revenue”, supplier invoices → “Purchase of goods”). Store the IDs in your configuration.

  2. Create new invoices. For each open invoice that COMMITLY does not know yet, call POST /invoices/. Use the ERP invoice number as reference.

    requests.post(f"{BASE}/invoices/", headers=auth(), json={
    "reference": inv.number, # e.g. "AR-2026-0815"
    "name": inv.customer_name,
    "amount": inv.gross_amount,
    "date": inv.invoice_date, # YYYY-MM-DD
    "due_date": inv.due_date,
    "expected_date": inv.expected_payment_date, # optional
    "paid_amount": inv.paid_amount, # partial payments
    "category": CATEGORY_IDS[inv.type],
    })
  3. Update changed invoices. When the amount, a partial payment or the expected date changes, send PATCH /invoices/ with a JSON array of invoices, each identified by its reference. Only send the fields that changed. Invoices COMMITLY does not know are skipped, not created — create them with POST.

    requests.patch(f"{BASE}/invoices/", headers=auth(), json=[
    {"reference": "AR-2026-0815", "paid_amount": 500, "expected_date": "2026-11-20"},
    ])
  4. Remove settled or cancelled invoices. Delete them by reference so they no longer count as open: DELETE /invoices/?reference=AR-2026-0815. The match is exact, and you can repeat the parameter for several invoices.

  5. Schedule it. Run the job as often as your ERP data changes. For most companies, hourly or daily is enough.

Endpoint details: Invoices in the API reference.