curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/journal \
--header 'Content-Type: application/json' \
--data '
{
"code": "BNK",
"name": "Bank journal",
"counterpart_account": "<accounting-account-number>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/journal"
payload = {
"code": "BNK",
"name": "Bank journal",
"counterpart_account": "<accounting-account-number>"
}
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: 'BNK',
name: 'Bank journal',
counterpart_account: '<accounting-account-number>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/journal', 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/journal",
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' => 'BNK',
'name' => 'Bank journal',
'counterpart_account' => '<accounting-account-number>'
]),
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/journal"
payload := strings.NewReader("{\n \"code\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\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/journal")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/journal")
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\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-journal-id>",
"name": "Bank journal",
"journal_type": "customer_invoice",
"code": "BNK",
"counterpart_account": "<accounting-account-number>",
"unallocated_account": "<accounting-account-number>",
"next_document_numbers": [],
"iban": "BE00000000000000",
"currency": "EUR",
"other_currencies_allowed": true,
"blocked": false
}Create journal
Creates a new accounting journal (e.g., sales, purchase, or bank journal) in the accounting system.
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/journal \
--header 'Content-Type: application/json' \
--data '
{
"code": "BNK",
"name": "Bank journal",
"counterpart_account": "<accounting-account-number>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/journal"
payload = {
"code": "BNK",
"name": "Bank journal",
"counterpart_account": "<accounting-account-number>"
}
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: 'BNK',
name: 'Bank journal',
counterpart_account: '<accounting-account-number>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/journal', 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/journal",
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' => 'BNK',
'name' => 'Bank journal',
'counterpart_account' => '<accounting-account-number>'
]),
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/journal"
payload := strings.NewReader("{\n \"code\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\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/journal")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/journal")
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\": \"BNK\",\n \"name\": \"Bank journal\",\n \"counterpart_account\": \"<accounting-account-number>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<this-journal-id>",
"name": "Bank journal",
"journal_type": "customer_invoice",
"code": "BNK",
"counterpart_account": "<accounting-account-number>",
"unallocated_account": "<accounting-account-number>",
"next_document_numbers": [],
"iban": "BE00000000000000",
"currency": "EUR",
"other_currencies_allowed": true,
"blocked": false
}Query Parameters
Body
Response
Successful Response
Category of the journal. In retrieved data the values are customer_invoice, customer_refund, supplier_invoice, supplier_refund, financial_operation, miscellaneous_operation, or unknown. 'bank' and 'cash' exist only in the creation model; a journal representing a bank or cash account is retrieved as financial_operation (typically with an iban), so filter on financial_operation, not 'bank'/'cash', to find treasury journals.
customer_invoice, customer_refund, supplier_invoice, supplier_refund, financial_operation, miscellaneous_operation, unknown Unallocated ledger account used to book entries when the final ledger account / client / supplier / employee is not yet known (specific to treasury journals, retrieved as journal_type financial_operation; bank/cash in the creation model).
"<accounting-account-number>"
Indicates if the journal allows other currencies. If it doesn't allow other currencies an exchange rate must be provided for Chift to convert the amounts to the journal currency. This only applicable if the journal currency is the same as the accounting folder currency.