Get a todo
curl --request GET \
--url https://getbill.io/external-api/v1/todos/{type}/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/todos/{type}/{id}"
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/{type}/{id}', 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/{type}/{id}",
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/{type}/{id}"
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/{type}/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/todos/{type}/{id}")
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 a todo
Retrieve one agreement, debtor request, or AI detection
GET
/
external-api
/
v1
/
todos
/
{type}
/
{id}
Get a todo
curl --request GET \
--url https://getbill.io/external-api/v1/todos/{type}/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/todos/{type}/{id}"
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/{type}/{id}', 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/{type}/{id}",
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/{type}/{id}"
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/{type}/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/todos/{type}/{id}")
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 Single Todo
This endpoint requires a valid Bearer token with thedebts:read scope.
curl -X GET https://getbill.io/external-api/v1/todos/debtor_request/enc_234 \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Path Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | Todo type: agreement, debtor_request, or ai_detection |
id | string | Encrypted todo ID (for agreements: debt ID; for disputes: dispute ID) |
Response
{
"todo": {
"id": "enc_234",
"type": "debtor_request",
"status": "suggested",
"title": "Payment Already Made",
"description": "Customer claims payment was already made",
"theme": "Payment Issues",
"detected_content": "I already paid this bill last month",
"ai_confidence": 85,
"source": "portal",
"admin_notes": null,
"debt": {
"id": "enc_456",
"reference": "INV-2024-001",
"amount": 1500.00,
"status": "status.default.on_hold",
"status_id": "enc_2"
},
"followup_id": null,
"call_id": null,
"audio_url": null,
"pdf_url": null,
"media_urls_expire_at": null,
"created_at": "2024-01-15T10:30:00+00:00",
"reviewed_at": null,
"updated_at": "2024-01-15T11:00:00+00:00",
"collection_paused": true
}
}
When
audio_url or pdf_url are present, they are pre-signed S3 URLs valid for 1 hour. The media_urls_expire_at field indicates when they expire.