API docs

Relations (Table)

Get company relations and affiliations as a list.

Returns company relations and affiliations in a flat table format, suitable for tabular display.

Endpoint

GET /api/v1/companies/:company_id/relations_table

Parameters

ParameterTypeInDescription
company_idintegerpathThe unique identifier of the company.
pageintegerqueryPage number (default: 1).
limitintegerqueryRecords per page (default: 100).
typestringqueryOptional filter by connection type (e.g. officers, shareholders, addresses, contacts, affiliations, branches, subsidiaries).

Code Examples

Get relations table

import requests

url = 'https://statsnet.co/api/v1/companies/12345/relations_table'
headers = {
  'Authorization': 'Bearer sk_live_YOUR_KEY',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers).json()
print(response)

Response

Success response

{
  "nodes": [
    {
      "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
    }
  ],
  "links": [
    {
      "id": 67890,
      "name": "Company B",
      "source_key": 67890,
      "type": "company",
      "connection_type": "shareholders",
      "connection_id": 12345,
      "connection_name": "Company A",
      "root_company_id": 12345,
      "connection_hash_identifier": "9a0364b9e99bb480dd25e1f0284c8555",
      "connection_key": 12345,
      "is_person": false
    }
  ],
  "meta": { "officers": 1, "shareholders": 1 },
  "total": 2
}

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.