Relations (Table)
Get company relations and affiliations as a list.
View as MarkdownReturns company relations and affiliations in a flat table format, suitable for tabular display.
Endpoint
GET /api/v1/companies/:company_id/relations_tableParameters
| Parameter | Type | In | Description |
|---|---|---|---|
company_id | integer | path | The unique identifier of the company. |
page | integer | body | Page number (default: 1). |
limit | integer | body | Records per page (default: 100). |
Code Examples
Get relations table
import requests
url = 'https://api.statsnet.co/api/v1/companies/12345/relations_table'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers).json()
print(response)Response
Success response
{
"ok": true,
"nodes": [
{
"source": "Company A",
"target": "Ivanov I.I.",
"connection": "director"
},
{
"source": "Company B",
"target": "Ivanov I.I.",
"connection": "shareholder"
}
],
"links": [
{
"source": "Company A",
"target": "Company B",
"connection": "affiliated"
}
],
"meta": {
"directors": 1,
"shareholders": 1
},
"total": 3
}Error Handling
Error response
{
"ok": false,
"error": {
"code": 403,
"message": "Forbidden"
}
}