Available Data
List available data categories for a company.
View as MarkdownReturns counts of available data records across different categories for the specified company.
Endpoint
GET /api/v1/companies/:company_id/dataParameters
| Parameter | Type | In | Description |
|---|---|---|---|
company_id | integer | path | The unique identifier of the company. |
Code Examples
Get available data
import requests
url = 'https://statsnet.co/api/v1/companies/12345/data'
headers = {
'Authorization': 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers).json()
print(response)Response
The response body has no {"ok": ...} envelope: top-level keys are the record arrays per category plus a meta object with per-category counts. The arrays are populated only when the company view has been purchased (otherwise they come back empty/null); the counts in meta are always present.
Success response
{
"bank_accounts": [],
"stores": [],
"certs": [],
"debtors": [],
"jobs": [],
"quasi_contracts": [],
"places": [],
"states": [],
"pos_terminals": [],
"domains": [],
"scoring": [],
"gov_loans": [],
"trademarks": [],
"counterparties": [],
"kaspi_shops": [],
"assets": [{ "type": "vehicle" }],
"rights": [],
"farmers": [],
"fields": [],
"counterparties_count": 12,
"meta": {
"bank_accounts_count": 3,
"stores_count": 0,
"certs_count": 2,
"debtors_count": 1,
"quasi_contracts_count": 0,
"jobs_count": 5,
"places_count": 0,
"states_count": 0,
"pos_terminals_count": 0,
"domains_count": 1,
"scoring_count": 0,
"assets_count": 1,
"rights_count": 0,
"farmers_count": 0,
"fields_count": 0,
"gov_loans_count": 0,
"trademarks_count": 0,
"counterparties_count": 12,
"kaspi_count": 0
}
}| Field | Type | Description |
|---|---|---|
bank_accounts, stores, certs, debtors, jobs, quasi_contracts, places, states, pos_terminals, domains, scoring, gov_loans, trademarks, counterparties, kaspi_shops, rights, farmers, fields | array | Record lists per data category. |
assets | array | Asset types derived from tax data (vehicle, realty, land plot). |
counterparties_count | integer | Number of counterparty records. |
meta | object | Per-category record counts (*_count). |
Error Handling
Errors are returned as {"status": <HTTP code>, "message": "<text>"}.
Error response
{
"status": 403,
"message": "access denied"
}