Skip to content
Apier

For platforms · Annual Accounts Monitor

Webhook-klar accounts.updated-overvåkingWebhook-ready accounts.updated monitoring

The job

Du vil at plattformen din skal trigge arbeid i det øyeblikket en klient leverer nytt årsregnskap — uten å polle hver dag.

You want your platform to trigger work the moment a client files new annual accounts — without polling every day.

Endpoint

  • POST /api/v1/subscriptions

Request

curl -X POST https://www.apier.no/api/v1/subscriptions \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"webhook_url":"https://example.com/hooks/apier","filter":{"source":"brreg","entity_type":"annual_accounts"}}'

Delivered webhook payload (POST to your endpoint)

{
  "subscription_id": "3f1a0c4e-0000-4000-8000-000000000001",
  "delivered_at": "2026-06-15T10:00:03Z",
  "attempt_number": 1,
  "correlation_id": "8c2d6b7a-0000-4000-8000-000000000002",
  "change": {
    "id": "a17b9d3c-0000-4000-8000-000000000003",
    "source": "brreg",
    "entity_type": "annual_accounts",
    "entity_id": "999999999",
    "change_type": "updated",
    "field_path": "/last_accounts_year",
    "before_value": {
      "last_accounts_year": 2023
    },
    "after_value": {
      "last_accounts_year": 2024
    },
    "detected_at": "2026-06-15T10:00:02Z"
  }
}

Apier POSTer dette til webhook_url-en din med en HMAC-SHA256-signatur i x-apier-signature. Leveringen er minst-én-gang: gjør mottakeren idempotent ved å nøkle sideeffekter på change.id.

Apier POSTs this to your webhook_url with an HMAC-SHA256 signature in x-apier-signature. Delivery is at-least-once: make your receiver idempotent by keying side effects on change.id.

Next steps

  • Verifiser signaturen før du stoler på en levering (se Webhooks-guiden for kodeeksempel). Verify the signature before trusting a delivery (see the Webhooks guide for a code sample).
  • Les den gjeldende statusen når som helst med GET /api/v1/company/{org}/accounts. Read the current state any time with GET /api/v1/company/{org}/accounts.