Sandbox

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

Authenticated sandbox mirror of GET /api/v1/company/{org}/filing-history — accepts EITHER a real API key OR the advertised Authorization: Bearer apier_sandbox_test_<suffix> synthetic bearer (no signup). Serves the SAME synthetic fixture source + pure pairing the production mock adapter uses, so a prod→sandbox client swap sees the identical { data, pagination, audit_pairing } shape. The sandbox never calls Altinn and never reads the real audit_log — the "filed via Apier" pairing comes from a deterministic synthetic index, which is why audit_pairing.status is always complete here (both non-complete statuses are unreachable by construction: no audit read exists to fail, and the static uncapped pairing index has no scanned window to truncate). Pagination works as in production: limit and either cursor or the legacy offset select the window, and pagination.has_more, next_offset and next_cursor describe the next page. The sandbox cursor is a sandbox-only token: pass next_cursor from a sandbox response back unchanged; a production cursor is rejected here with 400 VALIDATION_FAILED, as is any value this mirror did not mint.

get/api/v1/sandbox/company/{org}/filing-history

Request

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

Query parameters

limitinteger

Page size, integer 1-100, default 20 (same bounds as production). Applied to the fixture list; pagination.limit echoes it.

cursorstring

Opaque continuation token. Pass the previous sandbox response's pagination.next_cursor back unchanged. Sandbox cursors are not production cursors: a production cursor, or any value this mirror did not mint, is rejected with 400 VALIDATION_FAILED naming cursor. Cannot be combined with the legacy offset parameter.

offsetinteger

Zero-based row offset, integer >= 0, default 0 (same bounds as production). Applied to the fixture list; pagination.offset echoes it. DEPRECATED: use the opaque cursor parameter instead; this parameter keeps working through the deprecation window (Sunset: 2027-01-31T00:00:00Z) and responses to requests using it carry Deprecation/Sunset/Link headers.

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}/filing-history. Body is { success: true, data: FilingHistory, _meta: SandboxMeta } — the same double-wrapped nesting as production filing-history (data.data for the paired filing page, data.pagination for the offset block, data.audit_pairing for the coverage verdict).

successtrue required

Changes

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