curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts \
--header 'Content-Type: application/json' \
--data '
{
"code": "BANK-001",
"currency": "EUR",
"bank_name": "Example Bank",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts"
payload = {
"code": "BANK-001",
"currency": "EUR",
"bank_name": "Example Bank",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000"
}
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({
code: 'BANK-001',
currency: 'EUR',
bank_name: 'Example Bank',
account_name: 'Main checking account',
account_number: '0000000000',
iban: 'BE00000000000000'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts', 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-accounts",
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([
'code' => 'BANK-001',
'currency' => 'EUR',
'bank_name' => 'Example Bank',
'account_name' => 'Main checking account',
'account_number' => '0000000000',
'iban' => 'BE00000000000000'
]),
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-accounts"
payload := strings.NewReader("{\n \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\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-accounts")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts")
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 \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-bank-account-id>",
"code": "BANK-001",
"currency": "EUR",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000",
"bank_name": "Example Bank",
"journal_id": "<accounting-journal-id>",
"ledger_account": "<accounting-account-number>",
"unallocated_account": "<accounting-account-number>"
}Create bank account
Creates a new bank account in the accounting system and returns the created object.
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts \
--header 'Content-Type: application/json' \
--data '
{
"code": "BANK-001",
"currency": "EUR",
"bank_name": "Example Bank",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts"
payload = {
"code": "BANK-001",
"currency": "EUR",
"bank_name": "Example Bank",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000"
}
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({
code: 'BANK-001',
currency: 'EUR',
bank_name: 'Example Bank',
account_name: 'Main checking account',
account_number: '0000000000',
iban: 'BE00000000000000'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts', 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-accounts",
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([
'code' => 'BANK-001',
'currency' => 'EUR',
'bank_name' => 'Example Bank',
'account_name' => 'Main checking account',
'account_number' => '0000000000',
'iban' => 'BE00000000000000'
]),
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-accounts"
payload := strings.NewReader("{\n \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\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-accounts")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/bank-accounts")
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 \"code\": \"BANK-001\",\n \"currency\": \"EUR\",\n \"bank_name\": \"Example Bank\",\n \"account_name\": \"Main checking account\",\n \"account_number\": \"0000000000\",\n \"iban\": \"BE00000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-bank-account-id>",
"code": "BANK-001",
"currency": "EUR",
"account_name": "Main checking account",
"account_number": "0000000000",
"iban": "BE00000000000000",
"bank_name": "Example Bank",
"journal_id": "<accounting-journal-id>",
"ledger_account": "<accounting-account-number>",
"unallocated_account": "<accounting-account-number>"
}- What is a journal? ↗
Path Parameters
Query Parameters
Id of the accounting folder instance. A folder represents a legal entity within the system. Required when the multiple folders feature is enabled.
Body
A userfriendly code to represent the bank account. This will be used as the code of the journal if we need to create a journal for the bank account.
1"BANK-001"
Currency of the bank account (e.g., EUR, USD).
1"EUR"
Name of the bank linked to the bank account.
"Example Bank"
Name of the bank account. Represents this specific bank account in the accounting system.
"Main checking account"
Unique number representing the bank account. At least one of the fields 'account_number' or 'IBAN' must be filled in.
"0000000000"
IBAN of the bank account. At least one of the fields 'account_number' or 'IBAN' must be filled in.
"BE00000000000000"
Response
Successful Response
"<this-bank-account-id>"
A userfriendly code to represent the bank account. This will be used as the code of the journal if we need to create a journal for the bank account.
"BANK-001"
Currency of the bank account (e.g., EUR, USD).
"EUR"
Name of the bank account. Represents this specific bank account in the accounting system.
"Main checking account"
Unique number representing the bank account.
"0000000000"
IBAN of the bank account.
"BE00000000000000"
Name of the bank linked to the bank account.
"Example Bank"
Indicates the journal used in the accounting system to represent the bank account. The journal contains all the transactions related to this specific bank account.
"<accounting-journal-id>"
Indicates the ledger account used in the accounting system to represent the bank account. The ledger account is used in all the transactions related to this specific bank account. This ledger account is used to track the balance of the bank account.
"<accounting-account-number>"
Unallocated ledger account used to book entries when the final ledger account / client / supplier / employee is not yet known (specific to bank and cash journals)
"<accounting-account-number>"