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
→ Theaccount
value is a general ledger account number (retrievable viaGET /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 viaGET /clients
,GET /suppliers
,GET /employees
, or in the response when creating a partner).
- If
How partner account works
Whenaccount_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:
- 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.
- This can be the system default (e.g., all customers post to
- 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. Iftrue
, the API will prioritize the third-party account (partner) in such cases. We recommand to set totrue
when usingforce_general_account
.