Start free

Exchange accounting data through API

Before exchanging accounting data, establish which objects the selected interface supports. A product API does not expose every book operation.

4 min read Admin panel demo
On this page 8

Exchange accounting data through API

Read entities, the journal, postings, reports and the state of scheduled jobs of the books with an API key, and send manual entries as drafts — a person posts them.

Before you start#

Decide what the external program (your accountant's software, an ERP) needs: reading reports and postings, or sending its own entries into the books. The account owner creates the key.

Open Integrations → API and webhooks.

Step 1. Create a key with books permissions#

Create a key and tick the permissions you need:

  • “Read accounting books” (books:read) — legal entities, journal, postings, reports, scheduled jobs;
  • “Draft accounting entries” (books:write) — manual entries as drafts: a person approves and posts them.

Grant only what is needed. The key acts on behalf of the account owner: limiting a key to locations does not apply to the books, because a book belongs to a legal entity. New permissions are not added to existing keys — the “All” preset includes them only when a key is created.

Step 2. Read books data#

Read methods (books:read):

Method Returns
GET /v1/books/entities List of legal entities
GET /v1/books/entities/{id} State of the entity's books
GET /v1/books/entities/{id}/events Journal of events (paged by cursor)
GET /v1/books/entities/{id}/postings Postings, turnover or chart of accounts of a book
GET /v1/books/entities/{id}/reports Reports: trial balance, general ledger, profit and loss
GET /v1/books/entities/{id}/jobs Scheduled jobs and data delays
GET /v1/books/entities/{id}/drafts Drafts sent and their status

The full field reference is in the key's API documentation (“API and webhooks”).

Step 3. Send an entry as a draft#

POST /v1/books/entities/{id}/drafts (books:write) creates a manual entry draft in Accounting → Adjustments. Required fields: externalId (your source document number), kind, date, currency, reason and balanced lines with accounts of the book.

Write rules:

  • only a draft reaches the books — only a person can post it, following the book's approval policy; the draft's reason carries the mark [API: key name];
  • a retry of the same document with the same externalId and the same content returns the same draft (duplicate: true) — a dropped connection does not create a second entry;
  • the same externalId with a different date, amounts or lines — rejected with external_id_conflict;
  • a month closed in the book — rejected with period_closed;
  • unbalanced lines or unknown accounts — rejected with adjustment_invalid and the list of problems.

Check the sent document against the draft and post it in “Adjustments”.

Scheduled jobs#

Accounting → Settings → “Scheduled jobs” shows what the books do on their own every night: country rules update, auto-confirmation of documents, reconciliations, the night journal check, archiving closed periods, exchange rates, backup.

  • The block result: “All jobs ran on time”, “Some jobs need attention”, “Jobs are failing or late” or “Not recorded yet” (the journal starts with the next night).
  • The table shows each job's last run and result: “done”, “failed”, “late” (no run for more than 30 hours), “did not run”, “not recorded yet”.
  • The “Scheduler” and “Reports data” lines show when the night run reached the books and whether reports lag behind. If reports data shows “update pending”, wait a few minutes.
  • “What needs attention” explains the cause in words. If it says “contact support” (the scheduler has not reached the books, the night check differs from the journal), contact support.

The schedule is set by the platform: every night, and every 5 minutes for reports data. What a job does is set in its own section: auto-confirmation — in the books policy, connector polling — in the connector window.

Limitations#

Troubleshooting#

Problem What to check
books_forbidden response The key's permissions and the account owner's permissions in this entity.
external_id_conflict response Another document was already sent under this externalId: fix the draft in “Adjustments” or use a new number for a new document.
period_closed response The month is closed in the book: send the document with a date in an open period or reopen the period by the book's rules.
A job is “late” Open “What needs attention”; if the problem persists after the next night, contact support.
Was this article helpful?