Documentation
Guides, API reference and events for Accounting.
On this page
Rules shared by every R&D Copilot API are in the Developer guide.
Get started
- Overview: The Accounting API lets your software submit the facts of a source document, follow the posting request until its entry exists, read the ledger and reverse an entry.
- Quickstart: Post a supplier invoice from the test company: submit the posting request, read its result and read the entry it produced.
- Authentication: Get client credentials, request a token and call the Accounting API with it.
- Sandbox and live: Build and test against a test company, then move the same calls to your live company.
- Go-live checklist: What to have in place before your software posts documents for a live company.
Concepts
- Legal companies and periods: Books belong to one legal company and are kept by month; a month is open, closing or locked.
- Operational facts and postings: The products that run the business submit facts; Accounting maps them into entries and decides when an entry is posted.
- Chart of accounts: The accounts that appear in the entries of these docs, with their numbers and names.
- Reversals, never edits: A posted entry is never changed. A correction is a second entry that reverses the first, linked to it both ways.
- Period locks: A month is locked when its checklist has nothing blocking; after that nothing is posted into it.
Guides
- Post a supplier invoice: Submit the facts of a supplier invoice and handle the three ways the request can go: posted, waiting for an approver, rejected.
- Post a day of sales: Send the closed day of a shop as one posting request: the base and the VAT of each rate and the payments in cash and by card.
- Reverse an entry: Correct a posted entry with a linked reversal, and read both entries afterwards.
- Close and lock a month: How a month is closed in Accounting, what your software sees on the way, and what happens to a document that arrives after the lock.
- Read the ledger for a report: List the entries of a month or of one account, page through them and check that the figures of your report agree with the books.
Reference
- Errors: The error object of the Accounting API and the codes that say what went wrong.
- Idempotency and concurrency: Repeat a request without applying it twice, and refuse a request built from a document that has moved on.
- Pagination: Lists come in pages. Follow the cursor until it is empty.
- Limits: The limits of the Accounting API, with their values and what happens over them.
- Versioning: The version is in the path. Additions keep it; a change that could break a caller gets a new one.
- Changelog: Every version of the Accounting contract, with its day and what it contains.
API reference
- Posting requests: Submit the facts of a source document once, and follow the request until its entry exists.
- Journal entries: Read the entries that were posted, with their lines and their links to the source document and to a reversal.
- Reversals: Correct a posted entry with a linked reversal. A posted entry is never edited.
- Operations: A request that changes data is accepted once and answered with an operation result you can read again.
- Subscriptions: Register the HTTPS endpoint that receives events, and read and replay the deliveries.
Events
- Event envelope: Every Accounting event has the same envelope; only
datachanges with the type of the event. - Event catalogue: The events Accounting sends, when each one is sent and what its
dataholds. - Subscriptions: Register an HTTPS endpoint and Accounting sends your events to it, each one signed.
- Verify signatures: Every delivery is signed. Check the signature on the raw body before you trust the event.
- Delivery and retries: An event is sent again when your endpoint does not confirm it, and is kept for replay after the last attempt.
- Replay: Send a parked event again once your endpoint is ready to take it.