Apier
Compliance infrastructure API connecting AI agents to Norwegian government systems (Altinn, BRREG).
使うべきか
品質と安全性
検出事項(3)
- HIGH
- MEDIUMexplain_compliance_error 内
- INFOexplain_compliance_error 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"mcp": {
"url": "https://www.apier.no/api/mcp"
}
}
}リモートエンドポイント
https://www.apier.no/api/mcpstreamable-httpできること
ツール一覧
ツール(25)
🟢get_company_summary(org_number)
Retrieve a one-shot compliance summary for a Norwegian organisation by its 9-digit organisasjonsnummer. Your FIRST call when orienting against a company: one round-trip composes entity_type, nace_codes, mva_registered, data_tier, the full obligations[] catalogue, and the rolling deadlines[] calendar, all from one rule version. obligations[] is byte-identical to get_company_obligations; deadlines[] matches get_company_deadlines (tier_2 adds filing_status). Only { org_number } is exposed, so call get_company_deadlines to control horizon_months. For drill-down call get_company_obligations; for identity without a verdict, use get_company_context instead. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), UPSTREAM_TIMEOUT, VALIDATION_FAILED. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/company-snapshot
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The /summary composition: entity_type, nace_codes, mva_registered, data_tier, obligations[], deadlines[] (tier_2 adds filing_status), and (tier_1 only) upgrade_path. NOT the registry identity; call get_company_context for that."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_public_obligations(entity_type)
Retrieve the universal obligation set for a Norwegian entity type — every regulatory obligation that applies by virtue of an entity BEING that organisational form, BEFORE per-company Tier-2 data is layered on. Use this to answer 'what does an AS owe?' or 'what are the baseline filings for an Enkeltpersonforetak?' without naming a specific company. Each obligation carries a tier_2_required boolean — true means the rule engine needs commercial data to know whether it applies to a SPECIFIC company, false means it applies unconditionally. Input: { entity_type } from the closed enum AS / ENK / ANS / DA / NUF (no 'OTHER' fallback). Failure modes: VALIDATION_FAILED, SCOPE_INSUFFICIENT (needs read:rulebook), UPSTREAM_TIMEOUT. For per-company evaluation that DOES layer on commercial data, call get_company_obligations; for a specific company's evaluated obligations, use get_company_obligations instead. Docs: https://www.apier.no/docs/guides/norwegian-company-obligations
入力スキーマ
{
"type": "object",
"properties": {
"entity_type": {
"type": "string",
"enum": [
"AS",
"ENK",
"ANS",
"DA",
"NUF"
],
"description": "Norwegian organisational form (closed enum): AS / ENK / ANS / DA / NUF.",
"examples": [
"AS"
]
}
},
"required": [
"entity_type"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The universal obligation set for the entity type, before per-company Tier-2 data is layered on."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_exchange_rate(base, quote, date)
Fetch the most recent Norges Bank exchange-rate reference for a currency against NOK — the canonical conversion benchmark Norwegian tax + accounting authorities accept for obligations in foreign currency (Årsregnskap, cross-border MVA, dividend reporting). The currency-of-record lookup; takes no Norwegian-company input. Returns the rate, the date it is valid for (weekday rates only; weekends / holidays return the prior business day's rate), and source attribution. Input: { base, quote, date? } — ISO 4217 codes, NOK-ANCHORED: exactly one side MUST be 'NOK'. A pair without a NOK side is rejected client-side as UNSUPPORTED_CURRENCY_PAIR — fetch both NOK legs and derive the cross rate yourself. Failure modes: VALIDATION_FAILED, UNSUPPORTED_CURRENCY_PAIR, INVALID_DATE, UPSTREAM_TIMEOUT, NO_RATE_AVAILABLE, SCOPE_INSUFFICIENT (needs read:norgesbank). For compliance obligations or filing deadlines rather than a currency rate, use get_company_summary instead. Docs: https://www.apier.no/docs/mcp
入力スキーマ
{
"type": "object",
"properties": {
"base": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Base currency — ISO 4217 three-letter code (case-insensitive). Exactly one of base/quote must be 'NOK'.",
"examples": [
"EUR",
"USD"
]
},
"quote": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Quote currency — ISO 4217 three-letter code (case-insensitive). Exactly one of base/quote must be 'NOK'.",
"examples": [
"NOK"
]
},
"date": {
"description": "Optional ISO 8601 date (YYYY-MM-DD); omit for the latest published rate. Non-business days fall back to the prior business day.",
"examples": [
"2026-04-10"
],
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"base",
"quote"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The Norges Bank NOK reference rate, the date it is valid for, and the source attribution."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢list_acting_capacity(fnr, org_number)
Resolve every Norwegian regulatory action a person is currently authorised to perform on behalf of a specific organisation. Combines the actor's Altinn role assignments (DAGL, LEDE, MEDL, NESTL, INNH, REGN, REVI) with a conservative role-to-action map, returning the raw role list AND the derived action tokens an agent may pass to /v1/actions/execute (dry-run them first with the validate_action tool), each with a lovdata legal_reference. Inputs: an 11-digit fødselsnummer / D-nummer — HMAC-hashed; the raw value is never persisted, logged, or returned (only `actor.fnr_hmac` is echoed) — plus the 9-digit organisasjonsnummer. Failure modes: SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. For your own consumer's delegation snapshot, use check_authorization instead; for the company-level statutory signing authority with no actor input, use get_company_authority. No sandbox-bearer mirror (SANDBOX_TOOL_UNAVAILABLE). Docs: https://www.apier.no/docs/guides/altinn-system-users
入力スキーマ
{
"type": "object",
"properties": {
"fnr": {
"type": "string",
"pattern": "^\\d{11}$",
"description": "11-digit Norwegian fødselsnummer / D-nummer of the actor. HMAC-SHA-256 hashed before any storage — the raw value is never persisted, logged, or returned.",
"examples": [
"12345678901"
]
},
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer of the represented entity.",
"examples": [
"999999999"
]
}
},
"required": [
"fnr",
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The actor's raw Altinn role list plus the derived action tokens they may pass to /v1/actions/execute (dry-run first with the validate_action tool), each with a lovdata legal_reference."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_profile(org_number)
Resolve a Norwegian organisasjonsnummer (9 digits) into a structured company profile from Brønnøysund Enhetsregisteret: display name, organisational form (AS / ENK / ASA …), NACE codes with descriptions, addresses, registration/dissolution dates, the `active` / `dissolved` status enum, the MVA-registered flag, and deduplicated person role CODES — never personal identifiers. Note the backing REST route is POST /api/v1/brreg/company-profile (org number in the JSON body), unlike the GET company siblings. For an evaluated compliance verdict, use get_company_summary instead; for the signaturrett/prokura role-code summary, the distress flags, or the annual-accounts filing status, use get_company_context instead. No sandbox mirror. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), VALIDATION_FAILED. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/norwegian-company-register-search
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund Enhetsregisteret ID). Unlike the get_company_* tools, this input schema does NOT run the MOD-11 control-digit check — MOD-11 is enforced by the backing route, which returns ORG_NUMBER_INVALID_CHECKSUM (HTTP 400) when a well-formed 9-digit value fails it; correct the number rather than retrying the same one.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The Brønnøysund company profile: display name, organisasjonsform, NACE codes + descriptions, addresses, registration/dissolution dates, MVA flag, and person role codes (never personal identifiers)."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢check_authorization(org_number)
Return the authorisation snapshot for the calling consumer's delegation on a Norwegian organisation: the `status` enum (`full` / `partial` / `none`), `missing_scopes` (empty on `full`), `granted_scopes`, and the `delegation_chain` breadcrumbs. To check whether a SPECIFIC action is permitted, compare `granted_scopes` to the scopes it requires. Always runs against the calling consumer — no per-action or per-actor input at v1. Always a 200: with no delegation the verdict is `status: "none"`, never a 404. Input: { org_number } (9 digits, MOD-11). Failure modes: SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. For a SPECIFIC person's actions, use list_acting_capacity instead. Before a live execute, use validate_action to preflight the same delegation rule at zero upstream cost. For the per-agent-principal breakdown, use check_fullmakt; for statutory signing authority, use get_company_authority. No sandbox mirror. Docs: https://www.apier.no/docs/fullmakt
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (passing MOD-11) the calling consumer's delegation is checked against.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The authorisation snapshot for the calling consumer's delegation on the organisation: status enum, missing_scopes, granted_scopes, and the delegation_chain breadcrumbs."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_context(org_number)
Retrieve the structured Brønnøysund identity slice for a Norwegian organisation by its 9-digit organisasjonsnummer: legal name, organisasjonsform (AS / ENK / NUF / ASA …), NACE codes, addresses, incorporation/dissolution dates, and the signaturrett / prokura role-code summary (never personal identifiers). Cache window 24 h. Choose this for the identity slice ONLY, without the compliance verdict; pair with get_company_obligations or get_company_deadlines for the regulatory layer. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), UPSTREAM_TIMEOUT, VALIDATION_FAILED. For a compliance verdict, use get_company_summary instead; for the plain registry profile with NACE descriptions, use get_company_profile instead. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/company-snapshot
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The Brønnøysund identity slice: legal name, organisasjonsform, NACE codes, addresses, incorporation/dissolution dates, and signaturrett/prokura role codes (never personal identifiers)."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_deadlines(org_number, horizon_months)
Compute the upcoming Norwegian regulatory filing calendar for a specific organisation, looking horizon_months ahead. One entry per (obligation, period) pair: a stable obligation_id matching get_company_obligations, the due_date as ISO 8601 in Europe/Oslo (DST-aware), the legal_reference, and recurrence/adjustment flags. Choose this for the calendar view — when does the next MVA / A-melding / Årsregnskap filing land? Inputs: { org_number (9 digits, MOD-11), horizon_months? (1–60) }. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), VALIDATION_FAILED. For the per-obligation compliance verdict, use get_company_obligations instead; for the entity-type-level calendar that needs no organisasjonsnummer (and no API key), use get_public_deadlines instead. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/norway-corporate-tax-return-deadline
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
},
"horizon_months": {
"description": "Look-ahead window in months (1–60). Omitted → the endpoint's default horizon (12).",
"examples": [
12
],
"type": "integer",
"minimum": 1,
"maximum": 60
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The upcoming filing calendar: due_date (Europe/Oslo), legal_reference, recurring + business_day_adjusted per obligation×period."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_obligations(org_number)
Evaluate the Apier Rulebook for a Norwegian organisation and return every applicable regulatory obligation with its current state and legal reference. One entry per obligation: a stable obligation_id (e.g. `MVA_FILING_BIMONTHLY`), the lovdata legal_reference, the state enum (`filed` / `pending` / `in_progress` / `failed` / `overdue` / `unknown`), the bokmål description inherited byte-for-byte from the Rulebook (never re-translate it), and the freshness window. Deterministic, always against the current instant (no as_of at v1). Choose this for the full obligation menu. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), VALIDATION_FAILED. For the calendar alone, use get_company_deadlines instead; for the entity-type-level set needing no organisasjonsnummer or key, use get_public_obligations instead. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/norwegian-company-obligations
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The full rule-engine evaluation: every applicable obligation with stable id, lovdata legal_reference, state enum, and bokmål description."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_public_deadlines(year)
Compute the universal Norwegian regulatory filing calendar — the deadlines that apply to every Norwegian business of the covered categories (MVA, A-melding, Årsregnskap), independent of any specific organisation. One entry per (obligation, period) pair for a single Europe/Oslo calendar year: a stable obligation_id (e.g. `MVA_FILING_BIMONTHLY`), the due_date as ISO 8601 in Europe/Oslo (DST-aware), the lovdata legal_reference, a recurring flag, and a business_day_adjusted flag. Choose this tool for questions like 'when is the next MVA filing deadline' that don't depend on a specific org_number — it requires no organisasjonsnummer. Deterministic: same input + same rulebook_version → byte-identical calendar. Input: optional `year` (integer 2020–2100; defaults to the current Oslo year). Failure modes: SCOPE_INSUFFICIENT (needs read:rulebook), VALIDATION_FAILED on year shape. For a specific company's filing calendar rather than the universal one, use get_company_deadlines instead. Docs: https://www.apier.no/docs/guides/norway-corporate-tax-return-deadline
入力スキーマ
{
"type": "object",
"properties": {
"year": {
"description": "Europe/Oslo calendar year the calendar should cover (2020–2100). Omitted → the current Oslo year at the endpoint.",
"examples": [
2026
],
"type": "integer",
"minimum": 2020,
"maximum": 2100
}
},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The universal Norwegian filing calendar for one Europe/Oslo year, independent of any specific organisation."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢validate_action(org_number, action_type, period, payload)
Run the Apier dry-run validator against a proposed regulatory action without producing ANY upstream side effect — no Maskinporten call, no Altinn / Skatteetaten / NAV submission. Use this BEFORE the live execute path to catch missing delegations and payload-shape errors at zero upstream cost. The verdict carries five prerequisite check slots (each pass / fail / skipped), the overall `valid` boolean, the DRY_RUN_DISCLAIMER (a pass is NOT a guarantee of upstream success), and the preview echo `would_be_payload` + `preview_notice`. Inputs match the /v1/actions/execute body: { org_number (9 digits, MOD-11), action_type (`mva_melding` | `a_melding`), period, payload }. The nested `payload` object is intentional - it mirrors the upstream government payload schema for the action, so it is not flattened. Failure modes: SCOPE_INSUFFICIENT (needs read:actions), VALIDATION_FAILED; the validator never throws. To actually file a (sandbox) VAT return, use submit_vat_return instead. No sandbox mirror — under a sandbox bearer call submit_vat_return instead. Docs: https://www.apier.no/docs/guides/mva-filing
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (passing MOD-11) the proposed action targets.",
"examples": [
"999999999"
]
},
"action_type": {
"type": "string",
"enum": [
"mva_melding",
"a_melding"
],
"description": "The regulatory action to dry-run — `mva_melding` (VAT return) or `a_melding` (employer report).",
"examples": [
"mva_melding"
]
},
"period": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"description": "Reporting period. mva_melding: `YYYY-T1..T6` (bimonthly), `YYYY-A` (annual), or `YYYY-MM` (monthly). a_melding: `YYYY-MM`.",
"examples": [
"2026-T2"
]
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The upstream-shaped JSON payload for the action; the route's per-action discriminated Zod owns shape validation. Capped at 64 KiB UTF-8 here."
}
},
"required": [
"org_number",
"action_type",
"period",
"payload"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The structured dry-run verdict: the overall `valid` boolean, the five check slots (each pass/fail/skipped with a reason), the DRY_RUN_DISCLAIMER, and the preview echo `would_be_payload` + `preview_notice`. No upstream side effect."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢explain_compliance_error(error_code, context_org_number, context_scope, context_role, context_field, ...)
Resolve a structured Apier compliance error code into a Norwegian-bokmål Explanation envelope: summary, bokmål why, ordered fix_steps, optional documentation link + legal_basis, and an optional handover block (who / where / what / why) for errors a human must resolve (e.g. AUTH_INSUFFICIENT_ROLE, AUTH_NO_DELEGATION, SCOPE_MISSING) — agent-resolvable errors ship `handover: null`. Accepts any code from the closed EXPLAINER_ERROR_CODES catalogue — pass whatever code an Apier endpoint returned in an error envelope. Optional flat context_org_number / context_scope / context_role / context_field / context_upstream_system strings carry placeholder values interpolated into the bokmål text; missing values fall back to 'ukjent <noun>'. Failure modes: VALIDATION_FAILED on an unknown code; SCOPE_INSUFFICIENT (needs read:rulebook). For a company's live obligations rather than an error explanation, use get_company_obligations instead. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Docs: https://www.apier.no/docs/guides/error-handling
入力スキーマ
{
"type": "object",
"properties": {
"error_code": {
"type": "string",
"minLength": 1,
"description": "An Apier error code from an error envelope. Full list: apier://tools/explain_compliance_error/guide",
"examples": [
"VALIDATION_FAILED",
"AUTH_NO_DELEGATION"
]
},
"context_org_number": {
"description": "Organisation the error relates to (9 digits).",
"type": "string",
"pattern": "^\\d{9}$"
},
"context_scope": {
"description": "Scope token interpolated into the bokmål explanation.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"context_role": {
"description": "Role code interpolated into the explanation.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"context_field": {
"description": "Field name interpolated into the explanation.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"context_upstream_system": {
"description": "Upstream system name interpolated into the explanation.",
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"error_code"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The Explainer envelope: summary, bokmål why, ordered fix_steps, optional documentation link + legal_basis, and an optional human handover block."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢search_companies(name)
Resolve a Norwegian company NAME to its 9-digit organisasjonsnummer. Use this as your FIRST call whenever you have a company's name but NOT its org_number — every other company tool requires the 9-digit number, and guessing a MOD-11-valid number risks hitting the wrong company. Searches Brønnøysund's public Enhetsregisteret and returns a token-efficient candidate list: up to ten matches, five fields each (name, org_number, org_form, municipality, registry status). Then call get_company_summary or get_company_context with the chosen org_number (skip a deleted or bankrupt match unless you meant it). Input: { name } (2–100 chars, æ/ø/å supported). On NOT_FOUND, broaden the name and drop the legal form — never loop on the same name. Failure modes: VALIDATION_FAILED, NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), UPSTREAM_TIMEOUT / UPSTREAM_UNAVAILABLE. No sandbox mirror — the sandbox fixtures catalog already lists every synthetic org. Docs: https://www.apier.no/docs/guides/norwegian-company-register-search
入力スキーマ
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 100,
"description": "Company name to search for (2–100 characters, trimmed). Free-text; matched against Brønnøysund's registered `navn` field. Omit the legal form for a broader match (search `Nordic Widgets`, not `Nordic Widgets AS`) — a too-specific or misspelled name returns a NOT_FOUND you must broaden. Norwegian characters (æ/ø/å) are supported.",
"examples": [
"Nordic Widgets",
"Equinor"
]
}
},
"required": [
"name"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The /company/search projection: { query, count, candidates } — five fields per candidate (name, org_number, org_form, municipality, status). Pick an org_number, then call get_company_summary / get_company_context."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_verification(org_number)
Get the deterministic verification verdict for a Norwegian organisation by its 9-digit organisasjonsnummer — a fast go / no-go trust check before acting on a company's behalf. Keyed ONLY off entity activity plus visible signing authority (signaturrett, prokura, or an ENK innehaver). `verification_status`: `pass` (active AND visible signing authority), `fail` (not active — konkurs, under avvikling, or oppløst), `unknown` (indeterminate or none visible — never a claimed absence; `warn` reserved). Seven transparency signals never change the verdict. The breakdown is available from get_company_authority; call get_company_context for identity, get_company_summary for obligations-and-deadlines, or get_company_obligations for drill-down. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), UPSTREAM_UNAVAILABLE, VALIDATION_FAILED. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/norwegian-company-register-search
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The verdict: `verification_status` (pass / fail / unknown; `warn` reserved), the seven signals, Norwegian `summary`, `signing_authority_summary`, `last_accounts_year`, and the registry identity echo."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_authority(org_number)
Answer "who can legally sign for this Norwegian company, and how?" before acting on its behalf. Given a 9-digit organisasjonsnummer it returns a deterministic signing-authority classification — `sole`, `joint`, `by_role`, `prokura_only`, `no_authority`, or `unknown` — from the open Fullmakttjenesten signing combinations plus the signaturrett / prokura role-holders. `kombinasjon_available: false` flags a degraded answer. `coded_authority` adds the coded model over the mirrored clauses with their verification stamps (per oppslag: `coded_verified`, `coded_unverified`, `free_text_uninterpreted`, `absent_verified`, `no_record_unverified`) — an absence is never collapsed into a no. No legal citation is asserted. Failure modes: NOT_FOUND, SCOPE_INSUFFICIENT (needs read:brreg), UPSTREAM_UNAVAILABLE, VALIDATION_FAILED. For a fast go/no-go verdict, use get_company_verification instead. This answers STATUTORY authority — no actor input, no Altinn delegations. For a SPECIFIC person's actions, use list_acting_capacity; for the consumer's own delegation, use check_authorization. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/signature-rights-norwegian-company
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The /authority answer: a deterministic `classification`, `combinations[]`, the `signaturrett_holders` / `prokura_holders` lists, `kombinasjon_available`, and the stamp-honest `coded_authority` model over the mirrored clauses. No legal citation is asserted."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_accounts(org_number)
Current-snapshot read of a Norwegian company's annual accounts (årsregnskap) from the OPEN Regnskapsregisteret tier: `has_filed_annual_accounts` (tri-state — null means unknown, never a fabricated false), `last_accounts_year`, and that year's minimal `key_figures` (currency, presentation basis, totals). `currency` is always surfaced so figures are never silently read as NOK. Current-snapshot only — no multi-year history. A well-formed but unknown org_number returns 200 with `null`, not a 404. Input: { org_number } (9 digits, MOD-11). Failure modes: SCOPE_INSUFFICIENT (needs read:brreg), VALIDATION_FAILED. For the filing status as one input to a go/no-go verdict, use get_company_verification; for the registry identity, use get_company_context. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/norwegian-company-annual-accounts
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The /accounts snapshot: `has_filed_annual_accounts` (tri-state), `last_accounts_year`, and that year's minimal `key_figures` (currency always surfaced, presentation basis, totals). Current-snapshot only."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_company_filing_history(org_number, limit, cursor, offset)
Reconcile a Norwegian company's Altinn 3 filing history against the filings YOUR consumer submitted through Apier. Given a 9-digit organisasjonsnummer it returns the org's Altinn filing instances (Mva-melding, A-melding, Skattemelding, …), each paired with its Apier audit record where one exists (`filed_via_apier` + `apier_record`). Cursor-paginated via { cursor } (pass back `pagination.next_cursor`) + { limit } (1–100, default 20); legacy { offset } still accepted (deprecated); no filings → 200 with an empty list, never a 404. MOCK-GATED until the `altinn:instances.read` Maskinporten scope is approved. Failure modes: SCOPE_INSUFFICIENT (needs read:altinn), AUTH_NO_DELEGATION (live mode), VALIDATION_FAILED. For upcoming deadlines rather than past filings, use get_company_deadlines instead. No API key? Bearer apier_sandbox_test_<suffix> (fresh suffix) serves synthetic fixtures; org numbers: GET /api/v1/sandbox/fixtures. Cost: 50 øre (NOK 0.50) per call, prepaid (prices: the get_pricing tool or GET /api/v1/pricing; a shortfall returns INSUFFICIENT_CREDITS with top_up_url). Docs: https://www.apier.no/docs/guides/audit-inspection
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer (Brønnøysund ID); MOD-11-checked up-front — a failing value is rejected as VALIDATION_FAILED, so correct the number rather than retrying it.",
"examples": [
"999999999"
]
},
"limit": {
"description": "Page size 1–100 (route default 20).",
"examples": [
20
],
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"description": "Opaque continuation token from the previous page's `pagination.next_cursor` - the canonical way to page.",
"type": "string",
"minLength": 1
},
"offset": {
"description": "Zero-based offset (deprecated - use `cursor` instead).",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The paired filing history: `data[]` Altinn instances (form code, title, agency, submitted_at, status, instance id) each with `filed_via_apier` + `apier_record` when Apier submitted it, plus a `pagination` block. No filings → empty `data[]`, not an error."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢list_changes(source, entity_type, entity_id, change_type, from, ...)
Read Apier's cross-source change archive — detected created / updated / deleted events across the upstreams Apier polls (Brønnøysund ingestion plus the Altinn-schema, DigDir-policy, and Norges Bank pollers) so agents drive incremental sync instead of re-fetching whole entities. `observation_kind` separates cache warm-up rows from genuine transitions. Filter by { source, entity_type, entity_id, change_type } and a { from }–{ to } detected_at range. Queries WITHOUT entity_id withhold personal-field rows by design (`personal_fields_withheld: true`); the org-scoped form returns everything. Keyset-paginated newest-first: pass { limit } (1–500, default 50) and carry `next_cursor` back verbatim — cursors are HMAC-signed; an edited one is rejected as CURSOR_INVALID - start over without a cursor. Failure modes: SCOPE_INSUFFICIENT (needs read:changes), VALIDATION_FAILED, CURSOR_INVALID. No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/guides/webhooks
入力スキーマ
{
"type": "object",
"properties": {
"source": {
"description": "Filter to one upstream source (e.g. brreg / altinn / digdir / norges_bank). Omit for all sources.",
"type": "string",
"enum": [
"brreg",
"altinn",
"digdir",
"norges_bank",
"nav",
"skatteetaten"
]
},
"entity_type": {
"description": "Filter to one entity type (e.g. annual_accounts, company).",
"type": "string",
"minLength": 1,
"maxLength": 50
},
"entity_id": {
"description": "Filter to one entity's change stream (e.g. a 9-digit org number).",
"examples": [
"999999999"
],
"type": "string",
"minLength": 1,
"maxLength": 100
},
"change_type": {
"description": "Filter to created / updated / deleted events.",
"type": "string",
"enum": [
"created",
"updated",
"deleted"
]
},
"from": {
"description": "Lower bound on detected_at (ISO 8601 with timezone offset).",
"examples": [
"2026-01-01T00:00:00Z"
],
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"description": "Upper bound on detected_at; must be ≥ from.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"limit": {
"description": "Page size 1–500 (route default 50).",
"examples": [
50
],
"type": "integer",
"minimum": 1,
"maximum": 500
},
"cursor": {
"description": "Opaque signed cursor from a previous `next_cursor` — pass back verbatim.",
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The change page: `data[]` rows (source, entity_type, entity_id, change_type, detected_at, source_snapshot_id, observation_kind), a `pagination` block, and `personal_fields_withheld`. Ordered newest-first."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_altinn_migration_guidance(altinn2_code)
Discover the Altinn 3 equivalent of an Altinn 2 service or role code. The 19 June 2026 Altinn 2 deprecation deadline has passed, so this serves remediation for any integration still on Altinn 2. Pass { altinn2_code } (alphanumeric, 1–10 chars, e.g. A0208) for a single mapping, or omit it for the entire migration map. Every response carries the deprecation status computed in Europe/Oslo (deprecation_deadline, days_remaining — floored at 0, deadline_passed — now true). Each entry ships a `verified` flag: gate any production migration action on `verified === true`; unverified entries are hints, not instructions. Deterministic static map (DigDir-sourced) — no government system is contacted at call time. Failure modes: NOT_FOUND when a supplied code is not in the map (omit it to list every entry), VALIDATION_FAILED (INVALID_CODE), SCOPE_INSUFFICIENT (needs read:digdir). No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/guides/altinn-system-users
入力スキーマ
{
"type": "object",
"properties": {
"altinn2_code": {
"description": "An Altinn 2 service or role code to resolve (alphanumeric, 1–10 chars, e.g. A0208). Omit to get the entire migration map.",
"examples": [
"A0208"
],
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z0-9]+$"
}
},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The migration lookup: `deprecation_deadline` (Oslo), `days_remaining`, `deadline_passed`, and either one `entry` or the full `mappings[]`. Gate production migration actions on `verified === true`."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟡request_fullmakt(agent_principal_id, org_number, scopes, validity_days, label)
Broker a fullmakt — a legally-grounded, scoped, revocable company→agent authority delegated through an Altinn systembruker. The tool brokers the delegation, persists it, and binds the returned system_user_id write-once onto the principal (`pending` → `active`). The company's signing authority must approve the returned `delegation_url` before the delegation is usable. Non-empty `warnings[]` on a 201 means the delegation exists upstream but a local follow-up degraded - reconcile, never blind-retry. Identical retries are dedup-safe (deterministic Idempotency-Key). Inputs: { agent_principal_id (uuid, YOUR OWN), org_number (9 digits), scopes (non-empty string[]), validity_days?, label? }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, FULLMAKT_PRINCIPAL_NOT_ELIGIBLE, FULLMAKT_UPSTREAM_FAILED, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. To inspect the recorded state per principal, use check_fullmakt instead; to withdraw the delegation and retire the principal, use revoke_fullmakt instead. No sandbox mirror. Docs: https://www.apier.no/docs/fullmakt
入力スキーマ
{
"type": "object",
"properties": {
"agent_principal_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The agent principal (UUID) to bind this delegation to — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND.",
"examples": [
"11111111-1111-4111-8111-111111111111"
]
},
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer of the customer company granting the delegation. Plain 9 digits (no MOD-11 check), matching the route contract.",
"examples": [
"999999999"
]
},
"scopes": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "string"
},
"description": "The Altinn scopes the delegation should carry (e.g. `altinn:accessmanagement/authorizedparties.read`); at least one, each non-whitespace.",
"examples": [
[
"altinn:accessmanagement/authorizedparties.read"
]
]
},
"validity_days": {
"description": "Optional delegation validity window in days (1–3650; the 10-year cap matches Altinn's longest supported term). Omit to use the adapter default.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 3650
},
"label": {
"description": "Optional consumer-supplied label for the delegation (dashboard display only; echoed back on the response).",
"type": "string",
"maxLength": 255
}
},
"required": [
"agent_principal_id",
"org_number",
"scopes"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The brokered delegation: `system_user_id`, `status`, `scopes`, `valid_until`, `delegation_url` (the approval link), the echoed `label`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path)."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢check_fullmakt(org_number)
Check your fullmakt state for a Norwegian company BEFORE acting on its behalf — the read leg of the Fullmakt Rails. Per agent principal of yours holding a live delegation there it returns: the bound system_user_id, whether the delegation is `active` or still `pending` signaturrett approval, the scopes carried, and the scopes still missing. `overall_status`: `full` (act now), `partial` (`fix_steps` names the blocker), or `none` — a VALID answer, not an error: 200 with empty `principals[]`, never a 404. Reports the delegation state Apier RECORDED, not a live Altinn PDP decision. Input: { org_number } (plain 9 digits). Failure modes: SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. To BROKER a fullmakt use request_fullmakt; to withdraw one use revoke_fullmakt; the CONSUMER-level snapshot is check_authorization. No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/fullmakt
入力スキーマ
{
"type": "object",
"properties": {
"org_number": {
"type": "string",
"pattern": "^\\d{9}$",
"description": "9-digit Norwegian organisasjonsnummer of the customer company to check your fullmakt state for. Plain 9 digits (no MOD-11 check), matching the route contract.",
"examples": [
"999999999"
]
}
},
"required": [
"org_number"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The fullmakt state: `overall_status` (full/partial/none), `principals[]` (system_user_id, statuses, active/missing scopes, valid_until), Norwegian `fix_steps`, `last_checked`. LOCAL recorded state, not a live Altinn PDP decision."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🔴revoke_fullmakt(agent_principal_id, reason)
Revoke a fullmakt — withdraw an agent's delegated authority for a Norwegian company and retire the agent principal (broker with request_fullmakt, inspect with check_fullmakt). Given ONLY the agent_principal_id (system_user_id and org_number resolve server-side from the write-once binding, so a client cannot redirect the revoke), Apier revokes the bound delegation and flips the principal to terminal `revoked` — never resurrected; create a new principal to act again. LOCAL revocation is authoritative and immediate. Idempotent: an already-revoked principal/delegation is a 200 no-op. `warnings[]` carries NAMED outcome tokens (principal_revoke_failed, delegation_not_found, upstream_revoke_unconfirmed) - read the specific token, not just array emptiness. Input: { agent_principal_id (uuid), reason? (audit-only) }. Failure modes: FULLMAKT_PRINCIPAL_NOT_FOUND, SCOPE_INSUFFICIENT (needs read:altinn), VALIDATION_FAILED. No sandbox mirror — a sandbox bearer gets SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/fullmakt
入力スキーマ
{
"type": "object",
"properties": {
"agent_principal_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The agent principal (UUID) whose delegation to revoke — one of YOUR OWN; an unknown or foreign id returns FULLMAKT_PRINCIPAL_NOT_FOUND.",
"examples": [
"11111111-1111-4111-8111-111111111111"
]
},
"reason": {
"description": "Optional operator-facing reason, recorded on the audit row only. Send content or omit — an empty string is rejected.",
"examples": [
"Engagement ended"
],
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"agent_principal_id"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The revocation outcome: `revoked: true`, the `agent_principal` snapshot, and `warnings[]` (empty on the clean path; NAMED tokens otherwise)."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_pricing
Call this BEFORE metered work to check per-call cost and whether billing enforcement is live. Keyless: executes WITHOUT an API key, so an agent can price a workflow before it holds any credential. Returns the machine-readable price list: every credit-metered REST endpoint with its MCP tool name and cost in whole øre (always an integer), the enforcement.live flag (while false nothing is debited and a 402 is impossible), the 402 INSUFFICIENT_CREDITS recovery-contract field list, the top-up bounds with top_up_url, and the how_to_pay_guide URL. Prices derive from the SAME configuration the 402 meter debits, so this surface cannot drift from enforcement. Input: none — call with {}. Failure modes: per-IP rate limiting and transient errors only. For the calling key's own balance, use get_credit_balance (Bearer key required) instead. Docs: https://www.apier.no/docs/guides/billing
入力スキーマ
{
"type": "object",
"properties": {},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The machine-readable price list: per-endpoint/tool costs in whole øre, enforcement.live, the 402 recovery-contract shape, top-up bounds, and the how_to_pay_guide URL."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢get_credit_balance
Call this BEFORE a batch of metered calls to confirm the calling key's prepaid credit balance covers it, and AFTER a 402 INSUFFICIENT_CREDITS + human top-up to verify the funds landed. The balance is ALWAYS the authenticated key's own — no parameters, so reading another key's balance is structurally impossible. Returns api_key_id (non-secret UUID), balance_ore (whole øre, always an integer), currency (NOK), updated_at (null = never topped up = balance 0), and top_up_url (hand it to a human; agents cannot pay directly). For affordability, multiply cost_ore from get_pricing by the planned call count and compare against balance_ore. Free (unmetered), zero side effects. Failure modes: 401 without a key (NOT keyless — use get_pricing for keyless price discovery); SCOPE_INSUFFICIENT (needs read:credits or read:*); CREDIT_BALANCE_UNAVAILABLE (503, retryable — a money read is never fabricated). Under a sandbox bearer it returns SANDBOX_TOOL_UNAVAILABLE. Docs: https://www.apier.no/docs/guides/agent-payments
入力スキーマ
{
"type": "object",
"properties": {},
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The authenticated key's own prepaid balance: api_key_id, balance_ore, currency, updated_at, top_up_url."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}🟢redeem_issuance_token(token)
Convert an owner-issued key-issuance token into your own API key — the headless onboarding step for an agent that holds no credential yet. Keyless: the one-time token IS the credential. Minting and revocation are dashboard-only by design, so an agent can never self-issue authority. Redemption is strictly SINGLE-USE and atomic: on success (201) the token is consumed and the result carries {id, name, scopes, created_at, plaintext_key} — returned EXACTLY ONCE; store it immediately. Failure modes: an expired / used / revoked / unknown token yields ONE uniform ISSUANCE_TOKEN_INVALID failure (ask the owner for a fresh token, never retry); MAX_KEYS_REACHED (409) means 3 active keys — the token was NOT consumed, retry with the SAME token after the owner revokes a key. After onboarding, use get_pricing (keyless) to price metered work and get_credit_balance (with your new key) for the balance. Docs: https://www.apier.no/docs/authentication
入力スキーマ
{
"type": "object",
"properties": {
"token": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "The one-time key-issuance token the account owner minted in the Apier dashboard (Agent issuance tokens) and handed to you out-of-band. Single-use: it is consumed atomically on success. Never logged by Apier.",
"examples": [
"apr_issue_<token_from_the_account_owner>"
]
}
},
"required": [
"token"
],
"additionalProperties": false
}出力スキーマ
{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "The freshly issued API key: id, fixed name, read:* scopes, creation time, and the one-time plaintext_key."
},
"justification": {},
"metadata": {},
"_meta": {}
},
"required": [
"result",
"justification",
"metadata"
],
"description": "Rule 34 envelope; failures set result null + metadata.error_code / retryable / remediation. Contract: https://www.apier.no/docs/mcp"
}推奨プロンプト
search_companiessearch_companiesget_company_summaryget_company_summarylist_acting_capacityコミュニティ
エビデンス