Retrieve payables (supplier invoices, supplier refunds, card purchases, or employee expenses)
curl --request GET \
--url https://api.chift.eu/consumers/{consumer_id}/spend_management/payablesimport requests
url = "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.chift.eu/consumers/{consumer_id}/spend_management/payables', 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}/spend_management/payables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"payable_type": "supplier_invoice",
"currency": "<string>",
"untaxed_amount": 123,
"tax_amount": 123,
"total": 123,
"payable_date": "2023-12-25",
"original_payable_type": "<string>",
"reversed": false,
"invoice_number": "<string>",
"description": "<string>",
"supplier_id": "<string>",
"supplier_name": "<string>",
"employee_id": "<string>",
"exchange_rate": 123,
"accounting_date": "2026-01-15",
"due_date": "2023-12-25",
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"last_updated_on": "2023-11-07T05:31:56Z",
"lines": [
{
"quantity": 123,
"unit_price": 123,
"untaxed_amount": 123,
"tax_rate": 21,
"tax_amount": 123,
"total": 123,
"description": "",
"account_number": "<string>",
"account_id": "<string>",
"tax_id": "<string>",
"expense_category_id": "<string>",
"analytic_distribution": []
}
],
"attachments": [
{
"content_type": "application/pdf",
"content": "<string>",
"attached_at": "2023-12-25"
}
],
"export_status": "unknown",
"allocations": [
{
"amount": 123,
"currency": "<string>",
"type": "financial_movement",
"id": "<string>"
}
]
}
],
"total": 1,
"page": 2,
"size": 2
}{
"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": {}
}
]
}Payables
Retrieve payables (supplier invoices, supplier refunds, card purchases, or employee expenses)
payable_type is mandatory and selects exactly one kind of payable per call: supplier_invoice, supplier_refund, card_purchase, or employee_expense.
GET
/
consumers
/
{consumer_id}
/
spend_management
/
payables
Retrieve payables (supplier invoices, supplier refunds, card purchases, or employee expenses)
curl --request GET \
--url https://api.chift.eu/consumers/{consumer_id}/spend_management/payablesimport requests
url = "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.chift.eu/consumers/{consumer_id}/spend_management/payables', 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}/spend_management/payables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"payable_type": "supplier_invoice",
"currency": "<string>",
"untaxed_amount": 123,
"tax_amount": 123,
"total": 123,
"payable_date": "2023-12-25",
"original_payable_type": "<string>",
"reversed": false,
"invoice_number": "<string>",
"description": "<string>",
"supplier_id": "<string>",
"supplier_name": "<string>",
"employee_id": "<string>",
"exchange_rate": 123,
"accounting_date": "2026-01-15",
"due_date": "2023-12-25",
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"last_updated_on": "2023-11-07T05:31:56Z",
"lines": [
{
"quantity": 123,
"unit_price": 123,
"untaxed_amount": 123,
"tax_rate": 21,
"tax_amount": 123,
"total": 123,
"description": "",
"account_number": "<string>",
"account_id": "<string>",
"tax_id": "<string>",
"expense_category_id": "<string>",
"analytic_distribution": []
}
],
"attachments": [
{
"content_type": "application/pdf",
"content": "<string>",
"attached_at": "2023-12-25"
}
],
"export_status": "unknown",
"allocations": [
{
"amount": 123,
"currency": "<string>",
"type": "financial_movement",
"id": "<string>"
}
]
}
],
"total": 1,
"page": 2,
"size": 2
}{
"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": {}
}
]
}Query Parameters
Pagination cursor for endpoints that support it.
When using cursor based pagination, the total is returned as -1 in the response, next_cursor contains
the cursor to use to get the next page of data.
When using cursor based pagination, the page attribute is completely ignored.
To opt into cursor based pagination, start your pagination with an empty string `''`.
Cursor based pagination is not compatible with X-Chift-Force-Refresh and all other query parameters MUST match the initial call.
Which kind of payable to retrieve. Exactly one type per call.
What kind of payable a record is. Distinct from original_payable_type, which is whatever
label the connector's own provider uses (e.g. Spendesk's subType) -- this is the normalized,
cross-connector classification.
Available options:
supplier_invoice, supplier_refund, card_purchase, employee_expense Retrieve only payables with this export status, e.g. to_export to fetch exactly the ones still to be synced to the target accounting system. Shared across every payable-like entity of this vertical (payables, financial movements, ...): whether it still needs to be synced to the target accounting system.
Available options:
unknown, not_ready, to_export, exported