# Journal Entries

Create, change and book entries. Create a draft, upload its document, then book it.

## Endpoints

- [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`

## The journal entry object

- `id` (string (uuid), required): Transaction ID
- `date` (string, required, nullable): Transaction date
- `text` (string, required, nullable): Transaction description
- `status` (string, required, nullable): Transaction status (draft entries are 'open')
- `contact_id` (string (uuid), required, nullable): Associated contact (customer/supplier) ID
- `created_at` (string, required, nullable): Transaction creation timestamp (ISO 8601, UTC)
- `external_reference` (string, required, nullable): The `external_reference` sent when the entry was created
- `lines` (array of objects, required): On a draft, the lines as entered, with VAT included in the amount. On a booked entry, the posted ledger entries, with VAT on its own line. Empty on a canceled entry.
  - `id` (string (uuid), required): Journal entry line ID
  - `account_number` (integer, required, nullable): Account number
  - `account_id` (string, required, nullable): Account ID
  - `account_name` (string, required): Account name
  - `amount` (number, required): Signed amount in `currency_code`: debit is positive, credit is negative. On a draft it includes VAT. On a booked entry VAT is on its own line.
  - `text` (string, required, nullable): Line description
  - `vat_code` (string, required, nullable): VAT code if applicable
  - `currency_code` (string, required): Currency of the line. Entries created through this API are always DKK; entries created in Numina can be in another currency.
  - `currency_rate` (number, required): Rate to DKK. 1 for DKK.
- `state` (string, required): Where the entry stands. `status` keeps the raw value, which can differ between drafts. One of: `draft`, `booked`, `canceled`.
- `attachment` (object, required, nullable): The document on this entry
  - `id` (string (uuid), required)
  - `file_name` (string, required, nullable)
  - `status` (string, required, nullable)
  - `attachment_number` (number, required, nullable): The bilag number, normally assigned when the entry is booked. Numbers restart each accounting year.

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "date": "2026-01-15",
  "text": "Invoice payment from customer",
  "status": "open",
  "contact_id": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2026-01-15T10:30:00Z",
  "external_reference": "payroll-run-2026-01",
  "lines": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "account_number": 3000,
      "account_id": "550e8400-e29b-41d4-a716-446655440001",
      "account_name": "Revenue",
      "amount": -1000,
      "text": "Invoice payment",
      "vat_code": "U25",
      "currency_code": "DKK",
      "currency_rate": 1
    }
  ],
  "state": "draft",
  "attachment": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "file_name": "string",
    "status": "string",
    "attachment_number": 42
  }
}
```
