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

# Accounts in journal entries

This guide explains how to correctly provide account information when creating **Journal Entries** via the **Unified API**.

## Journal entry

A Journal Entry (also referred to as a G/L entry) is the most **generic** way to create accounting entries.\
It can be used to book **any** kind of transaction — invoices, bank movements, adjustments, accruals, payroll entries, and more.

By definition, every journal entry line must have a ledger account specified. In Chift’s API, we use two fields to indicate this:

* the **type of account** (`account_type`)
* the **account identifier** (`account`)

***

### Fields

* **`account_type`**
  * `general_account` → The `account` value is a general ledger account number (retrievable via `GET /chart_of_accounts`).
  * `customer_account`, `supplier_account`, `employee_account` → `account` value is a third-party account.
* **`account`**
  * If `general_account` → Simply the (general) ledger account number.
  * If `_account` (third-party account) → Enter the partner ID from the target software (retrieved via `GET /clients`, `GET /suppliers`, `GET /employees`, or in the response when creating a partner).

***

### How partner account works

When `account_type` is `customer_account`, `supplier_account`, or `employee_account` and you provide the `account` value (partner ID in the target system), the API will automatically:

1. Retrieve the **default general account** associated with that partner.
   * This can be the system default (e.g., all customers post to `411000`)
   * Or a specific account configured directly on that partner’s record in the accounting software.
2. Use this default account to complete the posting unless you override it (see below).

> *In French systems, the partner may be identified by an **auxiliary account**. In such cases, `partner_id` = auxiliary account number = ledger account.*

***

### Additional fields for account control

* **`force_general_account`** *(string | null)*\
  Overrides the default general account for a customer, supplier, or employee account.\
  If set, this value is used instead of the one configured in the accounting system.

* **`prioritise_thirdparty_account`** *(boolean | null, default: false)*\
  In some accounting systems (e.g., those using auxiliary accounts), you cannot provide both a general account and a partner account, since technically both are ledger accounts.
  If `true`, the API will prioritize the **third-party account (partner)** in such cases. We recommend setting it to `true` when using `force_general_account`.
