Hopp til innhold

SELSKAPSOVERVÅKING

Selskapsovervåking

En overvåkingsliste per organisasjon, en hendelsesstrøm og varsler som webhook eller e-post. Samme nøkler som de andre API-ene, men et eget produkt med egen plan: prisen er per fulgte selskap per måned, og overvåking teller aldri som oppslag.

Hele svaret eller et utvalg: sections, package og meta virker likt i alle API-ene.

API-versjon
0.13.0
Endepunkter
11
Innhold

Endepunkter

https://api.approach.no/api/v1/companies · OpenAPI-kontrakt

GET

/watchlist

List watched companies.

Parametere

NavnTypeGrenser og standardBeskrivelse
cursor
spørring
string—next_cursor from the previous page
limit
spørring
integer1–1000
standard 200
Companies per page. Outside 1-1000 is 400 invalid_limit from contract 2026-10-20; it was clamped before.
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

POST

/watchlist

Watch companies. Adds up to 10 000 organisasjonsnumre per call; the plan decides the total (409 watch_limit_exceeded). Unknown numbers are kept and flagged. Sole proprietorships and other entries that are, or may be, a person are kept, flagged natural_person, and never alerted or billed. Only events detected after a company is added are delivered, plus the last 30 days when include_last_30_days is true.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.
event_types
innhold
array<object>—Omit for every type, now and later
include_last_30_days
innhold
boolean—
standard false
—
org_numbers
innhold · påkrevd
array<string>——

Svar og feilkoder

HTTPBetydningKoder i svaret
200added, updated, invalid, unknown, natural_person, watched, watch_limit, digest_events—
400—
401Missing or invalid key
402product_plan_required: the organization has no company_watch plan
403The grant does not include the company_watch endpoint, or the caller acts for no organization
409—
413—
422—
429—
500—
503—
DELETE

/watchlist

Stop watching companies.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.
org_numbers
innhold · påkrevd
array<string>——

Svar og feilkoder

GET

/watchlist/deliveries

Webhook and e-mail delivery status.

Parametere

NavnTypeGrenser og standardBeskrivelse
status
spørring
stringpending | sent | dead | cancelled—
limit
spørring
integer1–500
standard 50
Deliveries per page. Outside 1-500 is 400 invalid_limit from contract 2026-10-20; it was clamped before.
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

POST

/watchlist/deliveries/{delivery}/retry

Requeue a dead delivery.

Parametere

NavnTypeGrenser og standardBeskrivelse
delivery
sti · påkrevd
integer——
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

GET

/watchlist/events

Event feed for watched companies. Oldest first. Keep next_cursor and resume from it; since filters on when the event reached your watchlist.

Parametere

NavnTypeGrenser og standardBeskrivelse
since
spørring
stringdate-time—
cursor
spørring
string——
limit
spørring
integer1–1000
standard 100
Events per page. Outside 1-1000 is 400 invalid_limit from contract 2026-10-20; it was clamped before.
order
spørring
stringoldest | newest
standard oldest
newest returns the latest events, one page, for display; poll with the default
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

GET

/watchlist/settings

Delivery settings.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

PUT

/watchlist/settings

Change delivery settings. webhook_url must be https on port 443 or 8443 and resolve to public addresses only; an empty string removes it. email_mode is off, immediate or daily (07:00 Oslo). email_locale is nb or en.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.
email_locale
innhold
stringnb | en—
email_mode
innhold
stringoff | immediate | daily—
email_recipients
innhold
array<string>——
webhook_url
innhold
string——

Svar og feilkoder

HTTPBetydningKoder i svaret
200settings—
400—
401Missing or invalid key
402product_plan_required: the organization has no company_watch plan
403The grant does not include the company_watch endpoint, or the caller acts for no organization
413—
429—
500—
503—
GET

/watchlist/webhook/secret

Webhook signing secret: shown once, then metadata. The plaintext secret is returned by the first GET after the watchlist is created, and by every rotation; after that this returns only metadata (secret_hint, rotated_at, previous_secret_valid_until, secret_revealed). Lost it? POST rotates.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

