Skip to content
UCC Lien Report Check a debtor
On this page
  1. Steps
  2. Status codes in a report pipeline
  3. Keys and environments
  4. Where to read more
  5. Example requests
  6. Sources reviewed

First Statsnet call for a report’s entity section

Quick answer. All REST calls go to https://statsnet.co/api/v1 and return JSON. Send the key as x-api-key: sk_live_… for search and paid routes. A minimal entity section needs three calls: search, full profile and relations. The OpenAPI 3.1 spec at /api/v1/openapi.json generates a typed client.

Steps

  1. Generate a client

    Use the OpenAPI 3.1 spec or install the Python, JavaScript or Go SDK.

  2. Search the requested name

    POST /companies/search and let an operator confirm the match.

  3. Fetch profile and relations

    GET /companies/{id}/paid and /companies/{id}/relations.

  4. Render the section

    Template the fields with source and retrieval date.

Status codes in a report pipeline

A report generator should stop and alert on 401 (bad key), 402 (inactive subscription) and 403 (endpoint not on plan) rather than shipping a report with an empty entity section. A 429 signals quota or rate limiting; back off and retry. A 404 is a legitimate outcome that the report should state in words.

Keys and environments

A Statsnet account can hold up to 10 API keys, and each key inherits the owner’s subscription. Give the report generator, the staging environment and any analyst notebooks their own keys so a leaked or revoked key does not stop production reports. The public endpoints — the profile by internal ID, the ID resolver, the Markdown card and the regions list — need no key at all and are useful for smoke tests that should not consume quota.

Where to read more

Statsnet publishes the Swagger UI, a machine-readable page at statsnet.co/api.md and SDK repositories on GitHub (python-sdk, js-sdk, gosdk). The API page lists public and paid endpoints and the accounting rules.

Example requests

Search
curl -X POST "https://statsnet.co/api/v1/companies/search?limit=3" \
  -H "x-api-key: $STATSNET_KEY" -H "Content-Type: application/json" \
  -d '{"query": "Ridgeline Supply"}'
Profile and relations
curl "https://statsnet.co/api/v1/companies/$ID/paid" -H "x-api-key: $STATSNET_KEY"
curl "https://statsnet.co/api/v1/companies/$ID/relations" -H "x-api-key: $STATSNET_KEY"
Python SDK
pip install statsnet-python-sdk

Sources reviewed