# Journals _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Gen. Journal Batch)_

```
eOne/core/v1.0/journals
```

General journal batches with a nested `journalLines` collection. Lines resolve their account and balancing account polymorphically (G/L or Bank) and support apply-to settlement by integrationId.

Recording payments is handled through dedicated payment endpoints layered on the journals subsystem. See [Customer Payments](https://eonesolutions.github.io/eone-bc-integration/core-customerPayments.md) and [Vendor Payments](https://eonesolutions.github.io/eone-bc-integration/core-vendorPayments.md).

## Sharing a batch with staged documents

A journal batch is shared territory. The [journal wrapper endpoints](https://eonesolutions.github.io/eone-bc-integration/journal-wrappers.md) draft their own general journal lines into whatever batch their Journal Wrappers setup names, and out of the box that is the same `GENERAL`/`DEFAULT` batch a journals caller reaches for. Those drafted lines belong to a staged document that carries its own approval and processing rules, so this endpoint treats them as someone else's and leaves them alone.

The rule is ownership, not batch reservation: raw journals and staged documents can share one batch without either disturbing the other, so there is nothing to reconfigure.

- `post` **skips** lines drafted by a staged document and posts only the lines written through this endpoint. If the batch holds nothing but staged lines, the action reports that rather than posting them or silently doing nothing.
- `DELETE` on a journal is **refused** while the batch holds staged lines. Deleting a batch takes its lines with it, so there is no partial delete to fall back on. Post or cancel those documents through the endpoint that created them, then delete the journal.

Staged lines stay readable through `journalLines`, so the batch reconciles as a whole. They are just not yours to post, change, or delete. To post a staged document, use the endpoint that created it.

## Bound actions

Invoke with `POST /journals(<id>)/Microsoft.NAV.<action>`:

- `post`: posts the batch's own lines through Business Central's *Gen. Jnl.-Post*, exactly as posting the batch in the client would, minus any lines belonging to a staged document. It errors if the batch has no lines of its own to post; on success the response redirects back to the journal batch, which is now empty apart from any staged lines that were skipped.

> **Note:** Dimension columns `shortcutDimension1Code`–`8Code` are writable on the **journal lines**, not the batch. See [Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).

## Journals fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `code` | Name | Batch name; the journal's code. |
| `displayName` | Description | Batch description. |
| `templateDisplayName` | Journal Template Name | General journal template hosting the batch. Defaults to the first general-type template when omitted on create. |
| `balancingAccountType` | Bal. Account Type | Type of the batch balancing account (G/L Account or Bank Account). |
| `balancingAccountId` | balancingAccountId | GUID of the resolved balancing account; set it via `balancingAccountNumber`. _(ro)_ |
| `balancingAccountNumber` | Bal. Account No. | Balancing account number, interpreted per `balancingAccountType`. |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Journal Lines](https://eonesolutions.github.io/eone-bc-integration/core-journalLines.md)
