Hopp til innhold

Denne siden finnes foreløpig bare på engelsk. Innholdet nedenfor vises derfor på engelsk.

Apier.no

Examples

Copy-paste API calls bucketed into the four workflows AI agents run against Norwegian regulatory infrastructure. Every request hits a merged endpoint documented at /openapi.json; every response matches the live shape. For the agent-first discovery manifest see /api/v1/capabilities.

Read

Fetch regulatory facts and company data. Two free zero-auth surfaces and one Tier 1 company read.

List universal obligations for an entity type

Fetch the canonical obligation template set for a Norwegian entity type. Zero-auth, no signup.

Request
curl https://www.apier.no/api/v1/public/obligations?entity_type=AS
Response
{
  "success": true,
  "data": {
    "entity_type": "AS",
    "obligations": [
      {
        "obligation_id": "mva-registration",
        "obligation_name": "Registrering i Merverdiavgiftsregisteret",
        "category": "registration",
        "frequency": "one-time",
        "required": "conditionally",
        "condition": "Påkrevd når samlet omsetning overstiger 50 000 NOK i en 12-måneders periode.",
        "tier_2_required": true,
        "legal_reference": "Merverdiavgiftsloven § 2-1",
        "source_url": "https://lovdata.no/lov/2009-06-19-58/%C2%A72-1"
      },
      {
        "obligation_id": "skattemelding-annual",
        "obligation_name": "Skattemelding for formues- og inntektsskatt",
        "category": "tax",
        "frequency": "annual",
        "required": "always",
        "condition": null,
        "tier_2_required": false,
        "legal_reference": "Skatteforvaltningsloven § 8-2",
        "source_url": "https://lovdata.no/lov/2016-05-27-14/%C2%A78-2"
      }
    ],
    "notes": []
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-21T00:00:00.000Z",
    "last_verified": "2026-04-21T00:00:00.000Z",
    "source": "apier.no",
    "data_source": "Apier Universal Rulebook",
    "legal_basis": "NLOD — public registry reuse",
    "schema_version": "1.0.0"
  }
}

Get the rolling Norwegian deadline calendar

Retrieve every universal Norwegian business deadline for a calendar year, already adjusted for weekends and holidays.

