---
title: "Create Journal Entry"
method: POST
path: "/consumers/{consumer_id}/accounting/journal-entries"
tags: ["Accounting", "Journal entries"]
---

# Create Journal Entry

`POST /consumers/{consumer_id}/accounting/journal-entries`

Create a new Journal Entry in the accounting system

## Path parameters

- `consumer_id` string, uuid, required

## Query parameters

- `folder_id` string, nullable
- `force_currency_exchange` 'true' | 'false'
- `ignore_accounting_id` boolean

## Request body

- GenericJournalEntry
  - `reference` string, nullable — Optional reference field used to store an external or contextual identifier related to the entry. For example, it can be used to store a reference number, the invoice number issued by the suppllier or any other relevant information.
  - `due_date` string, date, nullable — If the journal entry relates to an invoice, this is the due date for payment or settlement (format: YYYY-MM-DD).
  - `journal_id` string, required — Id of the journal instance in the accounting system in which the journal entry is recorded.
  - `number` string, required — Unique 'number' of the journal entry in the accounting software. This is an internal number or ID assigned to the journal entry, not necessarily the label or number visible on an invoice. It is recommended to use this number for idempotency to prevent duplicate entries. Refer to the idempotency documentation in the Developer Guides for more details.
  - `currency` string, required — Indicates the currency of the journal entry (e.g., EUR, USD).
  - `currency_exchange_rate` number, nullable — Indicates the exchange rate at the date of the journal entry. Must be filled in when creating the entry in another currency from the folder's default currency.
  - `date` string, date, required — Accounting date of the journal entry (format: YYYY-MM-DD). This is the date when the journal entry is recorded in the accounting system.
  - `items` GenericJournalItem[], required — List of journal items that make up the journal entry. Each item represents a line in the journal entry, and the sum of debits must equal the sum of credits to ensure the entry is balanced. There must always be at least 2 lines/items.
    - `account_type` 'customer_account' | 'supplier_account' | 'employee_account' | 'general_account', required
    - `account` string, nullable — Depending on account_type, if the account_type is 'general_account', this is the general ledger account number used to book the journal item against. If the account_type is 'customer_account', 'supplier_account' or 'employee_account', this is the thirdparty_id (id of the customer, supplier or employee in the accounting system).
    - `force_general_account` string, nullable — Overrides the default general account for customer, supplier, or employee accounts. If provided, this value will be used as the general account instead of the one determined by the accounting system's configuration.
    - `prioritise_thirdparty_account` boolean, nullable — If True, prioritize using the third-party account information when a general account is forced in accounting software that only allows one account. Recommended to set it to True
    - `description` string, nullable — Text description for this journal item. This is typically used to provide additional context or information.
    - `debit` number, required — Amount to debit on the account. Must be 0 if credit line is not 0
    - `credit` number, required — Amount to credit on the account. Must be 0 if debit line is not 0
    - `analytic_distribution` AnalyticDistribution[], nullable — List of analytic distributions for the journal item. Each distribution specifies an analytic plan and the allocation of the journal entry item's amount across analytic accounts using percentages.
      - `analytic_plan` string, required — Id of the analytic plan to which the distribution applies.
      - `analytic_accounts` AnalyticDistributionDetail[], required — List of analytic accounts and their respective percentages for the distribution.
        - `analytic_account` string, required
        - `percentage` number, required — Percentage of the untaxed amount attributed to this analytic account. Only whole numbers (no decimals) are allowed. The total across the analytic distribution (all accounts in a given analytic plan) must equal 100%.
    - `tax_code` string, nullable — Indicates the Tax Code used for the entry item. This is the Id of the Tax Code instance in the accounting software.
    - `tax_info` TaxInfo
      - `tax_code` string, required — VAT code of the tax line. This is the Id of the Tax code instance in the accounting software.
      - `tax_amount` number, required — Amount of the tax line. The amount must be positive and is required even with reversed VAT.
      - `vat_account` string, nullable — VAT ledger account of the tax line. This is the ledger account number used to book the tax amount. The account is mandatory if tax amount is different from 0. The ledger account will ONLY be used when it is mandatory to pass this information to the accounting software.
      - `reversed_vat_account` string, nullable — Reversed VAT ledger account of the tax line. This is the ledger account number used to book the reversed tax amount. The account is mandatory if you are using a reversed VAT code. The ledger account will ONLY be used when it is mandatory to pass this information to the accounting software.
      - `description` string, nullable — Optional extra description of the tax line.
    - `account_info` AccountToCreate
      - `account_number` string, required
      - `account_name` string, required
  - `pdf` string, nullable — Base 64 string representing the PDF attached to the item.
  - `pdf_name` string, nullable — A name for the PDF file to be created for accounting software that support it.
  - `posted` boolean, nullable — Indicates if the journal entry has been posted (finalized) in the accounting system. If not provided, it defaults to True.
  - `start_date` string, date, nullable — Start date of the period covered by the journal entry (format: YYYY-MM-DD). This field should be used when the entry relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period begins.
  - `end_date` string, date, nullable — End date of the period covered by the journal entry (format: YYYY-MM-DD). This field should be used when the entry relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period ends.

