{
  "openapi": "3.1.0",
  "info": {
    "title": "AstraNL counterparty check",
    "version": "2",
    "description": "Check a Dutch supplier before you pay. Verdicts from the KVK Handelsregister, EU VIES and the EU sanctions list: whether the KvK number has an active registration, whether the name matches a registered name, whether the VAT number is valid and belongs to that registration. No register data is passed on and the register is not searched by name. Read-only, no key, no cost. The answer is signed with the AstraNL node key. It does not prove who may sign for the company, who owns a bank account, solvency or reliability."
  },
  "servers": [{"url": "https://astranl.com"}],
  "paths": {
    "/api/verify/counterparty": {
      "get": {
        "operationId": "checkCounterparty",
        "summary": "Check a Dutch or EU supplier against official sources before paying or signing",
        "description": "Pass the KvK number, the company name and the VAT number exactly as the invoice or document states them. Read verification.dutch_register for the Dutch register verdicts and its open_questions list; if it lists anything besides solvency, stop and ask a human before paying. verification.checks holds the VIES and sanctions results. Keep digest_sha256 and signature with your approval record.",
        "parameters": [
          {"name": "kvk", "in": "query", "required": false, "description": "Dutch KvK number, 8 digits, as printed on the document", "schema": {"type": "string", "maxLength": 12}},
          {"name": "name", "in": "query", "required": false, "description": "Company name exactly as the document states it", "schema": {"type": "string", "maxLength": 200}},
          {"name": "vat", "in": "query", "required": false, "description": "EU VAT number with country prefix, for example NL810433941B01", "schema": {"type": "string", "maxLength": 20}}
        ],
        "responses": {
          "200": {
            "description": "Signed composition. verification.dutch_register holds registry.status and active_registration, name_check.result, vat.valid and vat.vies_name_vs_register, sanctions candidates, open_questions and check_id.",
            "content": {"application/json": {"schema": {"type": "object"}}}
          }
        }
      }
    }
  }
}
