POST
/
consumers
/
{consumer_id}
/
accounting
/
journal-entries
Create Journal Entry
curl --request POST \
  --url https://api.chift.eu/consumers/{consumer_id}/accounting/journal-entries \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "reference": "<string>",
  "due_date": "2023-12-25",
  "journal_id": "<string>",
  "number": "<string>",
  "currency": "<string>",
  "currency_exchange_rate": 123,
  "date": "2023-12-25",
  "items": [
    {
      "account_type": "customer_account",
      "account": "<string>",
      "force_general_account": "<string>",
      "prioritise_thirdparty_account": true,
      "description": "<string>",
      "debit": 123,
      "credit": 123,
      "analytic_distribution": [
        {
          "analytic_plan": "<string>",
          "analytic_accounts": [
            {
              "analytic_account": "<string>",
              "percentage": 123
            }
          ]
        }
      ],
      "tax_code": "<string>",
      "account_info": {
        "account_number": "<string>",
        "account_name": "<string>"
      }
    }
  ],
  "pdf": "<string>",
  "posted": true,
  "start_date": "2023-12-25",
  "end_date": "2023-12-25"
}'
{
  "reference": "<string>",
  "due_date": "2023-12-25",
  "journal_id": "<string>",
  "name": "<string>",
  "journal_name": "<string>",
  "date": "2023-12-25",
  "posted": true,
  "id": "<string>",
  "items": [
    {
      "account_number": "<string>",
      "partner_id": "<string>",
      "description": "<string>",
      "debit": 123,
      "credit": 123,
      "currency": "<string>",
      "currency_exchange_rate": 123,
      "id": "<string>",
      "partner_name": "<string>",
      "account_name": "<string>",
      "matching_numbers": [
        "<string>"
      ],
      "analytic_distribution": [
        {
          "analytic_plan": "<string>",
          "analytic_accounts": [
            {
              "analytic_account": "<string>",
              "percentage": 123
            }
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

This access token needs to be included in each of your request to the Chift API.

Path Parameters

consumer_id
string<uuid>
required

Query Parameters

folder_id
string | null

Id of the accounting folder instance. A folder represents a legal entity within the system. Required when the multiple folders feature is enabled.

force_currency_exchange
enum<string> | null
default:false

Boolean flag indicating whether to force the use of the provided currency exchange rate instead of the rate used by the accounting software.

Available options:
true,
false

Body

application/json
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.

Minimum length: 1
currency
string
required

Indicates the currency of the journal entry (e.g., EUR, USD).

Minimum length: 1
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 · object[]
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.

Minimum length: 2
reference
string | null

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> | null

If the journal entry relates to an invoice, this is the due date for payment or settlement (format: YYYY-MM-DD).

currency_exchange_rate
number | null
default:1

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.

pdf
string | null

Base 64 string representing the PDF attached to the item.

posted
boolean | null
default:true

Indicates if the journal entry has been posted (finalized) in the accounting system. If not provided, it defaults to True.

start_date
string<date> | null

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> | null

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

Successful Response

journal_id
string
required

Id of the journal instance in the accounting system in which the journal entry is recorded.

id
string
required

Unique id of the journal entry instance in the accounting system.

reference
string | null

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> | null

If the journal entry relates to an invoice, this is the due date for payment or settlement (format: YYYY-MM-DD).

name
string | null
journal_name
string | null

Name of the journal in which the journal entry is recorded.

date
string<date> | null
default:1970-01-01

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 | null
default:false

Indicates if the journal entry has been posted (finalized) in the accounting system.

items
JournalItemMultiAnalyticPlan · object[] | null

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.