Relations (Graph)
Get company relations and affiliations as a graph.
View as MarkdownReturns company relations and affiliations in a graph format with nodes and links. Useful for visualizing corporate connections.
Endpoint
GET /api/v1/companies/:company_id/relationsParameters
| 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 relations graph
import requests
url = 'https://statsnet.co/api/v1/companies/12345/relations'
headers = {
'Authorization': 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers).json()
print(response)Response
Success response
{
"node": [
{ "id": 12345, "name": "Company A", "type": "company", "is_person": false, "key": 12345 },
{ "id": 777001, "name": "Ivanov I.I.", "type": "person", "is_person": true, "key": 777001 }
],
"links": [
{
"id": 777001,
"name": "Ivanov I.I.",
"source_key": 777001,
"type": "person",
"connection_type": "officers",
"connection_id": 12345,
"connection_name": "Company A",
"root_company_id": 12345,
"connection_hash_identifier": "5f4dcc3b5aa765d61d8327deb882cf99",
"connection_key": 12345,
"is_person": true
}
],
"meta": {
"officers": 1,
"shareholders": 0
},
"total": 1
}Error Handling
Error response
{
"status": 403,
"message": "access denied"
}This is a paid endpoint. It can also respond with 402 — {"status": 402, "message": "payment required"} — when the subscription is expired, canceled, or past due, and 429 — {"status": 429, "message": "quota exhausted"} — when the plan’s report quota for the current period is used up.