---
title: "Norwegian business deadlines for a given calendar year"
method: GET
path: "/api/v1/public/deadlines"
tags: ["Public"]
---

# Norwegian business deadlines for a given calendar year

`GET /api/v1/public/deadlines`

## Request

- Base URL: `https://www.apier.no`
- URL: `https://www.apier.no/api/v1/public/deadlines`
- Auth: none required

Zero-auth, deterministic, cacheable public endpoint (distribution infrastructure). Returns the canonical list of universal Norwegian business deadlines for the requested `year`: the six MVA terminer, the twelve A-melding monthly deadlines, skattemelding for AS and ENK, årsregnskap for AS, and the Foretaksregisteret årsbekreftelse. The calendar is DATABASE-DRIVEN: the route fans out `getActiveRulesForEntity` across all five Norwegian entity types `[AS, ENK, ANS, DA, NUF]` (ANS/NUF have no seed rules today but participate in `applies_to_entity_types` when a cross-entity rule lists them; adding seed rules for those types later requires no code change), evaluates each rule set against a universal tier_2 context, expands the applicable obligations through the deadline engine over the requested year, and dedupes the results on (obligation_id, period) so cross-entity deadlines merge into a single row with a unioned `applies_to_entity_types`. The response is deterministic — same `(year, Rulebook version)` inputs produce byte-identical output — and `_meta.rulebook_version` / `_meta.data_freshness` carry the MAX `last_verified` across the rules that produced the calendar, giving CDN / client caches a single invalidation key.

Timezone semantics: every `deadline` and `adjusted_from` is an ISO 8601 string with an explicit `+01:00` (CET) or `+02:00` (CEST) offset derived dynamically from Europe/Oslo — never hardcoded. The offset applies to the ADJUSTED instant, not the pre-adjustment legal date, so a 31 May Sunday (+02:00 CEST) that pushes to 1 June Monday carries the +02:00 offset that applies on 1 June. `timezone` is always `"Europe/Oslo"` as the canonical reference.

Holiday semantics: the legal deadline is computed first (e.g. 10th of the month, 31 May, 31 July). If that date falls on a Saturday, Sunday, or a Norwegian public holiday — the five fixed (1. januar, 1. mai, 17. mai, 25. desember, 26. desember) plus the seven Easter-linked movable feasts (skjærtorsdag, langfredag, 1. and 2. påskedag, Kr. himmelfartsdag, 1. and 2. pinsedag, computed via the Meeus/Butcher Gregorian algorithm) — the deadline is pushed FORWARD day-by-day until the next business day. It is never pushed backward. The pre-adjustment legal deadline is preserved in `adjusted_from`; that field is `null` when no adjustment was needed.

Rate limiting: soft per-IP cap of 1000 requests per minute. Exceeding returns 429 with the standard `RateLimitExceeded` response.

## Query parameters

- `year` integer

## Response `200`

Ordered list of deadlines for the requested year. The `_meta` block reports `served_from: "live"` (every request hits Supabase) and carries `data_freshness` / `last_verified` equal to the MAX `last_verified` across the rules that produced the calendar — consumers can use that timestamp as a single CDN invalidation key.

