Get Company Statistics
curl --request GET \
--url https://getbill.io/external-api/v1/company/statistics \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/company/statistics"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/company/statistics', 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/company/statistics",
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: <authorization>"
],
]);
$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/company/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/company/statistics")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/company/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Success",
"data": {
"debts": {
"total": 1247
},
"followups": {
"total": 3421
}
}
}
Company API
Get Company Statistics
Retrieve comprehensive statistics and analytics for your company
GET
/
external-api
/
v1
/
company
/
statistics
Get Company Statistics
curl --request GET \
--url https://getbill.io/external-api/v1/company/statistics \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/company/statistics"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/company/statistics', 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/company/statistics",
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: <authorization>"
],
]);
$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/company/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/company/statistics")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/company/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Success",
"data": {
"debts": {
"total": 1247
},
"followups": {
"total": 3421
}
}
}
Overview
This endpoint provides basic statistics about your debt collection activities, including total counts of debts and followups.Authentication
Requires a valid OAuth 2.0 access token with thecompany:read scope.
Request
string
required
Bearer token for authentication
Query Parameters
This endpoint does not accept any query parameters. Statistics are calculated for all time.Example Request
curl -X GET "/external-api/v1/company/statistics" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
const response = await fetch('/external-api/v1/company/statistics', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
});
const stats = await response.json();
Response
boolean
Always
false for successful requestsstring
Success message
object
Success Response
{
"error": false,
"message": "Success",
"data": {
"debts": {
"total": 1247
},
"followups": {
"total": 3421
}
}
}