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://www.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 number | Name | Entity | Data tier | Obligations |
|---|---|---|---|---|
| 999000001 | Sandbox AS | AS | tier_1 | MVA_FILING_BIMONTHLY |
| 999000002 | Sandbox Enkeltpersonforetak | ENK | tier_1 | SKATTEMELDING_NAERINGSDRIVENDE |
| 999000003 | Sandbox Tier 2 AS | AS | tier_1_2 | MVA_FILING_BIMONTHLY, AARSREGNSKAP |
| 999000004 | Sandbox Forsinket AS | AS | tier_1 | MVA_FILING_BIMONTHLY |
| 999000005 | Sandbox Ren AS | AS | tier_1 | MVA_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 number | Name | Entity | Data tier |
|---|---|---|---|
| 818000006 | Fjellberg Regnskap AS | AS | tier_1_2 |
| 818111118 | Nordlys Bakeri | ENK | tier_1 |
| 818333331 | Vindheim Konsulent AS | AS | tier_1 |
| 818444443 | Solhøyden Eiendom AS | AS | tier_1_2 |
| 818555555 | Kari Holm Frisør | ENK | tier_1 |
Difficult-company personas
Realistic, internally-consistent synthetic companies an agent should be tested against before production — bankruptcy in progress, voluntary liquidation, deregistered VAT, a disputed signatur, degraded registry data, a merger pair, a foreign NUF branch, and more. MOD-11-valid (999770-series), served by the same authenticated read routes as every other fixture pool.
| Org number | Name | Entity | Persona | What makes it hard |
|---|---|---|---|---|
| 999770002 | Brattfjell Bygg og Anlegg AS | AS | Bankruptcy in progress | Formerly operating company now in konkurs — verify fails, its MVA obligation is no longer applicable, yet a filed MVA deadline remains in its history. |
| 999770010 | Solnedgang Handel AS | AS | Voluntary liquidation (under avvikling) | The ONLY sandbox org where the not_under_dissolution signal is false — distinct from konkurs and tvangsavvikling, and it still owes a final annual-accounts filing. |
| 999770029 | Fjordkanten Kafé AS | AS | VAT deregistered (was registered) | Filing history shows past MVA returns, but mva_registered is now false — an agent extrapolating from history would attempt an unauthorized VAT filing. |
| 999770037 | Nordvik Snekkerservice | ENK | ENK sole proprietor, zero employees | Employer data is AVAILABLE and affirmatively zero (not merely missing) — every employer-side duty (A-melding) is genuinely absent, not undetermined. |
| 999770045 | Tvillingfjell Eiendomsinvest AS | AS | Disputed / ambiguous signatur | Registry sources conflict: /roller lists two signaturrett holders and a prokura holder, but Fullmakt carries NO signing combination — the signing rule cannot be determined. |
| 999770053 | Gråsteinen Holding AS | AS | Degraded / missing registry data | Every tri-state datum is null (distress flags, VAT, accounts), no roles are visible, and the sole obligation is insufficient_data — an agent treating null as false, or unknown as pass, misreads every facet. |
| 999770061 | Vestkyst Distribusjon AS | AS | Absorbed by merger | INACTIVE with ALL distress flags clean — the org was absorbed in a merger, so the agent must detect inactivity without a distress cause and locate the successor entity. |
| 999770088 | Vestkyst Logistikk AS | AS | Recently merged and renamed | Fusion survivor formerly named Vestkyst Transport AS — stale caches and documents reference the old name, so name-based matching fails while the org number stays stable. |
| 999770096 | Balticum Bygg Norge NUF | NUF | Foreign-owned branch (NUF) | Norwegian-registered foreign entity — the open annual-accounts tier does not cover it (has_filed_annual_accounts is null, not false), and its obligation profile differs from a domestic AS. |
| 999770118 | Knoppskyting Teknologi AS | AS | Newly registered, no filing history | Every history-based lookup returns empty (no accounts on file, no filings, no audit trail) — an agent must not treat the absence of history as a failure or distress signal. |
| 999770126 | Hvilende Fjelleiendom AS | AS | Dormant but still registered | No activity for years — zero employees, no VAT, near-zero accounts — yet the company is ACTIVE and still carries the annual-accounts duty an agent must not skip. |
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 number | Scenario |
|---|---|
| 999111114 | active-dagl |
| 999222226 | no-roles |
| 999333338 | expired-delegation |
| 999444008 | sandbox-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 number | Surface |
|---|---|
| 999999999 | Public 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 number | error_code | HTTP |
|---|---|---|
| 999000901 | AUTH_MISSING_DELEGATION | 403 |
| 999000902 | AUTH_EXPIRED_TOKEN | 401 |
| 999000903 | VALIDATION_FAILED | 400 |
| 999000904 | SCOPE_MISSING | 403 |
?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).
| Token | error_code | HTTP | Meaning |
|---|---|---|---|
| missing_delegation | AUTH_MISSING_DELEGATION | 403 | Authenticated, but the company has not delegated the required Altinn scope. |
| invalid_token | AUTH_EXPIRED_TOKEN | 401 | Token-level auth failure — re-authenticate. |
| validation_error | VALIDATION_FAILED | 400 | Request shape rejected at Apier's edge. |
| scope_missing | SCOPE_MISSING | 403 | Authenticated, but the API key lacks the required scope. |
| altinn_timeout | EXECUTION_DEADLINE_EXCEEDED | 504 | Altinn did not respond within the timeout window; the response carries an upstream envelope. |
| invalid_certificate | MASKINPORTEN_AUTH_FAILED | 502 | Maskinporten refused the JWS assertion; the response carries an upstream envelope. |
| malformed_payload | GOVERNMENT_VALIDATION_REJECTED | 422 | Payload reached the government API and was rejected on content; carries an upstream envelope. |
| upstream_5xx | GOVERNMENT_UNAVAILABLE | 502 | Generic upstream 5xx — the request did not commit; safe to retry with the same Idempotency-Key. |
Query knobs
Deterministic levers every sandbox surface honours.
| Parameter | Format | Notes |
|---|---|---|
| simulate_latency | integer ms, 0–30000 | Pause the response by N ms; above the cap returns 400. |
| mock_date | YYYY-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.
| Field | Value | Outcome | HTTP |
|---|---|---|---|
| total_revenue_nok | 0 | Edge rejection — VALIDATION_FAILED (a declared MVA-melding cannot report zero revenue) | 400 |
| total_revenue_nok | 99999999 | Government rejection — GOVERNMENT_VALIDATION_REJECTED, with a Skatteetaten-shaped TOTALS_DO_NOT_RECONCILE upstream envelope | 422 |
| period | YYYY-MMbefore sandbox "now" | Accepted but flagged filed_late: true | 200 |
| * | any other consistent payload | Accepted — 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