Hopp til innhold

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

Apier.no

Sandbox

A permanent, no-signup test surface that mirrors the production request and response shapes against deterministic synthetic data, and never calls a government system. Use it to rehearse the full authenticated flow, including failures, before you go live. There are two ways in.

How to use the sandbox

1 · Public, zero-auth

The public mirror (/api/v1/sandbox/public/*) needs no key at all and serves org 999999999. Best for a first look at the response shapes.

2 · No-signup synthetic bearer

Pass Authorization: Bearer apier_sandbox_test_<uuid> to reach the eight non-public routes and the richer fixtures. The <uuid> suffix is your private, isolated session namespace; generate a fresh one per agent or run. Mock filings persist under your suffix for 15 minutes: the next read of /audit, /obligations or /summary with the same suffix and organization shows the Pending→Filed transition, marked _meta.session_merged: true.

Sandbox handler responses (success and simulated failure) are tagged _meta.is_sandbox: true, and so is the missing-auth 401 (whose fix_steps name the synthetic bearer); other pre-handler rejections (e.g. an invalid real key) may omit it. You can shape behaviour with deterministic knobs (?simulate_error= for the eight failure modes, ?simulate_latency= to pause a response, and ?mock_date= to pin the clock) and force filing outcomes with magic payload values. Every synthetic org, token, knob, and magic value lives in the fixtures reference.

Magic state fixtures

Eleven reserved org numbers, each one deterministically returning a single documented company state on the authenticated read surface, the regulatory edge cases an agent must learn to handle. Pass the no-signup synthetic bearer and hit /api/v1/sandbox/company/<org>/verify (or /authority, /obligations). This table is generated from the same source as GET /api/v1/sandbox/fixtures.

Magic state fixtures
Org numberStateEntity/verify/authorityMVAObligations
999660010Bankrupt (konkurs)ASfailsoleyesnone (company is bankrupt)
999660029Struck from register (slettet)ASfailsolenonone (company is deleted)
999660037Forced liquidation (tvangsavvikling)ASfailsoleyesnone (company is in forced liquidation)
999660045No registered rolesASunknownno_authorityyesMVA-melding (bimonthly)
999660053Not VAT-registeredASpasssolenonone (not MVA-registered)
999660061Enkeltpersonforetak (ENK)ENKpasssolenoSkattemelding for næringsdrivende (annual)
999660088Aksjeselskap (AS)ASpasssoleyesMVA-melding (bimonthly)
999660096Registered <30 days agoASpasssoleyesMVA-melding (bimonthly)
999660118Joint signing authorityASpassjointyesMVA-melding (bimonthly)
999660126Prokura-only authorityASpassprokura_onlyyesMVA-melding (bimonthly)
999660134Slow response (by org number)ASpasssoleyesMVA-melding (bimonthly)

Live-surface synthetic org numbers

These are not sandbox fixtures; they are safe synthetic org numbers for the live production surface (real API key required), for when you need a test org outside the sandbox. The 999xxxxxxx range is reserved for synthetic testing and 123456789 is the docs-standard mock used across the OpenAPI manifest and capability examples. For sandbox calls, use the magic-state fixtures above; the full catalogue (reserved test orgs, the realistic graph, reserved error orgs, and more) lives in the fixtures reference.

Live-surface synthetic org numbers
Org numberNameEntityData tierScenario
999111114Synthetic AS with Tier 2 fixture dataAStier_1+2AS with Tier 2 fixture data
999222226Synthetic ENK Sole ProprietorENKtier_1ENK sole proprietor, no employees
999333338Synthetic DA PartnershipDAtier_1DA partnership (delt ansvar)
123456789Docs-standard mock orgNUFtier_1NUF (foreign branch)
999444008Sandbox unknown-org placeholderAStier_1sandbox-unknown-org
999770002Brattfjell Bygg og Anlegg ASAStier_1Bankruptcy in progress
999770010Solnedgang Handel ASAStier_1Voluntary liquidation (under avvikling)
999770029Fjordkanten Kafé ASAStier_1VAT deregistered (was registered)
999770037Nordvik SnekkerserviceENKtier_1ENK sole proprietor, zero employees
999770045Tvillingfjell Eiendomsinvest ASAStier_1Disputed / ambiguous signatur
999770053Gråsteinen Holding ASAStier_1Degraded / missing registry data
999770061Vestkyst Distribusjon ASAStier_1Absorbed by merger
999770088Vestkyst Logistikk ASAStier_1+2Recently merged and renamed
999770096Balticum Bygg Norge NUFNUFtier_1Foreign-owned branch (NUF)
999770118Knoppskyting Teknologi ASAStier_1Newly registered, no filing history
999770126Hvilende Fjelleiendom ASAStier_1Dormant but still registered

Named scenarios

Map a plain-language intent (“company under bankruptcy”, “prokura only”, “missed VAT deadline”) to a one-call recipe. Each scenario composes the magic-state orgs, deterministic knobs, and magic VAT values above into a copy-paste cURL plus the outcome to expect. Read scenarios use the no-signup synthetic bearer. The write scenarios rehearse a withdrawn flow against fixtures: they mint a deterministic sandbox approval token first, nothing reaches a government system, and the production write path they mirror answers 410 CAPABILITY_WITHDRAWN since 2026-10-21.

Company under bankruptcy

read

A limited company has gone bankrupt (konkurs) and I must detect it before I rely on it as a counterparty.

GET /api/v1/sandbox/company/{org}/verify

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660010/verify"

Expect verdict fail — status INACTIVE, the not_bankrupt signal is false. No live obligations.

Company struck from the register

read

A company has been struck from Enhetsregisteret (slettet) with no distress flags, and I need to tell it apart from a bankruptcy.

GET /api/v1/sandbox/company/{org}/verify

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660029/verify"

Expect verdict fail purely on inactive status — the konkurs / tvangsavvikling flags stay clean.

Company in forced liquidation

read

A company is under forced liquidation (tvangsavvikling) and I must not treat it as operational.

GET /api/v1/sandbox/company/{org}/verify

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660037/verify"

Expect verdict fail — status INACTIVE, the not_forcibly_dissolved signal is false.

No registered signing authority

read

An active company shows neither signaturrett nor prokura in the role data, so I cannot see who can bind it.

GET /api/v1/sandbox/company/{org}/authority

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660045/authority"

Expect classification no_authority; GET /verify returns unknown (active, but no signing authority visible in the role data).

Company outside the VAT register

read

A company is not in the VAT register, and I need to know it carries no MVA-melding obligation.

GET /api/v1/sandbox/company/{org}/obligations

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660053/obligations"

Expect no MVA-melding obligation (mva_registered: false) — do not attempt a VAT filing.

Sole proprietorship (ENK)

read

I need the obligation profile of an enkeltpersonforetak rather than a limited company.

GET /api/v1/sandbox/company/{org}/summary

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660061/summary"

Expect organisasjonsform ENK, innehaver signs alone; carries the næringsdrivende skattemelding, not the MVA / employer duties.

Ordinary limited company (AS)

read

I want the healthy-AS baseline to compare the edge cases against.

GET /api/v1/sandbox/company/{org}/summary

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660088/summary"

Expect organisasjonsform AS, daglig leder signs alone, MVA-registered with a bimonthly MVA-melding.

Company registered under 30 days ago

read

A company was registered very recently and has not yet filed annual accounts.

GET /api/v1/sandbox/company/{org}/context

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660096/context"

Expect registration_date is computed per request as (Europe/Oslo today − 14 days), so the company is always under 30 days old.

Joint signing authority

read

A company's signing rule is joint — two roles must sign together — and a single-signer assumption would attempt an unauthorised filing.

GET /api/v1/sandbox/company/{org}/authority

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660118/authority"

Expect classification joint — daglig leder and styrets leder must sign together.

Prokura-only authority

read

A company has no signaturrett but a registered prokura, so an authority check that reads only signaturrett would miss that it can still be bound.

GET /api/v1/sandbox/company/{org}/authority

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660126/authority"

Expect classification prokura_only; GET /verify still passes (signing authority IS defined, via prokura).

Deterministically slow response

read

I need to rehearse my own timeout / retry / backoff handling against a slow upstream.

GET /api/v1/sandbox/company/{org}/verify

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660134/verify"

Expect a fixed 2000 ms delay on every read, keyed on the org number alone — no header or test-key needed. The payload is a normal passing AS.

Simulated upstream timeout

read

I want to see what a government-side timeout looks like on the wire so I can parse it defensively.

GET /api/v1/sandbox/company/{org}/verify

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660088/verify?simulate_error=altinn_timeout"

Expect 504 with a deterministic Altinn-3-shaped upstream envelope (marked SANDBOX_SIMULATED_UPSTREAM_FAILURE).

Time-travel the compliance clock

read

I want to see how the deadline calendar reads at a specific future date without waiting for it.

GET /api/v1/sandbox/company/{org}/deadlines

Recipe
curl -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" "https://www.apier.no/api/v1/sandbox/company/999660088/deadlines?as_of=2027-05-11"

Expect each deadline's temporal status re-derived against the pinned Europe/Oslo date: the 2027-05-10 MVA deadline reads overdue on 2027-05-11 — move as_of earlier to see it upcoming. The deadline DATES never move (deterministic fixtures); as_of is bounded to [2020-01-01, today + 2 years], out-of-bounds returns 422. ?mock_date=YYYY-MM-DD recomputes this read the same way (wider bounds 2000..2100, malformed returns 400, no test bearer needed; as_of wins when both are present) — and it also drives the write path, where POST /actions/execute computes filed_late against the pinned date (see the late-VAT-filing scenario).

Late VAT filing

write

I am filing a VAT return for a period whose deadline has already passed and want the late-filing flag on the receipt.

POST /api/v1/sandbox/actions/execute

Recipe
# 1 · mint the deterministic approval token for (org, action)
curl -X POST https://www.apier.no/api/v1/sandbox/auth/approval-token \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding"}'
# → { "data": { "approval_token": "sandbox-approval-…" } }

# 2 · execute with that token — a period before the sandbox clock forces the late-filing flag
curl -X POST "https://www.apier.no/api/v1/sandbox/actions/execute" \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding","payload":{"period":"2020-01","total_revenue_nok":500000},"approval_token":"PASTE_FROM_STEP_1"}'

Expect 200 accepted with filed_late: true (the period precedes the effective sandbox now).

Note Two calls: mint an approval token for (org, action), then execute with it. The token is deterministic per (org, action).

Missed VAT deadline (clock pinned past the deadline)

write

I want to rehearse deadline-passed handling by advancing the sandbox clock beyond a filing period's deadline.

POST /api/v1/sandbox/actions/execute

Recipe
# 1 · mint the deterministic approval token for (org, action)
curl -X POST https://www.apier.no/api/v1/sandbox/auth/approval-token \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding"}'
# → { "data": { "approval_token": "sandbox-approval-…" } }

# 2 · execute with that token — ?mock_date advances now to 2030-06-15, past the 2030-04 period
curl -X POST "https://www.apier.no/api/v1/sandbox/actions/execute?mock_date=2030-06-15" \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding","payload":{"period":"2030-04","total_revenue_nok":500000},"approval_token":"PASTE_FROM_STEP_1"}'

Expect 200 accepted with filed_late: true — ?mock_date pins now after the period, so the deadline reads as missed.

Note Two calls: mint an approval token for (org, action), then execute with it. The token is deterministic per (org, action).

Government rejects the filing

write

I need to see how a government-side validation rejection surfaces so my agent can recover from it.

POST /api/v1/sandbox/actions/execute

Recipe
# 1 · mint the deterministic approval token for (org, action)
curl -X POST https://www.apier.no/api/v1/sandbox/auth/approval-token \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding"}'
# → { "data": { "approval_token": "sandbox-approval-…" } }

# 2 · execute with that token — total_revenue_nok 99999999 forces the government 422
curl -X POST "https://www.apier.no/api/v1/sandbox/actions/execute" \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding","payload":{"total_revenue_nok":99999999},"approval_token":"PASTE_FROM_STEP_1"}'

Expect 422 GOVERNMENT_VALIDATION_REJECTED with a Skatteetaten-shaped TOTALS_DO_NOT_RECONCILE upstream envelope.

Note Two calls: mint an approval token for (org, action), then execute with it. The token is deterministic per (org, action).

Edge validation rejection (zero revenue)

write

I want to see Apier reject a malformed filing at its own edge, before it ever reaches the government.

POST /api/v1/sandbox/actions/execute

Recipe
# 1 · mint the deterministic approval token for (org, action)
curl -X POST https://www.apier.no/api/v1/sandbox/auth/approval-token \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding"}'
# → { "data": { "approval_token": "sandbox-approval-…" } }

# 2 · execute with that token — total_revenue_nok 0 is rejected at Apier's edge
curl -X POST "https://www.apier.no/api/v1/sandbox/actions/execute" \
  -H "Authorization: Bearer apier_sandbox_test_$(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"org_number":"999000001","action":"mva_melding","payload":{"total_revenue_nok":0},"approval_token":"PASTE_FROM_STEP_1"}'

Expect 400 VALIDATION_FAILED at Apier's edge — a declared MVA-melding cannot report zero total revenue.

Note Two calls: mint an approval token for (org, action), then execute with it. The token is deterministic per (org, action).

Try it — public endpoints

Zero-auth, permanently rate-limited per-IP at 1000 req/min (Category A). Every cURL runs against the live production API.

Norwegian business deadlines for a given calendar year

GET /api/v1/public/deadlines

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", "ANS", "DA", "NUF"]
      },
      {
        "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", "ANS", "DA", "NUF"]
      }
    ]
  },
  "_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"
  }
}

Every deadline is ISO 8601 with the Europe/Oslo offset baked in. `adjusted_from` is non-null when the legal date fell on a weekend or holiday, so agents do not need to reimplement Oslo business-day math.

Generic Norwegian business obligations by entity type

GET /api/v1/public/obligations

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"
  }
}

`tier_2_required: true` marks obligations that would need Tier 2 commercial data for a company-specific verdict. Tier 2 data is not served (the Altinn delegation gate was withdrawn on 2026-10-21), so the `/company/*` endpoints return `insufficient_data` for them.

Requirements in force for a Norwegian company type on a date

GET /api/v1/public/requirements

Request
curl 'https://www.apier.no/api/v1/public/requirements?entity_type=AS&date=2026-03-01'
Response
{
  "success": true,
  "data": {
    "entity_type": "AS",
    "date": "2026-03-01",
    "requirements": [
      {
        "requirement_id": "MVA_REGISTRATION_THRESHOLD",
        "version": 1,
        "legal_reference": "Merverdiavgiftsloven § 2-1",
        "source_url": "https://lovdata.no/lov/2009-06-19-58/§2-1",
        "entity_types": ["AS", "ENK", "NUF", "ANS", "DA"],
        "preconditions": [
          { "field": "annual_turnover", "operator": "gt", "value": 50000, "data_tier": "tier_2" }
        ],
        "obligations": [
          {
            "obligation_type": "mva_registration",
            "description": "Selskapet må registreres i Merverdiavgiftsregisteret når avgiftspliktig omsetning overstiger 50 000 kr i en 12-månedersperiode.",
            "frequency": "one_time",
            "deadline_rule": "mva_registration_on_threshold_crossed",
            "legal_basis": "Merverdiavgiftsloven § 2-1"
          }
        ],
        "evidence": [
          {
            "fact": "annual_turnover",
            "source_id": "brreg_regnskap",
            "max_age_days": null,
            "how_recent": "The latest annual accounts filed with Regnskapsregisteret; state the accounting year used.",
            "data_tier": "tier_2"
          }
        ],
        "effective_from": "2023-12-31T23:00:00.000Z",
        "effective_to": null,
        "last_reviewed": "2026-04-20T14:04:11.605713+00:00"
      }
    ],
    "coverage": {
      "recorded_from": "2026-04-20",
      "before_recording": true,
      "note": "Answered from the Rulebook versions Apier has recorded, by each version's stated effective dates. Apier began recording Rulebook versions on the date in recorded_from; for an earlier date the answer shows the versions then stated as in force, not a reconstruction of older law."
    },
    "notice": "Lists the requirements in force for this company type on the date and the facts an agent checks before acting. It does not say whether any company meets a requirement, is obliged by it or may act."
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-04-20T14:04:11.605713+00:00",
    "last_verified": "2026-04-20T14:04:11.605713+00:00",
    "source": "apier.no",
    "data_source": "Apier Universal Rulebook (versioned)",
    "legal_basis": "NLOD — public registry reuse",
    "schema_version": "1.0.0"
  }
}

`preconditions` are listed, never evaluated: nothing here says whether a company meets a requirement. `evidence` names the fact to check, its source and how recent it must be; `coverage.before_recording` flags a date before Apier began recording Rulebook versions.

Bulk company status for up to 100 organisation numbers

GET /api/v1/public/company-status

Request
curl 'https://www.apier.no/api/v1/public/company-status?org_numbers=999111114,999999999'
Response
{
  "success": true,
  "data": {
    "companies": [
      {
        "org_number": "999111114",
        "lookup_status": "ok",
        "company": {
          "org_number": "999111114",
          "name": "Synthetic Test AS",
          "entity_type": "AS",
          "status": "ACTIVE",
          "registration_date": "2015-03-12",
          "mva_registered": true,
          "konkurs": false,
          "under_avvikling": false,
          "under_tvangsavvikling": null,
          "municipality": "Oslo",
          "nace_codes": ["69.201"],
          "has_filed_annual_accounts": true,
          "last_accounts_year": 2025
        }
      },
      {
        "org_number": "999999999",
        "lookup_status": "not_found",
        "company": null
      }
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-07-20T08:00:00.000Z",
    "last_verified": "2026-07-20T08:00:00.000Z",
    "source": "apier.no",
    "data_source": "Brønnøysund Enhetsregisteret",
    "legal_basis": "NLOD — public registry reuse",
    "schema_version": "1.0.0"
  }
}

Illustrative shape: the synthetic 999-range numbers above resolve `not_found` against the live registry, so run the cURL with your own portfolio to see populated rows. Notice `lookup_status` per row (a failed lookup never fails the batch), the tri-state booleans where `null` means genuinely unknown, and that NO role-holder fields (signaturrett/prokura) exist on this keyless surface.

Published daily Merkle anchors over the company snapshot archive

GET /api/v1/public/anchors

Request
curl 'https://www.apier.no/api/v1/public/anchors?limit=2'
Response
{
  "success": true,
  "data": {
    "anchors": [
      {
        "anchor_date": "2026-10-06",
        "merkle_root": "a2f3afe2dfba5822e9435e6c5c11b4fc1a1342243d263e640a5d34bde5ed6fe4",
        "leaf_count": 463,
        "algorithm": "sha256-rfc6962",
        "tsa_provider": "freetsa",
        "tsa_obtained_at": "2026-10-07T02:30:39.852+00:00",
        "tsa_tokens": [
          { "provider": "freetsa", "obtained_at": "2026-10-07T02:30:39.852+00:00" },
          { "provider": "sectigo", "obtained_at": "2026-10-08T02:30:41.120+00:00" }
        ]
      },
      {
        "anchor_date": "2026-10-05",
        "merkle_root": "b2c53ccb30addd89457c4a6e3ed087a370a5005deac9e7aa2c632874bf2dc99b",
        "leaf_count": 556,
        "algorithm": "sha256-rfc6962",
        "tsa_provider": "freetsa",
        "tsa_obtained_at": "2026-10-06T02:30:40.372+00:00",
        "tsa_tokens": [
          { "provider": "freetsa", "obtained_at": "2026-10-06T02:30:40.372+00:00" }
        ]
      }
    ],
    "chain_status": "active"
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-10-07T02:30:38.682421+00:00",
    "last_verified": "2026-10-07T02:30:38.682421+00:00",
    "source": "apier.no",
    "data_source": "Apier snapshot-archive Merkle anchor chain",
    "legal_basis": "Derived hash material — no personal data on this surface",
    "schema_version": "1.0.13"
  }
}

Newest day first. `tsa_provider` and `tsa_obtained_at` are `null` while the RFC 3161 timestamp token is still pending (the daily job retries). `tsa_tokens` lists every attached token in attach order: the first, then a second from a different timestamp authority; an older anchor may still list one while the daily job back-fills it. In this sample the second `tsa_tokens` entry is illustrative. A `chain_status` of `not_initialised` with an empty `anchors` list means the chain has not started in that environment, not that it is unavailable. A quiet day still gets a row with `leaf_count: 0`, so a missing date after genesis always means a failure.

Public append-only log of receipt hashes

GET /api/v1/public/receipt-log

Request
curl 'https://www.apier.no/api/v1/public/receipt-log?after_seq=0&limit=50'
Response
{
  "success": true,
  "data": {
    "entries": [],
    "head": null,
    "next_after_seq": null,
    "log_status": "active",
    "chain": {
      "algorithm": "sha256-chain-v1",
      "genesis_prev_chain_hash": "0000000000000000000000000000000000000000000000000000000000000000",
      "formula": "chain_hash = sha256_hex(utf8(prev_chain_hash + \":\" + seq + \":\" + kind + \":\" + entry_hash)); prev_chain_hash of seq 1 is 64 zeros; for kind receipt, entry_hash = sha256_hex(utf8(receipt signature))"
    },
    "anchors": []
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "1970-01-01T00:00:00.000Z",
    "last_verified": "1970-01-01T00:00:00.000Z",
    "source": "apier.no",
    "data_source": "Apier public receipt log (hash chain)",
    "legal_basis": "Derived hash material — no personal data on this surface",
    "schema_version": "1.0.13"
  }
}

An entry carries `seq`, `kind` (`receipt`), `entry_hash` (SHA-256 hex of the UTF-8 receipt signature), `prev_chain_hash`, `chain_hash` and `logged_at`. Page with `after_seq` set to `next_after_seq`; look one receipt up with `entry_hash`. `log_status: not_initialised` means the log has not started in that environment.

Every published case study run, newest first

GET /api/v1/public/case-studies

Request
curl https://www.apier.no/api/v1/public/case-studies
Response
{
  "success": true,
  "data": {
    "runs": [
      {
        "company": "Eksempel Teknologi AS",
        "org_number": "999999999",
        "ai_product": "Claude",
        "model": "Sonnet 5.5",
        "run_date": "2026-11-05",
        "task": "company_verification",
        "task_label": { "en": "Company verification", "nb": "Selskapsverifisering" },
        "result": "passed",
        "cost_nok": "1.50",
        "tool_calls": 3,
        "page_url": {
          "en": "https://www.apier.no/case-studies/claude-eksempel-teknologi-as",
          "nb": "https://www.apier.no/no/kasusstudier/claude-eksempel-teknologi-as"
        },
        "share_url": "https://claude.ai/share/00000000-0000-4000-8000-000000000000",
        "evidence_pack_url": "https://www.apier.no/case-studies/claude-eksempel-teknologi-as/evidence-pack.json",
        "evidence_pack_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
        "evidence_pack_bytes": 12542,
        "receipt_log": {
          "seq": 1,
          "entry_hash": "1111111111111111111111111111111111111111111111111111111111111111",
          "url": "https://www.apier.no/api/v1/public/receipt-log?entry_hash=1111111111111111111111111111111111111111111111111111111111111111"
        },
        "anchor": {
          "date": "2026-11-05",
          "merkle_root": "2222222222222222222222222222222222222222222222222222222222222222",
          "url": "https://www.apier.no/api/v1/public/anchors"
        },
        "source_url": "https://data.brreg.no/enhetsregisteret/api/enheter/999999999"
      }
    ],
    "count": 1,
    "generated_at": "2026-11-05T17:11:00.000Z"
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-11-05T17:11:00.000Z",
    "last_verified": "2026-11-05T17:11:00.000Z",
    "source": "apier.no",
    "data_source": "Apier published case studies",
    "legal_basis": "Company and AI product names from published runs — no personal data on this surface",
    "schema_version": "1.0.13"
  }
}

A run carries the company and its organisation number, the AI product and model, `task` (a closed label with `task_label` in English and bokmål), `result` (`passed`, `partly_passed` or `failed`), `cost_nok` as a decimal string, and the links to check it: the run page in both languages, the shared conversation, the evidence pack file with its SHA-256 and size, the receipt log entry, the daily anchor and the register's record. No person is named. In this sample the run, its hashes and its links are illustrative; the live endpoint lists the published runs.

Notices when a cited law or regulation section changes

GET /api/v1/public/regulatory-changes

Request
curl 'https://www.apier.no/api/v1/public/regulatory-changes?after_id=0&limit=50'
Response
{
  "success": true,
  "data": {
    "notices": [
      {
        "section_id": "NL/lov/1997-06-13-44/§7-6",
        "section": "§7-6",
        "lovdata_document_id": "NL/lov/1997-06-13-44",
        "dataset": "gjeldende-lover",
        "observed_date": "2026-11-04",
        "effective_date": "2026-07-01",
        "requirement_ids": [
          "REVISOR_THRESHOLD_ASSETS_AS",
          "REVISOR_THRESHOLD_EMPLOYEES_AS",
          "REVISOR_THRESHOLD_REVENUE_AS"
        ],
        "lovdata_url": "https://lovdata.no/lov/1997-06-13-44/%C2%A77-6",
        "source": {
          "name": "Lovdata",
          "licence": "NLOD 2.0",
          "source_url": "https://api.lovdata.no/v1/publicData/get/gjeldende-lover.tar.bz2",
          "retrieved_at": "2026-11-04T03:12:00.000Z"
        }
      }
    ],
    "next_after_id": null,
    "feed_status": "active",
    "source": {
      "name": "Lovdata",
      "licence": "NLOD 2.0",
      "licence_url": "https://data.norge.no/nlod/no/2.0"
    }
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-11-04T03:12:00.000Z",
    "last_verified": "2026-11-04T03:12:00.000Z",
    "source": "apier.no",
    "data_source": "Lovdata open data (NLOD 2.0), section hashes observed by Apier",
    "legal_basis": "Public law texts under NLOD 2.0; hashes and ids only, no personal data",
    "schema_version": "1.0.13"
  }
}

A notice says only that the SHA-256 of a cited section moved: read the section on lovdata.no and the requirement with GET /api/v1/public/requirements. `limit` counts document versions; page with `after_id` set to `next_after_id`. `feed_status: not_initialised` means the Lovdata version table is not migrated in that environment. Webhook subscribers whose filter names `entity_type: "law_section_changed"` receive the same notices.

Inclusion proof from one snapshot leaf to its daily anchor

GET /api/v1/public/anchors/{date}/proof

Request
curl 'https://www.apier.no/api/v1/public/anchors/2026-11-01/proof?leaf=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
Response
{
  "success": true,
  "data": {
    "anchor_date": "2026-11-01",
    "merkle_root": "f0e7612ca820fcad53e1d5987f8bc991cf5bbe3620760a04269debe844e8d9f7",
    "leaf_count": 2,
    "algorithm": "sha256-rfc6962",
    "leaf": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "inclusion": "verified",
    "unavailable_reason": null,
    "leaf_index": 0,
    "proof": [
      { "sibling": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "position": "right" }
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-11-02T02:30:40.975Z",
    "last_verified": "2026-11-02T02:30:40.975Z",
    "source": "apier.no",
    "data_source": "Apier snapshot-archive Merkle anchor chain",
    "legal_basis": "Derived hash material — no personal data on this surface",
    "schema_version": "1.0.13"
  }
}

`leaf` is the RFC 6962 leaf hash: SHA-256 over 0x00 and the canonical JSON of `content_hash`, `first_observed_at` and `org_number`. Hash it with each `sibling` in order (0x01 prefix, sibling on the side `position` names) and compare with `merkle_root`.

Whether an agent key is active, expired or revoked, and its scopes

GET /api/v1/public/agents/{key_id}

Request
curl 'https://www.apier.no/api/v1/public/agents/AbytHX3qdo_wy0RUb8u-rdG684R1zH71kZUBdz20TUk'
Response
{
  "success": true,
  "data": {
    "agent_key_id": "AbytHX3qdo_wy0RUb8u-rdG684R1zH71kZUBdz20TUk",
    "alg": "Ed25519",
    "status": "active",
    "scopes": ["read:brreg", "read:rulebook"],
    "expires_at": "2027-11-14T12:00:00.000Z"
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "source": "apier.no",
    "data_source": "Apier agent key registry",
    "legal_basis": "Key state only — no owner or account data on this surface",
    "schema_version": "1.0.13"
  }
}

`status` is `active`, `expired` or `revoked`; only an active key can use its `scopes`. An unknown `key_id` is a 404 NOT_FOUND, so a key that never existed and a revoked one are told apart.

Public health of every scheduled data source

GET /api/v1/public/source-health

Request
curl 'https://www.apier.no/api/v1/public/source-health?source=norges_bank_exchange_rates'
Response
{
  "success": true,
  "data": {
    "checked_at": "2026-10-31T06:00:00.000Z",
    "window_days": 30,
    "sources": [
      {
        "source": "norges_bank_exchange_rates",
        "name": "Norges Bank, exchange rates",
        "source_url": "https://data.norges-bank.no/api/",
        "health_status": "verified",
        "last_success_at": "2026-10-30T08:00:24.381Z",
        "last_attempt_at": "2026-10-30T08:00:24.381Z",
        "lag_seconds": 79175,
        "max_lag_seconds": 172800,
        "outages": [],
        "coverage_start": "2026-07-30T08:00:21.000Z",
        "licence": {
          "name": "Norges Bank, opphavsrett (kopiering tillatt når Norges Bank oppgis som kilde)",
          "attribution": "Kilde: Norges Bank",
          "url": "https://www.norges-bank.no/Opphavsrett/",
          "derived_by_apier": []
        }
      }
    ]
  },
  "_meta": {
    "rulebook_version": "1.0.0",
    "data_freshness": "2026-10-31T06:00:00.000Z",
    "last_verified": "2026-10-31T06:00:00.000Z",
    "source": "apier.no",
    "data_source": "Apier fetch and schedule records",
    "legal_basis": "Operational records about public sources; no personal data on this surface",
    "schema_version": "1.0.13"
  }
}

Omit `source` for every listed source. `lag_seconds` is the time since the last successful fetch; past `max_lag_seconds` the source is `stale`. `outages` lists the runs of failed fetches in the last 30 days, with `ongoing: true` while the newest fetch is still failing. `coverage_start` is the first recorded successful fetch: Apier claims nothing about a source from before it.

Official Norges Bank NOK exchange rate for a currency and date

GET /api/v1/tools/exchange-rate

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"
  }
}

`date` is the actual publication day Norges Bank resolved the rate from; on weekends/holidays it falls back to the previous banking day and `requested_date` records what you originally asked for.

Altinn 2 → Altinn 3 migration map

GET /api/v1/tools/altinn-migration

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"
  }
}

Omit `altinn2_code` to receive the full `mappings` array. The deadline (2026-06-19T23:59:59+02:00 Europe/Oslo) has passed, so `deadline_passed` is `true` and `days_remaining` is `0`; agents should branch on the boolean, not reimplement the date math.

Machine-readable capability manifest (agent discovery)

GET /api/v1/capabilities

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/999111114",
        "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"
  }
}

Every authenticated surface is listed with its `auth`, `tier_minimum`, and OpenAPI operation id. Parse this instead of hard-coding endpoint lists in agent prompts.

Qualitative Apier-vs-direct-integration comparison

GET /api/v1/comparison/direct-integration

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"
  }
}

Designed to be parsed rather than rendered; each dimension carries one factual statement per column so agents can weigh Apier against building the direct integration at planning time. The methodology and source fields state the comparison basis on the wire.

Your live request log

Company read calls you make with a Bearer apier_sandbox_test_<suffix> bearer (the /company/<org>/* routes, plus any rate-limit 429 the sandbox wrapper emits) are captured in a private per-suffix log: the last 50 request/response pairs, kept for 15 minutes. The sandbox write loop (plan, approval-token, execute; a fixture rehearsal of a withdrawn production flow) is not captured today beyond such a 429. Type your suffix below to read it back (or fetch it directly: GET /api/v1/sandbox/sessions/<suffix>/log with the same bearer). Only your own bearer can read your log; bearer strings are never stored.

Sandbox test checklist

The end-to-end sandbox rehearsal, as a check-off list, from fetching the fixtures table to injecting an infrastructure failure and time-traveling a deadline. Check-off state is in-page only and resets on reload.

0 / 7 done

Frequently asked questions

Do I need an account or an API key to use the sandbox?
No. The public mirror under /api/v1/sandbox/public/* needs no key at all. For the other sandbox routes, pass Authorization: Bearer apier_sandbox_test_<uuid> with a UUID you generate yourself; no sign-up is involved.
Does the sandbox call Altinn, Brønnøysund or Skatteetaten?
No. The sandbox answers from deterministic synthetic data and never calls a government system, so a sandbox filing never reaches a real agency.
How do I test error handling in the sandbox?
Add ?simulate_error= for one of the eight failure modes, ?simulate_latency= to pause a response, or ?mock_date= to pin the clock. Magic payload values force filing outcomes. The fixtures reference lists every option.
How can I tell a sandbox response from a production one?
Sandbox handler responses, including simulated failures, carry _meta.is_sandbox: true.