Sandbox

Sandbox mirror of /api/v1/company/{org}/summary (API key or sandbox bearer)

Zero-auth sandbox mirror of GET /api/v1/company/{org}/summary. Composes the same top-level shape as production: { org_number, entity_type, data_tier, obligations[], deadlines[], upgrade_path }. Production accepts ?from_date= and ?horizon_months=; sandbox accepts the same params for client-shape parity but returns the fixture's static deadline list verbatim.

Write→read merge: under a sandbox bearer, mock filings recorded under the SAME suffix transition BOTH the matching obligation and its deadline to filed on this composed response (same suffix + same org only), marked via _meta.session_merged + _meta.session_merged_rows. Fresh suffixes read the byte-deterministic static fixture.

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

Request

  • Base URL: https://www.apier.no
  • URL: https://www.apier.no/api/v1/sandbox/company/{org}/summary
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Query parameters

from_datestring

Accepted for production-shape parity. Production also uses type: string at the wire layer. Sandbox does NOT enforce the date-format constraint at runtime and returns the static fixture regardless.

horizon_monthsinteger

Schema mirrors production exactly (integer 1-60). Sandbox runtime validates the range (an integer from 1 to 60; any other value returns 400 VALIDATION_FAILED) but returns the static fixture regardless of the value.

simulate_error'missing_delegation' | 'invalid_token' | 'validation_error' | 'scope_missing' | 'altinn_timeout' | 'invalid_certificate' | 'malformed_payload' | 'upstream_5xx' | 'AUTH_MISSING_DELEGATION' | 'AUTH_EXPIRED_TOKEN' | 'VALIDATION_FAILED' | 'SCOPE_MISSING'

Force the sandbox to return a structured error response. tokens (Apier-edge failures) — missing_delegation → 403 AUTH_MISSING_DELEGATION; invalid_token → 401 AUTH_EXPIRED_TOKEN; validation_error → 400 VALIDATION_FAILED; scope_missing → 403 SCOPE_MISSING. upstream-failure tokens — altinn_timeout → 504 EXECUTION_DEADLINE_EXCEEDED (Altinn 3 instances endpoint timed out, response body carries the Altinn RFC 7807 envelope); invalid_certificate → 502 MASKINPORTEN_AUTH_FAILED (Maskinporten OAuth2 error_object — invalid_client); malformed_payload → 422 GOVERNMENT_VALIDATION_REJECTED (Skatteetaten validation errors with nested path[] arrays); upstream_5xx → 502 GOVERNMENT_UNAVAILABLE (generic government 5xx). The 500 INTERNAL_ERROR path is reserved for unexpected internal failures. Accepts BOTH lowercase public tokens (primary contract) AND uppercase internal explainer codes (back-compat). Wins precedence over reserved-org defaults.

Headers

X-Apier-Simulate'error_500' | 'timeout' | 'rate_limit'

Infrastructure-failure injection. Honored ONLY on the authenticated sandbox company READ routes AND only with the synthetic apier_sandbox_test_<suffix> bearer — a real ("live") key with this header present returns 403 SANDBOX_TEST_KEY_REQUIRED (explicit, never silent: a live key must never receive simulated data). error_500 -> 500, timeout -> 504 after a fixed capped delay, rate_limit -> 429 + Retry-After: 30. Every simulated response carries _meta.simulated: true, burns no real rate-limit quota, and fires no Sentry alert. Case-sensitive; any other value -> 422 VALIDATION_FAILED. Distinct from ?simulate_error= (domain / upstream error SHAPES) — this simulates transport / infrastructure faults so an agent can rehearse its own retry / backoff / timeout handling.

Response

Sandbox 2xx success for GET /api/v1/sandbox/company/{org}/summary. Body shape is the typed SandboxSummaryEnvelope — { success: true, data: SandboxSummaryData, _meta: SandboxMeta }.

successtrue required

Changes

No recorded changes to this operation across all 1 revision of this API.