Light APIv1.0.0

API / Concepts

Choosing an endpoint

Common jobs mapped to the calls that do them, in order, with the rule that trips people up on each.

The reference is organised by resource. This page is organised by job: each row names the calls that do it, in order, and the rule most likely to trip you up. Read How Light records money first if the words document, posting or ledger line are new.

Read the books

Job Calls Watch for
Pull the general ledger for a period List ledger transaction lines, filtered on postingDate, with cursor=0 and limit=200, following nextCursor Signed amounts are credit-positive. Reversal lines are included and net to zero.
Trial balance, or account balances at a date Get general ledger summary with from and to Balances are debit-positive, the opposite of the ledger lines. Keyset cursor: omit cursor on the first call.
Chart of accounts List ledger accounts Only posting accounts are returned, never header or sum accounts.
Every document, whatever its type List accounting documents Totals are absolute values. postingDate can be filtered on but is not returned; read it from the ledger line.
Open bills, open sales invoices List invoice payables, List invoices, filtered on status Neither list carries an open amount. The status says whether a document is settled; the amount still open is the sum of ledger lines on the payable or receivable account for that document, or what List invoice payments leaves unpaid.
Entities, and the currencies the books are kept in Entities, Companies Local currency sits on the entity, group currency on the company. Both are fixed at creation.
The exchange rate Light applied Get exchange rate, Get currency exchange rates Daily reference rates. A document's valuationDate says which day's rate it took.
Bank statement lines List bank transactions Bank transactions are feed data, not documents. Matching them to bills and invoices happens in bank reconciliation, which the API does not expose.
Card spend, expenses List card transactions, List expenses Card transactions carry their own status on top of the document status.

Write to the books

Job Calls, in order Watch for
Push bills from a procurement or AP system Create vendor if new → Create invoice payableCreate invoice payable line item per line → Submit for approval. If the bill was paid outside Light, Mark invoice payable as paid. Amounts in minor units. Bill creation takes no idempotency key, so look the bill up before you retry. Worked example: Create an invoice payable.
Invoice a customer from a CRM or billing system Create customer if new → Create invoiceCreate lineOpen invoiceSend invoice email Opening assigns the gap-free invoice number and posts the invoice. Nothing is checked for duplicate customers; de-duplicate on your side.
Post an accrual, a reclassification or a correction Create journal entry with shouldPost: true and an X-Idempotency-Key Lines net to zero, at least one D and one C, period open. There is no read endpoint: read it back from the ledger lines.
Reverse a journal entry Archive journal entry The reversal takes the original posting date, so that period must still be open.
Spread a cost or revenue over time Create accounting release template, then reference it from a journal entry line as amortizationTemplateId with a start and end date The instalments post as DE documents on their own dates, and each date's period is checked when the entry posts.
Keep master data in sync Create customer, Create vendor, Update vendor, Create product Vendors update with PUT, a full replacement. A change to a vendor's bank details may come back as a pending change request rather than being applied.
Record commitments and subscriptions Create purchase order and its lines; Create contract and its lines Neither posts to the ledger by itself. A purchase order is matched to bills; a contract generates sales invoices and revenue releases when published.
Attach receipts to expenses and card transactions Upload a receipt These act as "the current user" and need an OAuth token for that user. An API key gets USER_NOT_RECOGNIZED.

What the API does not do

  • No webhooks. Nothing calls you when a document changes. Poll the list endpoints with an updatedAt filter and cursor pagination.
  • Tax codes are not listable. Lines reference a tax code by id (taxCodeId, or ledgerTaxId on journal entries), but there is no endpoint to fetch the ids. Copy them from the product, or ask through the MCP server, which has a tax code search tool.
  • No report endpoints beyond the general ledger summary. Aged payables and receivables, the profit and loss statement and the balance sheet as Light shows them are not exposed. Rebuilding them from ledger lines is possible for balances, but ageing and open items also depend on clearing events and FX revaluation, which the ledger lines alone do not carry.
  • Bank reconciliation and period close are not exposed. Matching, locking and closing happen in the product.
  • Journal entries are write-only. No endpoint reads a journal entry or posts an existing draft. Create it posted, and read it back from the ledger.