## Response `200`

Successful Response

- JournalEntryMultiAnalyticPlan
  - `reference` string, nullable — Optional reference field used to store an external or contextual identifier related to the entry. For example, it can be used to store a reference number, the invoice number issued by the suppllier or any other relevant information.
  - `due_date` string, date, nullable — If the journal entry relates to an invoice, this is the due date for payment or settlement (format: YYYY-MM-DD).
  - `journal_id` string, required — Id of the journal instance in the accounting system in which the journal entry is recorded.
  - `name` string, nullable
  - `journal_name` string, nullable — Name of the journal in which the journal entry is recorded.
  - `date` string, date, nullable — Accounting date of the journal entry. It is automatically set to '1970-01-01' if the value is not available/empty in the accounting system.
  - `posted` boolean, nullable — Indicates if the journal entry has been posted (finalized) in the accounting system.
  - `id` string, required — Unique id of the journal entry instance in the accounting system.
  - `due_dates` JournalItemDueDatesOut[], nullable — List of all due dates of a journal entry.
    - `due_date` string, date, required — Due date of the item.
    - `payment_method` string, nullable — Payment method used to pay the entry on that due date.
    - `payment_method_id` string, nullable — Technical ID of the payment method used to pay the entry on that due date.
    - `debit` number, nullable — Debit of the item on this due date.
    - `credit` number, nullable — Credit of the item on this due date.
  - `attachments_info` ItemAttachmentInfoOut
    - `status` 'unknown' | 'yes' | 'yes_to_request' | 'no', required
    - `attachments` ItemAttachmentInfoAttachment[], nullable — List of attachments available directly for this entry. Populated only when status is 'yes'. When status is 'yes_to_request', this list is empty — use GET /accounting/attachments to fetch the file content.
      - `filename` string, nullable — The name of the attachment.
      - `url` string, nullable — Direct download URL for the attachment file. Only populated when the parent attachments_info.status is 'yes'. When status is 'yes_to_request', this field is null and the file must be retrieved via GET /accounting/attachments with the appropriate type and document_id, which returns the content as a base64-encoded string.
  - `items` JournalItemMultiAnalyticPlan[], nullable — List of journal items that make up the journal entry. Each item represents a line in the journal entry, and the sum of debits must equal the sum of credits to ensure the entry is balanced.
    - `account_number` string, required — Depending on account_type, if the account_type is 'general_account', this is the general ledger account number used to book the journal item against. If the account_type is 'customer_account', 'supplier_account' or 'employee_account', this is the thirdparty_id (id of the customer, supplier or employee in the accounting system).
    - `partner_id` string, nullable — Id of the thirdparty (customer, supplier or employee) in the accounting system if the journal item relates to a thirdparty (e.g., an invoice).
    - `description` string, nullable — Text description for this journal item. This is typically used to provide additional context or information.
    - `debit` number, required — Amount to debit on the account. Must be 0 if credit field is not 0
    - `credit` number, required — Amount to credit on the account. Must be 0 if debit field is not 0
    - `currency` string, required — Currency code (e.g., USD, EUR) used for the journal item amounts.
    - `currency_exchange_rate` number, nullable — Exchange rate applicable at the date of the journal item. Required when currency is different from the folder's default currency.
    - `id` string, required — Unique id of the journal item instance in the accounting system.
    - `partner_name` string, nullable — Name of the thirdparty (customer, supplier or employee) linked to the journal item if journal item relates to a thirdparty (e.g., an invoice).
    - `account_name` string, required — Name or label of the ledger account used to book the journal item against.
    - `matching_numbers` string[], nullable — List of matching numbers used to link this journal item to other entries in the accounting system. This is used for reconciliation/lettering purposes.
    - `analytic_distribution` AnalyticDistribution[], nullable — List of analytic distributions for the journal item. Each distribution specifies an analytic plan and the allocation of the journal entry item's amount across analytic accounts using percentages.
      - `analytic_plan` string, required — Id of the analytic plan to which the distribution applies.
      - `analytic_accounts` AnalyticDistributionDetail[], required — List of analytic accounts and their respective percentages for the distribution.
        - `analytic_account` string, required
        - `percentage` number, required — Percentage of the untaxed amount attributed to this analytic account. Only whole numbers (no decimals) are allowed. The total across the analytic distribution (all accounts in a given analytic plan) must equal 100%.

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/chift/apis/chift-api.md) · [All operations](https://skmtc.net/chift/apis/chift-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chift/chift-api/versions/b5f1214a482a/schema)
