curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/expenses \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"pdf": "<string>",
"pdf_name": "<string>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/expenses"
payload = {
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"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({
employee_id: '<string>',
total: 123,
untaxed_amount: 123,
tax_amount: 123,
currency: '<string>',
date: '2023-12-25',
lines: [
{
total: 123,
untaxed_amount: 123,
tax_amount: 123,
account_number: '<string>',
tax_rate: 123,
tax_id: '<string>',
description: '<string>'
}
],
reference: '<string>',
number: '<string>',
currency_exchange_rate: 1,
pdf: '<string>',
pdf_name: '<string>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/expenses', 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/expenses",
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([
'employee_id' => '<string>',
'total' => 123,
'untaxed_amount' => 123,
'tax_amount' => 123,
'currency' => '<string>',
'date' => '2023-12-25',
'lines' => [
[
'total' => 123,
'untaxed_amount' => 123,
'tax_amount' => 123,
'account_number' => '<string>',
'tax_rate' => 123,
'tax_id' => '<string>',
'description' => '<string>'
]
],
'reference' => '<string>',
'number' => '<string>',
'currency_exchange_rate' => 1,
'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/expenses"
payload := strings.NewReader("{\n \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\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/expenses")
.header("Content-Type", "application/json")
.body("{\n \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/expenses")
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 \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"id": "<string>",
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"pdf": "<string>",
"pdf_name": "<string>"
}{
"message": "Error while trying to perform your request",
"status": "error"
}{
"message": "Validation error",
"status": "error",
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create an expense
Creates a new employee expense claim in the accounting system and returns the created record.
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/accounting/expenses \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"pdf": "<string>",
"pdf_name": "<string>"
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/accounting/expenses"
payload = {
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"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({
employee_id: '<string>',
total: 123,
untaxed_amount: 123,
tax_amount: 123,
currency: '<string>',
date: '2023-12-25',
lines: [
{
total: 123,
untaxed_amount: 123,
tax_amount: 123,
account_number: '<string>',
tax_rate: 123,
tax_id: '<string>',
description: '<string>'
}
],
reference: '<string>',
number: '<string>',
currency_exchange_rate: 1,
pdf: '<string>',
pdf_name: '<string>'
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/accounting/expenses', 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/expenses",
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([
'employee_id' => '<string>',
'total' => 123,
'untaxed_amount' => 123,
'tax_amount' => 123,
'currency' => '<string>',
'date' => '2023-12-25',
'lines' => [
[
'total' => 123,
'untaxed_amount' => 123,
'tax_amount' => 123,
'account_number' => '<string>',
'tax_rate' => 123,
'tax_id' => '<string>',
'description' => '<string>'
]
],
'reference' => '<string>',
'number' => '<string>',
'currency_exchange_rate' => 1,
'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/expenses"
payload := strings.NewReader("{\n \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\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/expenses")
.header("Content-Type", "application/json")
.body("{\n \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/accounting/expenses")
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 \"employee_id\": \"<string>\",\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"currency\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"lines\": [\n {\n \"total\": 123,\n \"untaxed_amount\": 123,\n \"tax_amount\": 123,\n \"account_number\": \"<string>\",\n \"tax_rate\": 123,\n \"tax_id\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"reference\": \"<string>\",\n \"number\": \"<string>\",\n \"currency_exchange_rate\": 1,\n \"pdf\": \"<string>\",\n \"pdf_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"employee_id": "<string>",
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"currency": "<string>",
"date": "2023-12-25",
"lines": [
{
"total": 123,
"untaxed_amount": 123,
"tax_amount": 123,
"account_number": "<string>",
"tax_rate": 123,
"tax_id": "<string>",
"description": "<string>"
}
],
"id": "<string>",
"reference": "<string>",
"number": "<string>",
"currency_exchange_rate": 1,
"pdf": "<string>",
"pdf_name": "<string>"
}{
"message": "Error while trying to perform your request",
"status": "error"
}{
"message": "Validation error",
"status": "error",
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}- What is a financial entry? ↗
- What is a journal entry? ↗
- How to select the right accounts in journal entries? ↗
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
Employee identifier in the accounting system.
Total amount including taxes for the expense.
Total untaxed amount for the expense.
Total tax amount for the expense.
Currency of the expense (e.g., EUR, USD).
Expense date.
Expense lines.
1Show child attributes
Show child attributes
External reference.
Unique number for idempotency in the accounting system.
Exchange rate at expense date if currency differs from folder currency. Must be positive if provided.
Base64 PDF attachment of the expense document.
A name for the PDF file to be created for accounting software that support it.
1 - 200^[a-zA-Z0-9\-_ ]{1,196}(?:.pdf)?$Response
Successful Response
Employee identifier in the accounting system.
Total amount including taxes for the expense.
Total untaxed amount for the expense.
Total tax amount for the expense.
Currency of the expense (e.g., EUR, USD).
Expense date.
Expense lines.
1Show child attributes
Show child attributes
Unique id of the expense in the accounting system.
External reference.
Unique number for idempotency in the accounting system.
Exchange rate at expense date if currency differs from folder currency. Must be positive if provided.
Base64 PDF attachment of the expense document.
A name for the PDF file to be created for accounting software that support it.
1 - 200^[a-zA-Z0-9\-_ ]{1,196}(?:.pdf)?$