- object
  - `success` true, required
  - `data` object, required
    - `year` integer, required
    - `deadlines` PublicDeadlineEntry[], required: Sorted ascending by `deadline`.
      - `obligation_id` string, required: Stable machine-readable identifier. Suitable for hashing or caching. Example: `mva-termin-1-2026`.
      - `obligation_name` string, required: Norwegian display name. Example: `MVA-melding, 1. termin 2026`.
      - `period` string, required: Human-readable period covered. Example: `Januar–februar 2026`.
      - `deadline` string, date-time, required: Effective deadline (already adjusted forward for weekends + Norwegian public holidays). ISO 8601 with an explicit Oslo offset.
      - `submission_window_closes` string, date-time, required: Last moment Altinn accepts a submission. Equal to `deadline` until we have evidence that the upstream grace window differs.
      - `timezone` string, required: Always `Europe/Oslo`. Agents that render in another zone should convert using this hint.
      - `adjusted_from` string, date-time, nullable, required: If the legal deadline was moved forward by a weekend or holiday, the pre-adjustment legal deadline (also ISO 8601 with Oslo offset). `null` when the legal deadline was already a business day.
      - `legal_reference` string, required: Lovdata-style legal reference the deadline derives from.
      - `applies_to_entity_types` string[], required: Norwegian entity-type codes this deadline applies to. A subset of [AS, ENK, ANS, DA, NUF].
  - `_meta` TrustMetadata, required: Metadata included in every response for trust and verifiability.
    - `rulebook_version` string, required: Current Rulebook version. Internal rule-version records carry structured origin metadata (`initial_seed` | `human_review` | `lovdata_drift_response` | `audit_finding` | `customer_question` | `legal_correction`) for operator forensics, but that attribution is deliberately NOT exposed on public responses to avoid leaking operational signal.
    - `data_freshness` string, date-time, required: When this data was last fetched (ISO 8601 UTC).
    - `last_verified` string, date-time, required: When this data was last verified against source (ISO 8601 UTC).
    - `source` string, required: Origin of this data. Defaults to `apier.no`. The agent-readiness probe (`GET /api/v1/health/agent-readiness`) is the one surface that may instead emit `apier.no telemetry` — it does so when at least one of its endpoint rates came from measured live telemetry, and falls back to `apier.no` when every rate is a static default; all other endpoints always emit `apier.no`.
    - `data_source` string: Authoritative origin of the underlying data (listed alongside rulebook_version, data_freshness, last_verified, legal_basis for Rulebook-influenced endpoints). Distinct from `source` (the response origin): `data_source` identifies the authoritative data publisher — e.g. 'Brønnøysund Enhetsregisteret + Apier Universal Rulebook'. Present on registry-backed endpoints.
    - `served_from` 'cache' | 'live' | 'static': Cache-aware endpoints only — 'cache' when the response was served from the local copy, 'live' when the gateway just refreshed from the upstream, 'static' when the payload was computed deterministically from pure code with no DB or upstream read (e.g. /v1/public/deadlines). Absent on endpoints that don't carry this semantic.
    - `stale` boolean: Cache-aware endpoints only — true when the upstream was unreachable and a within-limit cached row was served as a fallback. Absent on normal responses.
    - `schema_version` string, required: OpenAPI contract version at the time of the response; matches `info.version`. Always present on every `/v1/*` response so a future schema break can be traced to the exact rows / audit events that predate / postdate it. Agent-facing machine interfaces (v1/capabilities, workflows.json) may override with their own narrower surface version; all other endpoints inherit the manifest-level version.
    - `legal_basis` string: Legal basis under which the response data is reused. Present on Rulebook-influenced endpoints (v1/company/{org}/obligations, /v1/company/{org}/deadlines). Common value: 'NLOD — public registry reuse'.
    - `rule_count` integer: Rule-evaluation count — total rules evaluated for this request. Present on endpoints that invoke the Rulebook evaluator (v1/company/{org}/obligations).
    - `applicable_count` integer: Count of rules whose evaluation_result is 'applicable'. Present on evaluator endpoints.
    - `not_applicable_count` integer: Count of rules whose evaluation_result is 'not_applicable'. Present on evaluator endpoints.
    - `insufficient_data_count` integer: Count of rules whose evaluation_result is 'insufficient_data' (Tier 2 gated). Present on evaluator endpoints. rule_count = applicable_count + not_applicable_count + insufficient_data_count.
    - `cache_age_ms` integer, nullable: Cache layer: milliseconds since the cached row was computed, or null on a cache miss (served_from === 'live'). Agents use it alongside data_freshness as a staleness signal. Present on endpoints wired to the cache (v1/company/{org}/obligations, /deadlines, /summary, /v1/public/obligations, /v1/public/deadlines).
    - `response_time_ms` integer: Speed signal: total server-side processing time in milliseconds, measured via performance.now() at the route boundary. Mirrored on the `X-Apier-Response-Time-Ms` header so agents can key on it without parsing the body. Present on every endpoint.
    - `response_timestamp` string, date-time: RFC 3339 / ISO 8601 UTC timestamp stamped by the response builder at wire-exit. Mirrored on the `provenance_log.response_timestamp` column by a fire-and-forget writer. Distinct from `data_freshness` (when upstream data was fetched) and `last_verified` (when the citation was verified); this is the moment the envelope left the server. Always populated at runtime — deliberately left out of the `required` list to avoid a cascading contract change that would invalidate every pre-existing example envelope in this spec (append-only response contracts). A future revision may promote it into the `required` list alongside a bulk example refresh.
    - `response_hash` string: SHA-256 hash of the canonical-JSON form of the envelope with `_meta` stripped before hashing, prefixed with `sha256:`. Mirrored on `provenance_log.response_hash` so a consumer can independently re-hash the bytes they received and compare against what we persisted (integrity receipt). Stripping `_meta` is load-bearing: volatile fields (response_time_ms, cache_age_ms, served_from) and the hash itself would otherwise feed into the digest and break the cache-hit-bytewise-identical invariant.
    - `source_snapshot_id` string: Optional free-text pointer into an upstream sync snapshot the response derives from — e.g. a Brreg sync's `brreg-<ISO>` snapshot id. Absent when the response is not tied to a specific upstream snapshot (capabilities, tools, static deadlines).
    - `is_sandbox` true: Present and `true` only when the response was generated from sandbox fixture data (currently `ALTINN_MODE=sandbox` on `/api/v1/altinn/list-acting-capacity`). Absent (NOT `false`) on every other response — the absent-vs-false distinction is deliberate so downstream agents branching on `if (response._meta.is_sandbox)` cannot be misled into treating non-sandbox responses as positively-confirmed-not-sandbox. Distinct from the `/v1/sandbox/*` `is_sandbox: true` literal in `SandboxMeta` (which carries the sandbox surface tag); this flag rides through the production `/api/v1/altinn/*` surface to forensically tag a sandbox-mode response that an OEM evaluator received.
    - `cost_nok` number: What this call debited from the caller's prepaid credit balance, in NOK, rendered from the integer-øre ledger (50 øre → 0.5; the ledger itself never leaves whole øre and no float arithmetic touches a balance). Present on the 2xx body of every metered company-data read — the same debit that sets the `X-Credits-Cost-Ore` header, so the two never disagree. `0` when nothing was charged: credit enforcement running dark (the response then also carries `X-Credit-Check: shadow`) or the sandbox surface. Absent on unmetered endpoints and on error envelopes — a refunded 5xx/403/404 claims no cost rather than a wrong one. Lives under `_meta`, which `response_hash` excludes, so the provenance receipt is unaffected; the route's ETag is computed before the credit wrapper stamps it, so a conditional request can still short-circuit to 304. Append-only addition.
    - `wallet_remaining_nok` number, nullable: The prepaid credit balance remaining AFTER this call's debit, in NOK (same rendering as `cost_nok`; mirrors the `X-Credits-Balance-Ore` header). `null` when no balance was read: credit enforcement running dark, or the sandbox surface. Present wherever `cost_nok` is. An agent planning a sequence of metered calls can divide this by the per-call price from GET /api/v1/pricing to know how many reads remain before a 402 INSUFFICIENT_CREDITS. Append-only addition.
    - `spend_cap_remaining_nok` number: What the calling key may still spend under its tighter spend cap (Europe/Oslo calendar day or month) AFTER this call's debit, in NOK (same rendering as `cost_nok`; never below 0). Present on the 2xx body of a metered read only when credit enforcement is live AND the key has a daily or monthly cap (set with PATCH /api/v1/account/keys/{id}); absent otherwise. When it reaches 0 the next metered call on this key returns 402 SPEND_CAP_REACHED until the cap resets. Append-only addition.

