Skip to main content
POST
/
consumers
/
{consumer_id}
/
accounting
/
bank-transactions
Create bank transactions
curl --request POST \
  --url https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions \
  --header 'Content-Type: application/json' \
  --data '
{
  "bank_statement_date": "2023-12-25",
  "bank_account_id": "<string>",
  "currency": "<string>",
  "external_bank_statement_id": "<string>",
  "items": [
    {
      "amount": 123,
      "general_ledger_account": "<string>",
      "description": "<string>",
      "external_transaction_id": "<string>",
      "fee_amount": 0,
      "tax_amount": 0,
      "currency_exchange_rate": 1,
      "counterpart": {
        "id": "<string>",
        "name": "John Doe",
        "iban": "BE61310126985517",
        "bank_account": "310126985517"
      }
    }
  ],
  "opening_balance": 123,
  "pdf": "<string>",
  "pdf_name": "<string>"
}
'
import requests

url = "https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions"

payload = {
"bank_statement_date": "2023-12-25",
"bank_account_id": "<string>",
"currency": "<string>",
"external_bank_statement_id": "<string>",
"items": [
{
"amount": 123,
"general_ledger_account": "<string>",
"description": "<string>",
"external_transaction_id": "<string>",
"fee_amount": 0,
"tax_amount": 0,
"currency_exchange_rate": 1,
"counterpart": {
"id": "<string>",
"name": "John Doe",
"iban": "BE61310126985517",
"bank_account": "310126985517"
}
}
],
"opening_balance": 123,
"pdf": "<string>",
"pdf_name": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
bank_statement_date: '2023-12-25',
bank_account_id: '<string>',
currency: '<string>',
external_bank_statement_id: '<string>',
items: [
{
amount: 123,
general_ledger_account: '<string>',
description: '<string>',
external_transaction_id: '<string>',
fee_amount: 0,
tax_amount: 0,
currency_exchange_rate: 1,
counterpart: {
id: '<string>',
name: 'John Doe',
iban: 'BE61310126985517',
bank_account: '310126985517'
}
}
],
opening_balance: 123,
pdf: '<string>',
pdf_name: '<string>'
})
};

fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bank_statement_date' => '2023-12-25',
'bank_account_id' => '<string>',
'currency' => '<string>',
'external_bank_statement_id' => '<string>',
'items' => [
[
'amount' => 123,
'general_ledger_account' => '<string>',
'description' => '<string>',
'external_transaction_id' => '<string>',
'fee_amount' => 0,
'tax_amount' => 0,
'currency_exchange_rate' => 1,
'counterpart' => [
'id' => '<string>',
'name' => 'John Doe',
'iban' => 'BE61310126985517',
'bank_account' => '310126985517'
]
]
],
'opening_balance' => 123,
'pdf' => '<string>',
'pdf_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions"

payload := strings.NewReader("{\n \"bank_statement_date\": \"2023-12-25\",\n \"bank_account_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"external_bank_statement_id\": \"<string>\",\n \"items\": [\n {\n \"amount\": 123,\n \"general_ledger_account\": \"<string>\",\n \"description\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"fee_amount\": 0,\n \"tax_amount\": 0,\n \"currency_exchange_rate\": 1,\n \"counterpart\": {\n \"id\": \"<string>\",\n \"name\": \"John Doe\",\n \"iban\": \"BE61310126985517\",\n \"bank_account\": \"310126985517\"\n }\n }\n ],\n \"opening_balance\": 123,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions")
.header("Content-Type", "application/json")
.body("{\n \"bank_statement_date\": \"2023-12-25\",\n \"bank_account_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"external_bank_statement_id\": \"<string>\",\n \"items\": [\n {\n \"amount\": 123,\n \"general_ledger_account\": \"<string>\",\n \"description\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"fee_amount\": 0,\n \"tax_amount\": 0,\n \"currency_exchange_rate\": 1,\n \"counterpart\": {\n \"id\": \"<string>\",\n \"name\": \"John Doe\",\n \"iban\": \"BE61310126985517\",\n \"bank_account\": \"310126985517\"\n }\n }\n ],\n \"opening_balance\": 123,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/bank-transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"bank_statement_date\": \"2023-12-25\",\n \"bank_account_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"external_bank_statement_id\": \"<string>\",\n \"items\": [\n {\n \"amount\": 123,\n \"general_ledger_account\": \"<string>\",\n \"description\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"fee_amount\": 0,\n \"tax_amount\": 0,\n \"currency_exchange_rate\": 1,\n \"counterpart\": {\n \"id\": \"<string>\",\n \"name\": \"John Doe\",\n \"iban\": \"BE61310126985517\",\n \"bank_account\": \"310126985517\"\n }\n }\n ],\n \"opening_balance\": 123,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "bank_statement_date": "2023-12-25",
  "bank_account_id": "<string>",
  "currency": "<string>",
  "items": [
    {
      "amount": 123,
      "general_ledger_account": "<string>",
      "description": "<string>",
      "external_transaction_id": "<string>",
      "fee_amount": 0,
      "tax_amount": 0,
      "currency_exchange_rate": 1,
      "counterpart": {
        "id": "<string>",
        "name": "John Doe",
        "iban": "BE61310126985517",
        "bank_account": "310126985517"
      },
      "id": "<string>"
    }
  ],
  "id": "<string>",
  "external_bank_statement_id": "<string>"
}
{
"message": "The format of the bank_statement_id doesn't seem to be correct.",
"status": "error"
}
{
"message": "Validation error",
"status": "error",
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

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.

Body

application/json
bank_statement_date
string<date>
required

Date of the bank statement

bank_account_id
string
required

Unique ID of the bank account in the accounting system

Minimum string length: 1
currency
string
required

Currency of the bank statement. This must be the same as the currency of the bank account.

Minimum string length: 1
external_bank_statement_id
string
required

External bank statement ID. To be compatible with all software, we recommend to use only digits with a maximum length of 10.

Minimum string length: 1
items
BankTransactionItemIn · object[]
required

List of transaction items

opening_balance
number | null

Opening balance of the bank account before the statement

pdf
string | null

Base64 PDF attachment of the bank statement.

pdf_name
string | null

A name for the PDF file to be created for accounting software that support it.

Required string length: 1 - 200
Pattern: ^[a-zA-Z0-9\-_ ]{1,196}(?:.pdf)?$

Response

Successful Response

bank_statement_date
string<date>
required

Date of the bank statement

bank_account_id
string
required

Unique ID of the bank account in the accounting system

Minimum string length: 1
currency
string
required

Currency of the bank statement. This must be the same as the currency of the bank account.

Minimum string length: 1
items
BankTransactionItemOut · object[]
required

List of transaction items with their IDs

id
string | null

Internal bank statement ID generated by the accounting system

external_bank_statement_id
string | null

External bank statement ID