# Numina API

A REST API over JSON for the ledger, contacts, products and invoices of one Numina company.

- Base URL: `https://api.numina.app`
- Authentication: `Authorization: Bearer <API key or OAuth access token>`. See https://developers.numina.app/authentication.md.
- Fields are `snake_case`. Dates are `YYYY-MM-DD`, IDs are UUIDs, amounts are decimal numbers.
- Errors: `{ "error": "<code>", "error_description": "...", "details": [...] }`. See https://developers.numina.app/errors.md.
- OpenAPI 3 document: https://developers.numina.app/openapi.json

## Resources

- [Company](https://developers.numina.app/api/company.md): The connected company, its accounting years, and a check of your credentials.
  - [Check credentials](https://developers.numina.app/api/company/check-credentials.md): `GET /v1/me`
  - [Get company](https://developers.numina.app/api/company/get-company.md): `GET /v1/company`
  - [List accounting years](https://developers.numina.app/api/company/list-accounting-years.md): `GET /v1/accounting-years`
- [Accounts](https://developers.numina.app/api/accounts.md): Chart of accounts and VAT codes.
  - [List accounts](https://developers.numina.app/api/accounts/list-accounts.md): `GET /v1/accounts`
  - [List VAT codes](https://developers.numina.app/api/accounts/list-vat-codes.md): `GET /v1/vat-codes`
- [Journal Entries](https://developers.numina.app/api/journal-entries.md): Create, change and book entries. Create a draft, upload its document, then book it.
  - [List journal entries](https://developers.numina.app/api/journal-entries/list-journal-entries.md): `GET /v1/journal-entries`
  - [Create journal entry](https://developers.numina.app/api/journal-entries/create-journal-entry.md): `POST /v1/journal-entries`
  - [Get journal entry](https://developers.numina.app/api/journal-entries/get-journal-entry.md): `GET /v1/journal-entries/{id}`
  - [Update draft journal entry](https://developers.numina.app/api/journal-entries/update-draft-journal-entry.md): `PUT /v1/journal-entries/{id}`
  - [Delete draft journal entry](https://developers.numina.app/api/journal-entries/delete-draft-journal-entry.md): `DELETE /v1/journal-entries/{id}`
  - [Book journal entry](https://developers.numina.app/api/journal-entries/book-journal-entry.md): `POST /v1/journal-entries/{id}/book`
- [Attachments](https://developers.numina.app/api/attachments.md): Documents (bilag). File contents cannot be downloaded through the API.
  - [Upload attachment](https://developers.numina.app/api/attachments/upload-attachment.md): `POST /v1/journal-entries/{id}/attachments`
  - [Add files to an empty attachment](https://developers.numina.app/api/attachments/add-files-to-an-empty-attachment.md): `POST /v1/attachments/{id}/files`
  - [List documents](https://developers.numina.app/api/attachments/list-documents.md): `GET /v1/attachments`
  - [Upload document to the inbox](https://developers.numina.app/api/attachments/upload-document-to-the-inbox.md): `POST /v1/attachments`
  - [Get document](https://developers.numina.app/api/attachments/get-document.md): `GET /v1/attachments/{id}`
- [Ledger entries](https://developers.numina.app/api/ledger-entries.md): Posted entries, as the reports read them.
  - [List booked ledger entries](https://developers.numina.app/api/ledger-entries/list-booked-ledger-entries.md): `GET /v1/ledger-entries`
- [Balances](https://developers.numina.app/api/balances.md): Trial balance and movement per period. Booked entries only.
  - [Get trial balance (saldobalance)](https://developers.numina.app/api/balances/get-trial-balance.md): `GET /v1/trial-balance`
  - [Get account movement per period](https://developers.numina.app/api/balances/get-account-movement-per-period.md): `GET /v1/account-balances`
- [Bank](https://developers.numina.app/api/bank.md): Bank accounts, and bank lines with their reconciliation state. Read-only.
  - [List bank accounts](https://developers.numina.app/api/bank/list-bank-accounts.md): `GET /v1/bank-accounts`
  - [List bank lines](https://developers.numina.app/api/bank/list-bank-lines.md): `GET /v1/bank-transactions`
  - [Get bank line](https://developers.numina.app/api/bank/get-bank-line.md): `GET /v1/bank-transactions/{id}`
- [Contacts](https://developers.numina.app/api/contacts.md): Customers and suppliers.
  - [List contacts](https://developers.numina.app/api/contacts/list-contacts.md): `GET /v1/contacts`
  - [Create contact](https://developers.numina.app/api/contacts/create-contact.md): `POST /v1/contacts`
  - [Get contact](https://developers.numina.app/api/contacts/get-contact.md): `GET /v1/contacts/{id}`
  - [Update contact](https://developers.numina.app/api/contacts/update-contact.md): `PUT /v1/contacts/{id}`
- [Products](https://developers.numina.app/api/products.md): The product catalogue used on invoice lines.
  - [List products](https://developers.numina.app/api/products/list-products.md): `GET /v1/products`
  - [Create product](https://developers.numina.app/api/products/create-product.md): `POST /v1/products`
  - [Get product](https://developers.numina.app/api/products/get-product.md): `GET /v1/products/{id}`
  - [Update product](https://developers.numina.app/api/products/update-product.md): `PUT /v1/products/{id}`
  - [Delete product](https://developers.numina.app/api/products/delete-product.md): `DELETE /v1/products/{id}`
- [Invoices](https://developers.numina.app/api/invoices.md): Create, book and send invoices. Credit notes and offers are created in Numina and can be read here.
  - [List invoices](https://developers.numina.app/api/invoices/list-invoices.md): `GET /v1/invoices`
  - [Create invoice](https://developers.numina.app/api/invoices/create-invoice.md): `POST /v1/invoices`
  - [Get invoice](https://developers.numina.app/api/invoices/get-invoice.md): `GET /v1/invoices/{id}`
  - [Delete draft invoice](https://developers.numina.app/api/invoices/delete-draft-invoice.md): `DELETE /v1/invoices/{id}`
  - [Download invoice PDF](https://developers.numina.app/api/invoices/download-invoice-pdf.md): `GET /v1/invoices/{id}/pdf`
  - [Book draft invoice](https://developers.numina.app/api/invoices/book-draft-invoice.md): `POST /v1/invoices/{id}/book`
  - [Credit invoice](https://developers.numina.app/api/invoices/credit-invoice.md): `POST /v1/invoices/{id}/credit-notes`
  - [Send invoice by email](https://developers.numina.app/api/invoices/send-invoice-by-email.md): `POST /v1/invoices/{id}/send`
