API docs

Departments

Get department information for a company.

Returns department/division information for the specified company.

Endpoint

GET /api/v1/companies/:company_id/department

Parameters

ParameterTypeInDescription
company_idintegerpathThe unique identifier of the company.

Code Examples

Get departments

import requests

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

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

Response

Success response

{
  "identifier": "400500600",
  "jurisdiction": "kz",
  "departments": [
    "State Revenue Department for Almaty",
    "Department of Ecology"
  ]
}

If no department record exists for the company, an empty object is returned with 200 OK:

Empty response

{
  "identifier": "",
  "jurisdiction": "",
  "departments": null
}

Error Handling

Error response (403)

{
  "status": 403,
  "message": "access denied"
}

Payment required (402)

{
  "status": 402,
  "message": "payment required"
}

Quota exhausted (429)

{
  "status": 429,
  "message": "quota exhausted"
}