curl --request PATCH \
--url https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exportedimport requests
url = "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported', 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/{payable_id}/mark-as-exported",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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/{payable_id}/mark-as-exported"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"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>",
"employee_id": "<string>",
"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>",
"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>"
}
]
}Mark one payable as exported
Marks a payable as exported to the target accounting system, so it stops being returned by get_payables when filtered on export_status=to_export.
curl --request PATCH \
--url https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exportedimport requests
url = "https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported', 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/{payable_id}/mark-as-exported",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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/{payable_id}/mark-as-exported"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/spend_management/payables/{payable_id}/mark-as-exported")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"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>",
"employee_id": "<string>",
"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>",
"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>"
}
]
}Response
Successful Response
A single entity covering supplier invoices, supplier refunds (credit notes) and card purchases (including card refunds) -- these all come from the same underlying provider concept on Spendesk (a payable) and most connectors of this vertical are expected to share that shape, so this unifies what used to be two separate entities (SupplierInvoiceItem, CardPurchaseItem).
Id of the payable.
Normalized classification of this payable.
supplier_invoice, supplier_refund, card_purchase Invoice date, purchase date, or equivalent.
The connector's own provider-specific type/subtype for this payable, passed through as-is (e.g. Spendesk's subType: invoice, creditNote, singlePurchase, multiUseCard, physical, subscription).
Whether this record is a reversal (a credit note against a previously issued invoice, or a refund against a previous card purchase) rather than the original document/purchase. Its amounts stay positive, as an accounting refund's: this flag carries the direction.
Supplier's own invoice number, when available.
Free text description (e.g. merchant/vendor name for a card purchase).
Id of the supplier/merchant, when known. Filled in based on payable_type: always relevant for supplier_invoice/supplier_refund, and also present on a card_purchase when the merchant is a known supplier.
Id of the employee who submitted/owns the payable (the cardholder for a card_purchase), when known, regardless of payable_type.
Accounting date
"2026-01-15"
Payment due date, when relevant (supplier_invoice/supplier_refund).
Start date of the period covered by the payable. Set when it relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period begins.
"2026-01-01"
End date of the period covered by the payable. Set when it relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period ends.
"2026-01-31"
Show child attributes
Show child attributes
Attachments (e.g. the invoice PDF, a receipt). Only populated on get_payable when include_attachments=true was requested.
Show child attributes
Show child attributes
Whether this payable still needs to be synced to the target accounting system: 'not_ready' (not yet validated), 'to_export' (ready, not yet exported), 'exported', or 'unknown' when the connector cannot determine it.
unknown, not_ready, to_export, exported How this payable's amount has been settled so far.
Show child attributes
Show child attributes