{"success":true,"data":{"slug":"sandbox-testing","title":"Testing against the Apier sandbox","jurisdiction":"Norway","summary":"The Apier sandbox mirrors the production API under /api/v1/sandbox/* with synthetic fixtures and never calls a government system; it sets _meta.is_sandbox.","body":[{"heading":"What the sandbox guarantees","content":"Sandbox responses are served entirely from in-code synthetic fixtures and ephemeral session state. No real credentials are exchanged: the sandbox auth mirror accepts Bearer tokens of the form apier_sandbox_test_<suffix> and bypasses the live key lookup entirely, and no Maskinporten or Altinn credential is ever spent. Responses are deterministic — same input, same fixture version, same output."},{"heading":"Synthetic companies and personas","content":"Fixture companies use reserved MOD-11-valid organisation numbers (the 999… range; 999999999 is the docs-standard example). Beyond the happy-path fixtures, eleven difficult-company personas in the 999770-series model realistic hard cases (bankruptcy in progress, voluntary liquidation, VAT-deregistered, disputed signature rights, degraded data, merger-absorbed, NUF branch, dormant, and more), each internally consistent across verify, roles, VAT, accounts, obligations, and deadlines."},{"heading":"Failure simulation","content":"Sandbox endpoints support a ?simulate_error= query parameter with the values missing_delegation (a legacy token kept for compatibility; the delegation surfaces are withdrawn), invalid_token, validation_error, and scope_missing. Simulated errors are produced locally and return production-shaped error bodies using the same Compliance Explainer format as production, so an agent can rehearse its error handling without triggering a real failure. Latency simulation is likewise local and deterministic."},{"heading":"No write loop","content":"The former sandbox rehearsal of an MVA write loop is withdrawn (2026-10-21): POST /api/v1/sandbox/rehearsal/execute answers HTTP 410 CAPABILITY_WITHDRAWN, and no sandbox route models a submission to a government system. The sandbox is a read surface: company facts, obligations, deadlines, signing authority and the error envelope, all from fixtures."}],"use_cases":["Develop and test an agent integration end-to-end before holding a live API key","Rehearse error handling by inducing production-shaped failures deterministically","Exercise hard company states (bankruptcy, liquidation, disputed signatur) that are rare in live data","Demo an onboarding read chain with zero risk of a binding government write"],"requirements":["A sandbox bearer token of the form apier_sandbox_test_<suffix> for the authenticated mirror (no registration needed)","Nothing at all for the zero-auth public sandbox mirror"],"authentication":{"method":"none","scopes":[],"notes":"The public sandbox mirror is zero-auth; the authenticated mirror accepts any apier_sandbox_test_<suffix> bearer without a live key lookup. No production credential is ever required or accepted on the sandbox path."},"common_errors":[{"code":"VALIDATION_FAILED","meaning":"Returned genuinely for malformed input — or on demand via ?simulate_error=validation_error.","fix":"Fix the input; or if simulating, this is the expected rehearsal outcome."},{"code":"SANDBOX_TOOL_UNAVAILABLE","meaning":"The MCP tool called under a sandbox bearer has no sandbox mirror route.","fix":"Use one of the sandbox-mirrored tools/routes, or switch to a live API key for tools without a mirror."}],"related_apis":["sandboxCompanyVerify","sandboxCompanyObligations"],"related_topics":["mva-filing","authentication-overview","error-401-troubleshooting"],"related_mcp_tools":["get_company_verification","get_company_obligations"],"last_verified":"2026-10-21","source_authority":"Apier (synthetic sandbox surface)","source_url":"https://www.apier.no/sandbox","schema_version":"1.0.0"},"_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","schema_version":"1.0.0","response_timestamp":"2026-12-03T00:31:42.337Z","data_source":"Apier (synthetic sandbox surface)","response_hash":"sha256:38b5d348ca0464fb0ad99f031707febaa10d3a4a26ed53cda62aa60c63763f2c"}}