POST

/watchlist/webhook/secret

Rotate the webhook signing secret. Returns the new secret, once. The previous secret keeps signing for 24 hours: Datakilde-Signature then reads t=<unix>,v1=<new>,v1=<previous>, and a receiver accepts the request if either v1 matches. After the window the header has a single v1.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

POST

/watchlist/webhook/test

Send a signed sample event to the webhook.

Parametere

NavnTypeGrenser og standardBeskrivelse
Datakilde-Version
header
stringdatePin a calendar date (YYYY-MM-DD), independently of the release channel. Absent means latest. A date between releases resolves to the newest contract on or before it; a date before the first resolves to the first, and a date after the latest resolves to the latest. Read Datakilde-Version on the response for the actual resolution. This does not select a historical source snapshot; only documented compatibility shims preserve older response behavior.
Datakilde-Channel
header
stringstable | preview
standard stable
Independent of Datakilde-Version. Omit for stable. Preview on customer data requires an explicit preview subscription grant; packages, test keys and date pins do not grant it. Ungranted preview is refused with preview_channel_not_granted (403), never silently downgraded. Public metadata remains stable.

Svar og feilkoder

Webhook

Varsler sendes som POST med Content-Type: application/json til adressen i innstillingene. Alle 2xx-svar er en vellykket levering. Levering skjer minst én gang: fjern duplikater på id. Omdirigeringer følges ikke, og adressen må være https på port 443 eller 8443 og peke til offentlige adresser.

Headere

HeaderInnhold
Datakilde-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" with the watchlist's secret>
Datakilde-TimestampThe same t as in the signature.
Datakilde-Event-IdThe payload's id. Delivery is at least once: deduplicate on it.

Nye forsøk

Et svar som ikke er 2xx, et tidsavbrudd eller en avvist tilkobling prøves igjen etter 1, 2, 4, 8, 16, 32, 64, 128 minutter. Etter 9 forsøk er leveransen død; den vises under /watchlist/deliveries?status=dead og kan sendes på nytt.

Hendelsestyper

company.bankruptcy, company.dissolution, company.announcement, company.registry_change, company.roles_change, company.accounts_filed, company.court_hearing

Kontroller signaturen

Regn ut signaturen på de rå bytene, før JSON tolkes, med hemmeligheten fra /watchlist/webhook/secret. POST /watchlist/webhook/test sender et signert eksempel.

import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p)
    t, v1 = parts.get("t", ""), parts.get("v1", "")
    if not t.isdigit() or abs(time.time() - int(t)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, v1)
Eksempel på innhold

Innholdet testendepunktet sender, generert fra koden som sender det. test er true bare der.

{
  "created_at": "2026-10-01T09:15:02Z",
  "data": {
    "company_name": "EQUINOR ASA (TEST)",
    "detected_at": "2026-10-01T09:15:02Z",
    "event_id": 0,
    "id": "test",
    "occurred_on": "2026-10-01",
    "org_number": "923609016",
    "source": "brreg_announcements",
    "source_ref": "test",
    "source_url": "https://w2.brreg.no/kunngjoring/",
    "summary": {
      "category": "konkurs",
      "court": "OSLO TINGRETT",
      "register_type": "Konkursåpning (testhendelse)"
    },
    "type": "bankruptcy",
    "via": "live"
  },
  "id": "cw_test",
  "test": true,
  "type": "company.bankruptcy"
}

Adresseovervåking

Den samme webhooken og hemmeligheten varsler også om nye og endrede byggesaker og reguleringsplaner nær adresser dere overvåker, med typene address.building_case og address.zoning_plan. Adresseovervåking åpnes med tilgangen address_watch på det samme abonnementet. Hver overvåking oppgir dekningen den faktisk har, første kjøring er en grunnlinje uten varsler, og en leveranse prøves seks ganger før den gis opp og kan sendes på nytt.

Endepunktene under /api/v1/addresses/watchlist