Get todo statistics
curl --request GET \
--url https://getbill.io/external-api/v1/todos/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/todos/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/todos/stats', 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://getbill.io/external-api/v1/todos/stats",
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://getbill.io/external-api/v1/todos/stats"
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://getbill.io/external-api/v1/todos/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/todos/stats")
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_bodyTodos API
Get todo statistics
Retrieve aggregate todo statistics for a period
GET
/
external-api
/
v1
/
todos
/
stats
Get todo statistics
curl --request GET \
--url https://getbill.io/external-api/v1/todos/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/todos/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/todos/stats', 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://getbill.io/external-api/v1/todos/stats",
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://getbill.io/external-api/v1/todos/stats"
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://getbill.io/external-api/v1/todos/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/todos/stats")
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_bodyGet Todo Statistics
This endpoint requires a valid Bearer token with thedebts:read scope.
curl -X GET https://getbill.io/external-api/v1/todos/stats \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Query Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
period | string | Time period filter | since_last_month |
Response
{
"stats": {
"agreements": {
"total": 25,
"active": 15,
"pending": 7,
"overdue": 3
},
"debtor_requests": {
"total": 8,
"by_type": {
"portal_dispute": 4,
"hardship": 2,
"payment_plan": 2
}
},
"ai_detections": {
"total": 12,
"by_type": {
"ai_dispute": 7,
"objection": 5
}
},
"blocking_disputes": {
"total": 8,
"by_status": {
"suggested": 5,
"validated": 2,
"rejected": 1
}
},
"non_blocking_disputes": {
"total": 12,
"by_status": {
"suggested": 8,
"validated": 3,
"rejected": 1
}
},
"total": {
"all": 45
}
}
}
The
blocking_disputes and non_blocking_disputes keys in the stats response are kept for backward compatibility. Use debtor_requests and ai_detections for new integrations.