> ## Documentation Index
> Fetch the complete documentation index at: https://integrations.docs.commenda.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> A Journal is a running record of a company's financial transactions used to record the debits and credits of each transaction.

**The Journal Entries Data Model** simplifies the management and retrieval of journal entry information across various accounting platforms.

* Unified journal entry properties: The model unifies essential journal entry details, such as account ID, amount, currency, description, and posted date, making it easier to work with journal entry data from different platforms.
* Journal entry lines: The `journal_lines` property includes an array of related journal lines, providing a comprehensive view of the journal entry's constituent transactions.

### Properties Supported

| Property             | Type   | Description                                                                           |
| -------------------- | ------ | ------------------------------------------------------------------------------------- |
| platform\_id         | string | The Platform's ID for this journal entry                                              |
| account\_id          | string | The accounting platform's unique ID for the account associated with the journal entry |
| business\_unit\_id   | string | The accounting platform's business / subsidiary ID associated with the journal entry  |
| amount               | float  | The total amount of the journal entry                                                 |
| currency\_id         | string | The Platform's ID of the currency for the journal entry                               |
| currency\_rate       | float  | Rate between the currency of the payment and the base currency                        |
| document\_number     | string | Reference number for the journal entry                                                |
| journal\_entry\_type | string | Type of the journal entry                                                             |
| description          | string | Description of the journal entry                                                      |
| posted\_date         | date   | Date of the journal entry                                                             |
| updated\_at          | date   | The date at which the information was updated on the accounting platform              |

### Expandable Attributes

You can expand the following attributes to get the related data

| Property       | Data Model                                                                           | Description                                 |
| -------------- | ------------------------------------------------------------------------------------ | ------------------------------------------- |
| journal\_lines | [Journal Lines](/api-reference/v3/accounting/journal-entries/overview#journal-lines) | An array of Journal Lines                   |
| currency       | [Currencies](/api-reference/v3/accounting/currencies/overview)                       | The currency of the journal entry           |
| account        | [Accounts](/api-reference/v3/accounting/accounts/overview)                           | The account associated to the journal entry |

## Journal Lines

**The Journal Lines Data Model** complements the Journal Entries Data Model, focusing on individual transactions within a journal entry.

* Unified journal line properties: The model unifies essential journal line details, such as type, description, net amount, and tax amount, making it easier to work with journal line data from different platforms.
* Hierarchical relationship with journal entries: Journal lines are associated with specific journal entries through the `journal_entry_id` property, enabling a clear understanding of their context within the broader financial record.
* Relationship with other data models: Journal lines are connected to accounts, customers, and taxes using their respective `platform_id` properties, ensuring data consistency and accuracy across different accounting platforms.

### Properties Supported

| Property                | Type   | Description                                                             |
| ----------------------- | ------ | ----------------------------------------------------------------------- |
| platform\_id            | string | The Platform's ID for this journal entry                                |
| journal\_entry\_id      | string | The platform ID for the journal entry associated with this journal line |
| account\_id             | string | The platform ID for the account associated with this journal line       |
| contact\_id             | string | The platform ID for the customer associated with this journal line      |
| tax\_id                 | string | The platform ID for the tax associated with this journal line           |
| type                    | enum   | Type of the journal line item. Values are: DEBIT, CREDIT                |
| description             | string | Description of the journal line                                         |
| net\_amount             | float  | The total amount of this journal line                                   |
| tax\_amount             | float  | The total tax amount of this journal line                               |
| tracking\_category\_ids | object | An array of tracking category IDs associated with this journal line     |

### Expandable Attributes

You can expand the following attributes to get the related data

| Property  | Data Model                                                   | Description                                   |
| --------- | ------------------------------------------------------------ | --------------------------------------------- |
| account   | [Accounts](/api-reference/v3/accounting/accounts/overview)   | The account associated to the journal line    |
| tax\_rate | [Tax Rates](/api-reference/v3/accounting/tax-rates/overview) | The tax rate associated with the journal line |
| contact   | [Contacts](/api-reference/v3/accounting/contacts/overview)   | The contact associated with the journal line  |

<ResponseExample name="The Journal Object">
  ```json The Journal Object theme={null}
  {
    "platform_id": "1234567890123456789",
    "account_id": "1234567890123456789",
    "currency_id": "3770712000000000099",
    "amount": 1234,
    "currency_rate": 1,
    "document_number": "AO-123",
    "journal_entry_type": "big_boy",
    "description": "Journal Entries For Proper Accounting",
    "posted_date": "2023-06-12T00:00:00.000Z",
    "business_unit_id": "1",
    "journal_lines": [
      {
        "platform_id": "3770712000001725038",
        "journal_entry_id": "3770712000001725026",
        "account_id": "3770712000000035001",
        "contact_id": "3770712000000080780",
        "tax_id": "123",
        "tracking_category_ids": ["3770712000000000335_3770712000001122010"],
        "type": "DEBIT",
        "description": "Test Description for Journal",
        "net_amount": 5,
        "tax_amount": null,
        "updated_at": null
      },
      {
        "platform_id": "3770712000001725036",
        "journal_entry_id": "3770712000001725026",
        "account_id": "3770712000000035001",
        "contact_id": "3770712000000080780",
        "tax_id": "345",
        "tracking_category_ids": ["3770712000000000335_3770712000001122010"],
        "type": "CREDIT",
        "description": "Test Description for Journal",
        "net_amount": 5,
        "tax_amount": null,
        "updated_at": null
      }
    ],
    "updated_at": "2023-11-05T00:00:00.000Z"
  }
  ```
</ResponseExample>
