Get Creditor
curl --request GET \
--url https://getbill.io/external-api/v1/creditors/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/creditors/{id}"
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/creditors/{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/creditors/{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: <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/creditors/{id}"
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/creditors/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/creditors/{id}")
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": {
"data": {
"id": "abc123def456",
"name": "Acme Corporation",
"email": "billing@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "John Billing",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-01-20 14:22:00",
"totalDebts": 45,
"totalAmount": 125750.00
}
}
}
Creditors API
Get Creditor
Retrieve detailed information about a specific creditor
GET
/
external-api
/
v1
/
creditors
/
{id}
Get Creditor
curl --request GET \
--url https://getbill.io/external-api/v1/creditors/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/creditors/{id}"
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/creditors/{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/creditors/{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: <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/creditors/{id}"
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/creditors/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/creditors/{id}")
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": {
"data": {
"id": "abc123def456",
"name": "Acme Corporation",
"email": "billing@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "John Billing",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-01-20 14:22:00",
"totalDebts": 45,
"totalAmount": 125750.00
}
}
}
Overview
This endpoint returns detailed information about a specific creditor identified by its encrypted ID.Authentication
Requires a valid OAuth 2.0 access token with thecreditors:read scope.
Request
string
required
Bearer token for authentication
Path Parameters
string
required
The encrypted creditor ID
Example Request
curl -X GET "/external-api/v1/creditors/abc123def456" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
const creditorId = 'abc123def456';
const response = await fetch(`/external-api/v1/creditors/${creditorId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
});
const creditor = await response.json();
import requests
creditor_id = 'abc123def456'
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
response = requests.get(
f'/external-api/v1/creditors/{creditor_id}',
headers=headers
)
creditor = response.json()
Response
boolean
Always
false for successful requestsobject
The creditor object
Show creditor object
Show creditor object
string
Encrypted creditor identifier
string
Creditor’s name
string
Creditor’s email address
string
Creditor’s phone number
string
Creditor’s address
string
Creditor’s city
string
Creditor’s postal code
string
Creditor’s country
string
Creditor’s company registration number
string
Creditor’s tax number
string
Main contact person for the creditor
string
Creation timestamp (YYYY-MM-DD HH:mm:ss format)
string
Last update timestamp (YYYY-MM-DD HH:mm:ss format)
integer
Total number of debts for this creditor. Read-only. Only included in single creditor response.
number
Total amount of all debts for this creditor. Read-only. Only included in single creditor response.
Success Response
{
"error": false,
"message": "Success",
"data": {
"data": {
"id": "abc123def456",
"name": "Acme Corporation",
"email": "billing@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "John Billing",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-01-20 14:22:00",
"totalDebts": 45,
"totalAmount": 125750.00
}
}
}
Error Responses
{
"error": true,
"message": "Authentication credentials are missing or invalid",
"code": 401
}
{
"error": true,
"message": "Required scope \"creditors:read\" not found in token",
"code": 403
}
{
"error": true,
"message": "Creditor not found",
"code": 404
}
Rate Limiting
This endpoint is subject to rate limiting. See the Rate Limits documentation for details. Rate Limit: 1,000 requests per hourRelated Endpoints
- List Creditors - Get a list of all creditors
- Update Creditor - Update creditor information
- List Debts by Creditor - Get all debts for this creditor