curl --request GET \
--url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/', 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://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"as_of_date": "2023-12-25",
"group_by": "vendor",
"currency": "<string>",
"total_outstanding_cents": 123,
"total_aging_buckets": {
"current": 123,
"days_1_30": 123,
"days_31_60": 123,
"days_61_90": 123,
"over_90_days": 123
},
"vendors": [
{
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_name": "<string>",
"total_outstanding_cents": 123,
"aging_buckets": {
"current": 123,
"days_1_30": 123,
"days_31_60": 123,
"days_61_90": 123,
"over_90_days": 123
}
}
]
}
]{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Get accounts payable aging
Retrieve AP aging analysis grouped by vendor.
Aging buckets:
- Current: Not yet due (0 days overdue)
- 1-30 days: 1-30 days overdue
- 31-60 days: 31-60 days overdue
- 61-90 days: 61-90 days overdue
- 90+ days: 90 or more days overdue
Returns:
- Total outstanding across all vendors
- Total aging buckets (sum across all vendors)
- Per-vendor breakdown (sorted by total outstanding descending)
All values are in cents. Currency is the business’s base currency.
curl --request GET \
--url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/', 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://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"as_of_date": "2023-12-25",
"group_by": "vendor",
"currency": "<string>",
"total_outstanding_cents": 123,
"total_aging_buckets": {
"current": 123,
"days_1_30": 123,
"days_31_60": 123,
"days_61_90": 123,
"over_90_days": 123
},
"vendors": [
{
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_name": "<string>",
"total_outstanding_cents": 123,
"aging_buckets": {
"current": 123,
"days_1_30": 123,
"days_31_60": 123,
"days_61_90": 123,
"over_90_days": 123
}
}
]
}
]{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Authorizations
Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>
Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.
Path Parameters
Business UUID
Query Parameters
Date to calculate aging as of (YYYY-MM-DD). Defaults to today.
Grouping: 'vendor' (default) or 'total'
total, vendor Response
Business UUID
Date to calculate aging as of
Grouping: 'vendor' or 'total'
vendor- vendortotal- total
vendor, total Business base currency (e.g., EUR, GBP, USD)
Total outstanding across all vendors in cents
Total aging buckets (sum across all vendors)
Show child attributes
Show child attributes
Per-vendor aging breakdown (sorted by total outstanding descending)
Show child attributes
Show child attributes
Was this page helpful?