{"openapi":"3.1.0","info":{"title":"Leverandørsjekk API","version":"1.0.0","description":"Aktivitetsavgrenset kontroll av norske leverandører mot offentlige registre, med versjonert evidence, historikk, bulk, overvåking og signerte webhooks. Et verdict er ikke en generell godkjenning eller risikoscore."},"servers":[{"url":"/"}],"x-company-event-types":["company.bankruptcy_status_changed","company.liquidation_status_changed","company.registration_changed","company.accounts_filed","company.management_changed","company.auditor_changed","company.accountant_changed"],"tags":[{"name":"Verification"},{"name":"Watches"},{"name":"Webhooks"},{"name":"Account"},{"name":"Discovery"}],"paths":{"/v1/organizations/{organization_number}":{"get":{"operationId":"getOrganizationProfile","tags":["Discovery"],"parameters":[{"in":"path","name":"organization_number","required":true,"schema":{"type":"string","pattern":"^[0-9 ]{9,11}$"}}],"responses":{"200":{"description":"Canonical Brønnøysund company profile","content":{"json":{"schema":{"type":"object","required":["organization_number","name","status","registrations","latest_accounts"],"properties":{"source_health":{"type":"object","additionalProperties":true},"industry_codes":{"type":"array","items":{"type":"object"}},"accounts_evidence":{"type":["object","null"],"additionalProperties":true},"roles_evidence":{"type":["object","null"],"additionalProperties":true},"name":{"type":"string"},"status":{"type":"object","additionalProperties":true},"organization_form":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"employee_count":{"type":["integer","null"]},"latest_accounts":{"type":"object","properties":{"equity":{"type":["number","null"]},"operating_result":{"type":["number","null"]},"currency":{"type":["string","null"]},"annual_result":{"type":["number","null"]},"revenue":{"type":["number","null"]},"liabilities":{"type":["number","null"]},"profit_before_tax":{"type":["number","null"]},"year":{"type":["integer","null"]},"assets":{"type":["number","null"]},"period":{"type":["object","null"]}}},"accounts_source_health":{"type":"object","additionalProperties":true},"roles_source_health":{"type":"object","additionalProperties":true},"evidence":{"type":"object","additionalProperties":true},"roles":{"type":["object","null"],"properties":{"groups":{"type":"array","items":{"type":"object","required":["code","roles"],"properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"last_changed":{"type":["string","null"],"format":"date"},"roles":{"type":"array","items":{"type":"object","required":["code","holder"],"properties":{"code":{"type":"string"},"description":{"type":["string","null"]},"representative_type":{"type":["string","null"]},"holder":{"type":"object","required":["type","name"],"properties":{"type":{"type":"string","enum":["person","organization"]},"name":{"type":"string"},"organization_number":{"type":["string","null"]}}}}}}}}}}},"registrations":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Organization not found","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Identity source unavailable","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/api-credentials":{"get":{"operationId":"listApiCredentials","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Credentials without secrets","content":{"json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"createApiCredential","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Credential with one-time token","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/supplier-watches/{supplier_watch_id}":{"get":{"operationId":"getSupplierWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"supplier_watch_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Supplier watch","content":{"json":{"schema":{"type":"object","required":["id","organization_number","monitor_company","activities"],"properties":{"id":{"type":"string"},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"organization":{"type":"object","additionalProperties":true},"monitor_company":{"type":"boolean"},"activities":{"type":"array","items":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}},"created_at":{"type":"string","format":"date_time"},"deleted_at":{"type":["string","null"],"format":"date_time"}}}}}},"404":{"description":"Not found","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"delete":{"operationId":"deleteSupplierWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"supplier_watch_id","required":true,"schema":{"type":"string"}}],"description":"Archives the supplier watch and all active activity watches without deleting history.","responses":{"200":{"description":"Archived supplier watch","content":{"json":{"schema":{"type":"object","required":["id","organization_number","monitor_company","activities"],"properties":{"id":{"type":"string"},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"organization":{"type":"object","additionalProperties":true},"monitor_company":{"type":"boolean"},"activities":{"type":"array","items":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}},"created_at":{"type":"string","format":"date_time"},"deleted_at":{"type":["string","null"],"format":"date_time"}}}}}},"404":{"description":"Not found","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/supplier-watches/{supplier_watch_id}/company-monitoring":{"put":{"operationId":"setSupplierCompanyMonitoring","tags":["Watches"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"supplier_watch_id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated supplier watch","content":{"json":{"schema":{"type":"object","required":["id","organization_number","monitor_company","activities"],"properties":{"id":{"type":"string"},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"organization":{"type":"object","additionalProperties":true},"monitor_company":{"type":"boolean"},"activities":{"type":"array","items":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}},"created_at":{"type":"string","format":"date_time"},"deleted_at":{"type":["string","null"],"format":"date_time"}}}}}},"404":{"description":"Not found","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/watches/import":{"post":{"operationId":"importWatchesCsv","tags":["Watches"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"csv":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Row-level import outcome","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/email-notifications":{"get":{"operationId":"listEmailNotifications","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Notification status","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/webhook-deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Delivery status","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/watches/export.csv":{"get":{"operationId":"exportWatchesCsv","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Tenant-scoped CSV export","content":{"csv":{"schema":{"type":"string"}}}}}}},"/v1/activities":{"get":{"operationId":"listActivities","tags":["Discovery"],"responses":{"200":{"description":"Capabilities","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/verifications":{"post":{"operationId":"bulkVerify","tags":["Verification"],"security":[{"bearerAuth":[]}],"description":"API-key authenticated bulk check. Maximum 100 ordered items per request and 500 checks per tenant per minute by default.","requestBody":{"required":true,"content":{"json":{"schema":{"type":"object","required":["checks"],"properties":{"checks":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Ordered results with isolated item errors","content":{"json":{"schema":{"type":"object"}}}},"401":{"description":"API key required","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Bulk rate limit exceeded","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/organizations/search":{"get":{"operationId":"searchOrganizations","tags":["Discovery"],"parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string","minLength":2,"maxLength":100}}],"responses":{"200":{"description":"Explicit organization candidates","content":{"json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid query","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/webhook-deliveries/{delivery_id}/replay":{"post":{"operationId":"replayWebhookDelivery","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"delivery_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Replay delivery","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/verify/{organization_number}":{"get":{"operationId":"verifyOrganization","tags":["Verification"],"description":"Public single check. Add a bearer API key to attribute successful use to your account.","parameters":[{"in":"path","name":"organization_number","required":true,"schema":{"type":"string","pattern":"^[0-9 ]{9,11}$"}},{"in":"query","name":"activity","required":true,"schema":{"type":"string"}},{"in":"query","name":"scope","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current source-backed verdict","content":{"json":{"schema":{"type":"object","required":["organization","activity","registry_verdict","reason","rule_version","source_health","checked_at","basis"],"properties":{"organization":{"type":"object","required":["organization_number"],"properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}},"activity":{"type":"object","description":"The activity and, when required, scope evaluated by the rule.","additionalProperties":true},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"reason":{"type":"string"},"rule_version":{"type":"string","description":"Immutable identifier for the applied rule version."},"source_health":{"type":"string","description":"Health/freshness state of the required public source."},"checked_at":{"type":"string","format":"date_time","description":"When Leverandørsjekk performed this evaluation."},"basis":{"type":"object","description":"Evidence including authority, registry, source observation and source-specific status.","required":["authority","registry"],"additionalProperties":true}}}}}},"400":{"description":"Invalid request","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"501":{"description":"Release-gated activity","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Required identity source unavailable","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/watches":{"get":{"operationId":"listWatches","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Active watches","content":{"json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"createWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Existing watch","content":{"json":{"schema":{"type":"object"}}}},"201":{"description":"Created baseline","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/portfolio":{"get":{"operationId":"getPortfolioSummary","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Direct verdict counts","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Endpoints","content":{"json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public HTTPS endpoint; private and reserved destinations are rejected."}}}}}},"responses":{"201":{"description":"Endpoint with one-time signing secret","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/watches/{watch_id}":{"parameters":[{"in":"path","name":"watch_id","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Watch","content":{"json":{"schema":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}}}},"404":{"description":"Not found","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"put":{"operationId":"replaceWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"description":"Archives the previous watch and creates a separately versioned baseline.","requestBody":{"required":true,"content":{"json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Replacement and previous watch link","content":{"json":{"schema":{"type":"object"}}}},"409":{"description":"Target watch already exists","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"delete":{"operationId":"deleteWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Archived watch","content":{"json":{"schema":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}}}}}}},"/v1/watches/{watch_id}/history":{"get":{"operationId":"getWatchHistory","tags":["Watches"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"watch_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Evaluations and change events","content":{"json":{"schema":{"type":"object"}}}}}}},"/v1/supplier-watches":{"get":{"operationId":"listSupplierWatches","tags":["Watches"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Supplier-grouped watches","content":{"json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"createSupplierWatch","tags":["Watches"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"json":{"schema":{"type":"object","required":["organization_number","activities"],"properties":{"organization_number":{"type":"string","pattern":"^[0-9 ]{9,11}$"},"monitor_company":{"type":"boolean","default":true},"activities":{"type":"array","minItems":1,"items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}}}}}}}},"responses":{"200":{"description":"Existing or extended supplier watch","content":{"json":{"schema":{"type":"object"}}}},"201":{"description":"Created supplier watch","content":{"json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid activities","content":{"json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Tenant-scoped leverandorsjekk_ API key. Session clients additionally require CSRF."}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"Verification":{"type":"object","required":["organization","activity","registry_verdict","reason","rule_version","source_health","checked_at","basis"],"properties":{"organization":{"type":"object","required":["organization_number"],"properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}},"activity":{"type":"object","description":"The activity and, when required, scope evaluated by the rule.","additionalProperties":true},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"reason":{"type":"string"},"rule_version":{"type":"string","description":"Immutable identifier for the applied rule version."},"source_health":{"type":"string","description":"Health/freshness state of the required public source."},"checked_at":{"type":"string","format":"date_time","description":"When Leverandørsjekk performed this evaluation."},"basis":{"type":"object","description":"Evidence including authority, registry, source observation and source-specific status.","required":["authority","registry"],"additionalProperties":true}}},"Watch":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}},"SupplierWatch":{"type":"object","required":["id","organization_number","monitor_company","activities"],"properties":{"id":{"type":"string"},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"organization":{"type":"object","additionalProperties":true},"monitor_company":{"type":"boolean"},"activities":{"type":"array","items":{"type":"object","required":["id","organization_number","activity","registry_verdict"],"properties":{"activity":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"scope":{"type":["string","null"]}}},"id":{"type":"string"},"replacement_watch_id":{"type":["string","null"]},"organization_number":{"type":"string","pattern":"^[0-9]{9}$"},"basis":{"type":"object","additionalProperties":true},"reason":{"type":"string"},"evaluated_at":{"type":["string","null"],"format":"date_time"},"previous_watch_id":{"type":["string","null"]},"registry_verdict":{"type":"string","description":"Activity-specific register verdict: requirement observed as met, observed as not met, or not safely decidable.","enum":["permitted","not_permitted","indeterminate"]},"organization":{"type":"object","properties":{"organization_number":{"type":"string"},"name":{"type":["string","null"]}}}}}},"created_at":{"type":"string","format":"date_time"},"deleted_at":{"type":["string","null"],"format":"date_time"}}}}}}