## Other responses

- `400`: Year parameter out of range (2020–2100) or not an integer.
- `429`: Per-minute rate limit reached for this (IP, endpoint) bucket on a zero-auth public endpoint. The `Retry-After` header indicates how many seconds to wait before the window resets. Public endpoints share a single soft-cap of 1000 requests per minute PER IP — there is no tier scaling, because callers aren't authenticated. Every allowed response also carries the standard `X-RateLimit-*` headers. On rare infrastructure-side failures the gateway fails OPEN and passes the request through with `X-RateLimit-Check: skipped`.
- `500`: Two failure classes share this status, distinguished by `error_code`: `INTERNAL_ERROR` (`retryable: false`) for non-transient rulebook faults — a rule row failing validation, or the store answering with a query-level error such as a permissions or schema fault — where retrying reproduces the identical failure, so do not loop; the fix is a correction on Apier's side — and the generic `SERVER_ERROR` fallback (`retryable: true`, worth one retry) for any unclassified failure. Internal details never leak in the response body; the cause is captured to Sentry server-side.
- `503`: The Rulebook store was unreachable when the rule set was loaded, or a published entity type (AS/ENK/DA) came back with zero active rules — both signal a transient backend outage, never a problem with the request. `UPSTREAM_UNAVAILABLE` carries `retryable: true`: retry the identical call after a short backoff. Classification added after an audit finding where a store-level outage surfaced as an undifferentiated 500 on this zero-auth surface.

---

[API](https://skmtc.dev/apier/apis/apier-no-api.md) · [All operations](https://skmtc.dev/apier/apis/apier-no-api/llms.txt) · [OpenAPI document](https://skmtc.dev/apier/apis/apier-no-api/revisions/9ec19bc87311?raw)
