Company filing history (Altinn) + Apier audit trail
get_company_filing_historyReconcile a Norwegian organisation's Altinn 3 filing history against filings submitted via Apier, returning each filing paired with its Apier audit record to verify which were filed through you.
Instructions
Reconcile a Norwegian company's Altinn 3 filing history against the filings YOUR consumer submitted through Apier. Given a 9-digit organisasjonsnummer it returns the org's Altinn filing instances (Mva-melding, A-melding, Skattemelding, …), each paired with its Apier audit record where one exists (filed_via_apier + apier_record). Cursor-paginated via { cursor } (pass back pagination.next_cursor) + { limit } (1–100, default 20); legacy { offset } still accepted (deprecated); no filings → 200 with an empty list, never a 404. MOCK-GATED until the altinn:instances.read Maskinporten scope is approved. Failure modes: SCOPE_INSUFFICIENT (needs read:altinn), AUTH_NO_DELEGATION (live mode), VALIDATION_FAILED. For upcoming deadlines rather than past filings, use get_company_deadlines instead. No API key? Bearer apier_sandbox_test_ (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/audit-inspection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size 1–100 (route default 20). | |
| cursor | No | Opaque continuation token from the previous page's `pagination.next_cursor` - the canonical way to page. | |
| offset | No | Zero-based offset (deprecated - use `cursor` instead). | |
| org_number | Yes | 9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | ||
| result | Yes | The paired filing history: `data[]` Altinn instances (form code, title, agency, submitted_at, status, instance id) each with `filed_via_apier` + `apier_record` when Apier submitted it, plus a `pagination` block. No filings → empty `data[]`, not an error. | |
| metadata | Yes | ||
| justification | Yes |