Skip to content
Apier

Apier.no · Sandbox

Fixtures reference

Every synthetic org, reserved error org, simulate_error token, query knob, and magic value the sandbox serves. This page is the human-readable mirror of the canonical machine-readable directory — and is generated from the same frozen constants, so the two can never drift.

Machine-readable source (zero-auth):

curl "https://apier.no/api/v1/sandbox/fixtures"

New here? Start with the quick start for the sandbox walkthrough, then see going live when you are ready for real filings. The sandbox hub explains the two surfaces and the synthetic bearer.

Reserved test orgs

The orgs the eight non-public sandbox routes (and the write-side execute path) accept. Authenticate with Authorization: Bearer apier_sandbox_test_<uuid> or a real key.

Org numberNameEntityData tierObligations
999000001Sandbox ASAStier_1MVA_FILING_BIMONTHLY
999000002Sandbox EnkeltpersonforetakENKtier_1SKATTEMELDING_NAERINGSDRIVENDE
999000003Sandbox Tier 2 ASAStier_1_2MVA_FILING_BIMONTHLY, AARSREGNSKAP
999000004Sandbox Forsinket ASAStier_1MVA_FILING_BIMONTHLY
999000005Sandbox Ren ASAStier_1MVA_FILING_BIMONTHLY

Realistic orgs

A MOD-11-valid corporate graph (818-series) for parsers that validate org numbers before sending. Full, partial, and minimal delegation shapes across the five fixtures.

Org numberNameEntityData tier
818000006Fjellberg Regnskap ASAStier_1_2
818111118Nordlys BakeriENKtier_1
818333331Vindheim Konsulent ASAStier_1
818444443Solhøyden Eiendom ASAStier_1_2
818555555Kari Holm FrisørENKtier_1

Acting-capacity scenario orgs

Orgs that model a specific delegation/role shape for list_acting_capacity — active role, no roles, expired delegation, and an unrecognised-org placeholder.

Org numberScenario
999111114active-dagl
999222226no-roles
999333338expired-delegation
999444008sandbox-unknown-org

Public sandbox org

The single org the zero-auth public mirror (/api/v1/sandbox/public/*) serves — no bearer needed. It is deliberately not served by the eight non-public routes; the two fixture pools are disjoint.

Org numberSurface
999999999Public mirror only — /api/v1/sandbox/public/*

Reserved error orgs

URL-only error injection — hit any sandbox endpoint with one of these org numbers and you get the mapped error without a query param.

Org numbererror_codeHTTP
999000901AUTH_MISSING_DELEGATION403
999000902AUTH_EXPIRED_TOKEN401
999000903VALIDATION_FAILED400
999000904SCOPE_MISSING403

?simulate_error= tokens

All eight tokens — four Apier-edge failures and four upstream-failure shapes (the latter ride a deterministic government-shaped upstream envelope so parsers practise the same defensive parsing they meet in production).

Tokenerror_codeHTTPMeaning
missing_delegationAUTH_MISSING_DELEGATION403Authenticated, but the company has not delegated the required Altinn scope.
invalid_tokenAUTH_EXPIRED_TOKEN401Token-level auth failure — re-authenticate.
validation_errorVALIDATION_FAILED400Request shape rejected at Apier's edge.
scope_missingSCOPE_MISSING403Authenticated, but the API key lacks the required scope.
altinn_timeoutEXECUTION_DEADLINE_EXCEEDED504Altinn did not respond within the timeout window; the response carries an upstream envelope.
invalid_certificateMASKINPORTEN_AUTH_FAILED502Maskinporten refused the JWS assertion; the response carries an upstream envelope.
malformed_payloadGOVERNMENT_VALIDATION_REJECTED422Payload reached the government API and was rejected on content; carries an upstream envelope.
upstream_5xxGOVERNMENT_UNAVAILABLE502Generic upstream 5xx — the request did not commit; safe to retry with the same Idempotency-Key.

Query knobs

Deterministic levers every sandbox surface honours.

ParameterFormatNotes
simulate_latencyinteger ms, 030000Pause the response by N ms; above the cap returns 400.
mock_dateYYYY-MM-DD (Europe/Oslo)Pin the sandbox "now" to a wall-clock date for deadline and late-filing rehearsal.

Magic VAT values

On a live sandbox mva_melding execute, the payload content forces a deterministic filing outcome — exercising the decision path the way real data would. a_melding always takes the plain accepted path.

FieldValueOutcomeHTTP
total_revenue_nok0Edge rejection — VALIDATION_FAILED (a declared MVA-melding cannot report zero revenue)400
total_revenue_nok99999999Government rejection — GOVERNMENT_VALIDATION_REJECTED, with a Skatteetaten-shaped TOTALS_DO_NOT_RECONCILE upstream envelope422
periodYYYY-MMbefore sandbox "now"Accepted but flagged filed_late: true200
*any other consistent payloadAccepted — deterministic mock receipt (nothing is submitted)200

Execute action types

The action types the sandbox write-side accepts. Append ?dry_run=true to POST /api/v1/sandbox/actions/execute for the five prerequisite checks plus a would_be_payload preview — nothing is submitted.

  • mva_melding
  • a_melding