Debtors
Get debtor records for a company.
View as MarkdownReturns an aggregate debt summary for the specified company: the recoverer identifier, the total amount owed, and the number of enforcement proceeding records.
Endpoint
GET /api/v1/companies/:company_id/debtorsParameters
| Parameter | Type | In | Description |
|---|---|---|---|
company_id | integer | path | The unique identifier of the company. |
page | integer | query | Page number (default: 1). |
limit | integer | query | Records per page (default: 100). |
Code Examples
Get company debtors
import requests
url = 'https://statsnet.co/api/v1/companies/12345/debtors'
headers = {
'Authorization': 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers).json()
print(response)Response
Success response
{
"recoverer_identifier": "100000001",
"sum": 150000.5,
"count": 3
}Error Handling
Error response
{
"status": 403,
"message": "access denied"
}This endpoint can also return {"status": 402, "message": "payment required"} when the subscription is canceled or expired, and {"status": 429, "message": "quota exhausted"} when the plan’s report quota for the current period is used up.