Request
curl https://www.apier.no/api/v1/public/deadlines?year=2026
Response
{
  "success": true,
  "data": {
    "year": 2026,
    "deadlines": [
      {
        "obligation_id": "mva-termin-1-2026",
        "obligation_name": "MVA-melding, 1. termin 2026",
        "period": "Januar–februar 2026",
        "deadline": "2026-04-10T23:59:59+02:00",
        "submission_window_closes": "2026-04-10T23:59:59+02:00",
        "timezone": "Europe/Oslo",
        "adjusted_from": null,
        "legal_reference": "Skatteforvaltningsloven § 8-3",
        "applies_to_entity_types": ["AS", "ENK", "DA"]
      },
      {
        "obligation_id": "amelding-2026-05",
        "obligation_name": "A-melding — mai 2026",
        "period": "Mai 2026",
        "deadline": "2026-06-05T23:59:59+02:00",
        "submission_window_closes": "2026-06-05T23:59:59+02:00",
        "timezone": "Europe/Oslo",
        "adjusted_from": null,
        "legal_reference": "A-opplysningsloven § 3",
        "applies_to_entity_types": ["AS", "ENK", "DA"]
      }
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-21T00:00:00.000Z",
    "last_verified": "2026-04-21T00:00:00.000Z",
    "source": "apier.no",
    "data_source": "Apier Universal Rulebook",
    "legal_basis": "NLOD — public registry reuse",
    "schema_version": "1.0.0"
  }
}

Read a company context (Tier 1)

Fetch Brønnøysund registry data for a Norwegian org. Tier 2 commercial metrics are not served. Requires an API key.

Request
curl -H 'Authorization: Bearer <API_KEY>' \
  https://www.apier.no/api/v1/company/{org}/context
Response
{
  "success": true,
  "data": {
    "org_number": "999999999",
    "name": "Synthetic Test AS",
    "entity_type": "AS",
    "status": "ACTIVE",
    "registration_date": "2019-08-14",
    "municipality": "Oslo",
    "data_tier": "tier_1",
    "tier_2_note": "Tier 2-felter (ansatte, omsetning, balansesum) leveres ikke: Altinn-delegeringsporten er trukket tilbake (2026-10-21).",
    "upgrade_path": null
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-23T06:00:00.000Z",
    "last_verified": "2026-04-23T06:00:00.000Z",
    "source": "apier.no",
    "data_source": "Brønnøysund Enhetsregisteret",
    "legal_basis": "NLOD — public registry reuse",
    "served_from": "cache",
    "cache_age_ms": 1840,
    "response_time_ms": 42,
    "schema_version": "1.0.0"
  }
}

Validation

Verify state before you act: Altinn migration paths, authoritative exchange rates, and what a withdrawn route answers.

Withdrawn route: the 410 CAPABILITY_WITHDRAWN envelope

Withdrawn 2026-10-21: every call answers HTTP 410 CAPABILITY_WITHDRAWN before authentication. Branch on error_code and stop.

Request
curl -H 'Authorization: Bearer <API_KEY>' \
  https://www.apier.no/api/v1/auth/permissions/{org}
Response
{
  "success": false,
  "error_code": "CAPABILITY_WITHDRAWN",
  "retryable": false,
  "explanation": {
    "summary": "Denne funksjonen er trukket tilbake og tilbys ikke av Apier.",
    "summary_en": "This capability is withdrawn and is not offered by Apier.",
    "fix_steps_en": [
      "Do not retry the call: the answer is final for this surface.",
      "For the register's coded signing rules for a Norwegian company: use GET /api/v1/company/<org_number>/authority (signaturrett and prokura from Brønnøysund) or the MCP tool get_company_authority.",
      "See /docs/changelog for which surfaces are withdrawn and what replaces them."
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-23T06:00:00.000Z",
    "last_verified": "2026-04-23T06:00:00.000Z",
    "source": "apier.no",
    "schema_version": "1.0.0"
  }
}

Resolve an Altinn 2 code to its Altinn 3 replacement

Look up the Altinn 3 replacement for a legacy Altinn 2 code; the 19 June 2026 deadline has passed.

Request
curl https://www.apier.no/api/v1/tools/altinn-migration?altinn2_code=A0208
Response
{
  "success": true,
  "data": {
    "deprecation_deadline": "2026-06-19T23:59:59+02:00",
    "timezone": "Europe/Oslo",
    "days_remaining": 0,
    "deadline_passed": true,
    "entry": {
      "altinn2_code": "A0208",
      "altinn2_name_nb": "Merverdiavgiftsmelding",
      "altinn3_code": "skd/mva-melding-innsending-v1",
      "altinn3_name_nb": "MVA-melding innsending (Altinn 3-app)",
      "redirect_url": null,
      "service_owner": "Skatteetaten",
      "migration_notes_nb": "MVA-meldingen sendes via Altinn 3-appen skd/mva-melding-innsending-v1 på https://skd.apps.altinn.no. Skatteetaten tilbyr en valideringstjeneste før innsending. Virksomheten leverer selv med egne legitimasjoner; Apier leverer ingen MVA-melding.",
      "migration_notes_en": "The VAT return is submitted via the Altinn 3 app skd/mva-melding-innsending-v1 at https://skd.apps.altinn.no. Skatteetaten offers a validation service before submission. The company files it with its own credentials; Apier submits no VAT return.",
      "verified": true
    }
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-05-26T00:00:00.000Z",
    "last_verified": "2026-11-07T06:07:20.781Z",
    "source": "DigDir",
    "schema_version": "1.0.0",
    "served_from": "static"
  }
}

Fetch an official Norges Bank NOK rate

Pull the authoritative NOK exchange rate for a date before converting invoice totals for filing.

Request
curl 'https://www.apier.no/api/v1/tools/exchange-rate?currency=EUR&date=2026-04-10'
Response
{
  "success": true,
  "data": {
    "base": "NOK",
    "quote": "EUR",
    "rate": 11.5234,
    "date": "2026-04-10",
    "requested_date": "2026-04-10",
    "source": "Norges Bank",
    "cached": false
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-10T00:00:00.000Z",
    "last_verified": "2026-04-10T16:00:00.000Z",
    "source": "apier.no",
    "served_from": "live",
    "schema_version": "1.0.0"
  }
}

Execution

Perform actions that mutate state. All write calls support Idempotency-Key; high-risk actions also require X-Approval-Token.

Withdrawn write route: a POST answers 410 too

Withdrawn 2026-10-21 with the fullmakt line: a POST answers HTTP 410 CAPABILITY_WITHDRAWN before the body is read.

Request
curl -X POST https://www.apier.no/api/v1/auth/system-user/delegate \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000' \
  -d '{"org_number":"999999999","scopes":["altinn:accessmanagement/authorizedparties.read"],"validity_days":365,"label":"Docs demo"}'
Response
{
  "success": false,
  "error_code": "CAPABILITY_WITHDRAWN",
  "retryable": false,
  "explanation": {
    "summary": "Denne funksjonen er trukket tilbake og tilbys ikke av Apier.",
    "summary_en": "This capability is withdrawn and is not offered by Apier.",
    "why_en": "Apier does not use Altinn Autorisasjon data (rights, access packages, delegations or fullmakt state) in any customer-facing feature, and makes no Altinn call on this surface. A retry returns the same answer."
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-23T06:00:00.000Z",
    "last_verified": "2026-04-23T06:00:00.000Z",
    "source": "apier.no",
    "schema_version": "1.0.0"
  }
}

Mint a single-use approval token

Mint a short-lived token after a human confirms a high-risk action. Present it in X-Approval-Token on the next write.

Request
curl -X POST https://www.apier.no/api/v1/auth/approval-token \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"org_number":"999999999","action_id":"filing.submit","expires_in_seconds":300}'
Response
{
  "success": true,
  "data": {
    "approval_token": "R7kP3oN5qW8eZy2_aXvBcM6jL1hG4nT0sFuEiQrD9Yk",
    "expires_at": "2026-04-23T06:05:00.000Z",
    "action_id": "filing.submit",
    "org_number": "999999999",
    "expires_in_seconds": 300
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-23T06:00:00.000Z",
    "last_verified": "2026-04-23T06:00:00.000Z",
    "source": "apier.no",
    "schema_version": "1.0.0"
  }
}

Revoke an API key (operator)

Soft-revoke a leaked or rotated key. Requires ADMIN_API_KEY; the action is written to the append-only audit log.

Request
curl -X DELETE https://www.apier.no/api/v1/admin/keys/11111111-2222-3333-4444-555555555555 \
  -H 'Authorization: Bearer <ADMIN_API_KEY>'
Response
{
  "success": true,
  "data": {
    "id": "11111111-2222-3333-4444-555555555555",
    "is_revoked": true,
    "revoked_at": "2026-04-23T06:00:00.000Z"
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-23T06:00:00.000Z",
    "last_verified": "2026-04-23T06:00:00.000Z",
    "source": "apier.no",
    "schema_version": "1.0.0"
  }
}

Audit

Inspect what the API can do and verify result provenance. Every response carries a _meta trust envelope.

Discover every callable capability

Machine-readable manifest that lists every endpoint with its auth, tier, and OpenAPI operation id.

Request
curl https://www.apier.no/api/v1/capabilities
Response
{
  "success": true,
  "data": {
    "service": "apier.no",
    "version": "1",
    "rulebook_version": "1.0.0",
    "locale": "nb-NO",
    "capabilities": [
      {
        "id": "public.obligations",
        "name_en": "Generic obligations by Norwegian entity type",
        "endpoint": { "method": "GET", "path": "/api/v1/public/obligations" },
        "auth": "none",
        "tier_minimum": null,
        "category": "public-tool",
        "openapi_operation_id": "getPublicObligations",
        "example_request": "GET /api/v1/public/obligations?entity_type=AS",
        "data_sources": ["internal-static"],
        "freshness": "static"
      },
      {
        "id": "auth.permissions",
        "name_en": "Withdrawn (2026-10-21): delegation status check",
        "endpoint": { "method": "GET", "path": "/api/v1/auth/permissions/{org}" },
        "auth": "api_key",
        "tier_minimum": "free",
        "category": "auth",
        "openapi_operation_id": "getPermissionState",
        "example_request": "curl -H 'Authorization: Bearer <API_KEY>' https://www.apier.no/api/v1/auth/permissions/999999999",
        "data_sources": ["altinn", "internal-supabase"],
        "freshness": "live"
      }
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-20T00:00:00.000Z",
    "last_verified": "2026-04-20T00:00:00.000Z",
    "source": "apier.no",
    "schema_version": "1.0.0"
  }
}

Compare Apier against direct integration

Qualitative build-vs-buy matrix with methodology and source stated on the wire; quantitative claims omitted until live telemetry exists.

Request
curl https://www.apier.no/api/v1/comparison/direct-integration
Response
{
  "success": true,
  "data": {
    "dimensions": [
      {
        "dimension": "authentication",
        "apier": "Consumers authenticate with an API key over HTTPS. Apier reads open Brønnøysund registry data with its own credentials and brokers no government access on a consumer's behalf.",
        "direct_integration": "The integrator registers their own Maskinporten client, manages an asymmetric key pair, and implements the signed-JWT token exchange for each government scope they need."
      },
      {
        "dimension": "delegation_and_authority",
        "apier": "Registered signature and prokura roles from the Brønnøysund registers are exposed through normalised endpoints with a single response envelope. Altinn delegation state is not read or served (withdrawn 2026-10-21).",
        "direct_integration": "The integrator queries the Brønnøysund role registers themselves and, where their own integration needs Altinn rights, manages those with their own Altinn credentials."
      },
      {
        "dimension": "audit_trail",
        "apier": "API activity is recorded in an append-only audit log, and every response carries provenance metadata (response hash and wire timestamp) for later reconstruction.",
        "direct_integration": "Consumer-side audit logging is the integrator's responsibility; the government APIs do not provide one on the caller's behalf."
      },
      {
        "dimension": "legal_grounding",
        "apier": "Obligation and deadline answers are produced by a versioned rulebook whose rules carry references to the underlying regulations, and responses state which rulebook version produced them.",
        "direct_integration": "The integrator maps regulations to API behaviour themselves and tracks regulatory changes on their own."
      },
      {
        "dimension": "error_handling",
        "apier": "Upstream errors are normalised to one structured error format with machine-readable codes, an explanation, and remediation steps.",
        "direct_integration": "Each government API surfaces its own error format; the integrator implements per-API error mapping and retry handling."
      },
      {
        "dimension": "deadline_intelligence",
        "apier": "Regulatory deadlines are computed in Europe/Oslo time with weekend and Norwegian public-holiday adjustment, versioned by the rulebook.",
        "direct_integration": "Deadline rules must be implemented and maintained by the integrator from the published regulations; the government APIs do not compute them."
      },
      {
        "dimension": "cross_agency_orchestration",
        "apier": "One API surface spans Brønnøysund, Altinn, Skatteetaten, and NAV data behind a common envelope and a single authentication model.",
        "direct_integration": "Each agency is a separate integration with its own authentication, schemas, and lifecycle."
      },
      {
        "dimension": "maintenance_burden",
        "apier": "Upstream schema and policy changes are monitored by Apier and surfaced through an append-only change archive; the consumer response contract is append-only.",
        "direct_integration": "The integrator monitors each agency's changelogs and migration timelines (for example the Altinn 2 to Altinn 3 transition) and updates their integration accordingly."
      },
      {
        "dimension": "time_to_first_call",
        "apier": "Public endpoints and a zero-auth sandbox work without any government onboarding; company-data endpoints require an API key only.",
        "direct_integration": "A first production call requires Maskinporten client registration plus the relevant government scope or delegation grants before any data is returned."
      }
    ],
    "methodology": "Qualitative comparison based on Apier product documentation and the publicly documented integration requirements for the Norwegian government APIs (Maskinporten, Altinn, Brønnøysund Register Centre, Skatteetaten). Quantitative performance claims (success rates, latency) are intentionally omitted until they can be backed by measured live telemetry.",
    "source": [
      "Apier product documentation and OpenAPI specification",
      "Public Norwegian government integration documentation (Digdir/Maskinporten, Altinn, Brønnøysund Register Centre, Skatteetaten)"
    ],
    "last_updated": "2026-10-21T00:00:00.000Z"
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-10-21T00:00:00.000Z",
    "last_verified": "2026-10-21T00:00:00.000Z",
    "source": "apier.no internal comparison",
    "served_from": "static",
    "schema_version": "2.0.0"
  }
}

Inspect the canonical agent workflows

One entry per canonical workflow, with intent, steps, and failure modes. Mirrored for humans on /recipes.

Request
curl https://www.apier.no/workflows.json
Response
{
  "schema_version": "1.0.0",
  "workflows": [
    {
      "id": "get-company-obligations",
      "name_en": "Get Company Obligations",
      "name_nb": "Hent selskapets plikter",
      "intent": "List the regulatory obligations that apply to a Norwegian company.",
      "trigger_intent_en": "What does this company have to do legally?",
      "expected_outcome": "An obligations array with applicable/not_applicable/insufficient_data verdicts.",
      "estimated_time_ms": 350,
      "requires_auth": true,
      "tier_minimum": "free",
      "failure_modes": ["VALIDATION_FAILED", "NOT_FOUND", "UPSTREAM_UNAVAILABLE"],
      "steps": [
        {
          "step": 1,
          "capability_id": "company.context",
          "purpose": "Read the company's Tier 1 data.",
          "expected_response": "data.data_tier = tier_1|tier_2"
        },
        {
          "step": 2,
          "capability_id": "company.obligations",
          "purpose": "Evaluate the Rulebook against the company context.",
          "expected_response": "data.obligations[]"
        }
      ],
      "agent_instructions": "Call step 1 first. If data_tier = tier_1 and step 2 returns insufficient_data for a rule, surface upgrade_path to the user."
    }
  ]
}