{"openapi":"3.1.0","info":{"title":"W System EU Business Data API (VAT/VIES, EORI, company registry, sanctions, KYB)","description":"EU business data API by W System (the maker): **EU VAT number validation (VIES)**,\n**EORI validation (EC EOS)**, **official company-registry lookup**, **sanctions screening (EU, UN, OFAC SDN, UK)**, **one-call KYB**, a **due-diligence report**,\nand **EU e-invoicing**: validate (EN 16931, XRechnung; UBL, CII, ZUGFeRD/Factur-X PDF), create (JSON -> UBL), 'can I e-invoice this company?' (VIES + Peppol + mandates), and **SANDBOX send** (verify -> create -> route -> transport -> signed evidence; transport = mock, or a real submission through partner Peppol access-point sandboxes: Recommand playground or e-invoice.be sandbox).\n\n* **No API key, no signup:** every client IP gets 20 free calls/day across all endpoints (header `X-Free-Remaining`).\n* **Beyond the free tier:** pay per call with **x402** (USDC on Base, HTTP 402 flow): $0.01 per single check, $0.10 per batch request, $0.045 per KYB check; e-invoice validate $0.03, create $0.08, route $0.02; due-diligence report $0.49.\n* **Live Peppol onboarding (API key):** `GET /einvoice/mandate-terms` returns the W System Peppol mandate terms (https://wsystem.dev/legal/peppol-mandate-terms, DPA: https://wsystem.dev/legal/dpa); `POST /einvoice/mandates` records the company's click-through mandate with a signed receipt. Live sending opens per company once our access-point partner has activated it.\n* **MCP:** the same tools are available to AI agents at `https://api.wsystem.dev/mcp/` (streamable HTTP).\n* VIES/EOS are official European Commission services; this API adds retries when a member state is unavailable, caching,\n  batch endpoints, audit consultation numbers and a stable JSON shape. Docs: https://wsystem.dev/llms.txt","contact":{"name":"W System","url":"https://wsystem.dev/"},"license":{"name":"Proprietary API; MCP server code MIT","url":"https://github.com/wsystemdev/eu-business-data-mcp"},"version":"0.3.20","x-guidance":"EU business verification for agents. GET /verify?vat=IE6388047V validates an EU VAT number via official VIES (name, address, consultation number as audit proof). GET /eori?eori=SE5560360793 validates an EU EORI number. GET /company?q=552032534&country=FR looks up official business registers. GET /sanctions/screen?name=... screens EU/UN/OFAC/UK lists. POST /kyb/check {\"company\":\"FR40303265045\"} returns a pass/review/fail KYB verdict. POST /einvoice/validate (raw UBL/CII XML or ZUGFeRD PDF body) checks EN 16931 + XRechnung rules; POST /einvoice/create turns JSON into a validated UBL invoice (example body: GET /einvoice/sample); GET /einvoice/route?id=BE0403170701 says whether/how to e-invoice a company; POST /ddreport returns a full due-diligence report. Batch POST variants take up to 100 items. First 20 calls/day per IP are free; after that pay per call with x402 (USDC on Base), or send an X-API-Key."},"servers":[{"url":"https://api.wsystem.dev","description":"Production"}],"paths":{"/billing/plans":{"get":{"tags":["Billing"],"summary":"Monthly API-key plans","operationId":"billingPlans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Your API key's plan, monthly quota and units used (free; no units consumed)","operationId":"billingUsage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/checkout":{"post":{"tags":["Billing"],"summary":"Start Stripe Checkout for a monthly plan","operationId":"billingCheckout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/mandate-terms":{"get":{"tags":["E-invoice"],"summary":"Get the Peppol mandate terms to show the signer","operationId":"einvoiceMandateTerms","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/mandates":{"post":{"tags":["E-invoice"],"summary":"Record a company's Peppol mandate (click-through acceptance)","operationId":"createPeppolMandate","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MandateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/mandates/{mid}":{"get":{"tags":["E-invoice"],"summary":"Get one of your Peppol mandate records","operationId":"getPeppolMandate","parameters":[{"name":"mid","in":"path","required":true,"schema":{"type":"string","title":"Mid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/einvoice/mandates/{mid}/revoke":{"post":{"tags":["E-invoice"],"summary":"Revoke a Peppol mandate","operationId":"revokePeppolMandate","parameters":[{"name":"mid","in":"path","required":true,"schema":{"type":"string","title":"Mid"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Liveness check","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vies/status":{"get":{"tags":["VAT"],"summary":"VIES availability per member state (free, cached 5 min)","description":"Proxy of the European Commission VIES check-status endpoint, cached for 5 minutes. Free; does not use the free-tier quota. `national_fallback` = this API can answer from an official national source while that member state is down.","operationId":"viesStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/verify":{"get":{"tags":["VAT"],"summary":"Validate one EU VAT number (VIES)","description":"Check whether an EU VAT number (with country prefix, e.g. IE6388047V, DE811193231, HU33119856) is valid in the official VIES system (GB numbers: HMRC). Returns `status` (valid | invalid | invalid_format | member_state_unavailable | error | not_configured), `valid`, registered `name` and `address` where the member state discloses them, and a `consultation_number` (audit proof) when `requester` is a valid EU VAT. If VIES is down for that member state, `fallback: true` answers come from an official national source (PL Biała lista, CZ ARES, FI YTJ, FR SIRENE) or the last successful VIES result with its date; fallbacks never carry a consultation number. Use for reverse-charge invoicing, customer/supplier onboarding and checkout VAT exemption. Free 20/day per IP, then x402 $0.01.","operationId":"verifyVat","parameters":[{"name":"vat","in":"query","required":true,"schema":{"type":"string","examples":["HU33119856"],"title":"Vat"}},{"name":"requester","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"HU33119856","title":"Requester"}},{"name":"nocache","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Nocache"}},{"name":"fallback","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Fallback"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/verify/batch":{"post":{"tags":["VAT"],"summary":"Validate up to 100 EU VAT numbers","description":"Batch VIES validation. Body: {\"vats\": [...], \"requester\": \"optional own VAT\"}. Same per-item result shape as GET /verify. x402 $0.10 per batch request after the free tier.","operationId":"verifyVatBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/company":{"get":{"tags":["Company"],"summary":"Look up a company in official EU business registers","description":"Search by company name or registry number. `country`: FR (SIREN/SIRET), NO (org.nr), FI (Y-tunnus), CZ (IČO), PL (KRS number), EE (registry code); any other ISO code or LEI uses GLEIF. Returns legal name, registry ID, active status, address, VAT ID, activity code and an official source link. x402 $0.01.","operationId":"lookupCompany","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","examples":["552032534"],"title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","examples":["FR"],"default":"","title":"Country"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":3,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/company/batch":{"post":{"tags":["Company"],"summary":"Batch company-registry lookup (max 25 queries)","description":"Body: {\"queries\":[{\"query\":\"552032534\",\"country\":\"FR\"}], \"limit\":3}. x402 $0.10 per batch request.","operationId":"lookupCompanyBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/sanctions/screen":{"get":{"tags":["Sanctions"],"summary":"Screen a name against EU, UN, OFAC and UK sanctions lists","description":"Fuzzy, transliteration-aware matching of a person or company name against the official EU consolidated list, UN Security Council list, US OFAC SDN and UK sanctions list (downloaded daily). Returns status (potential_match | no_match), scored candidates (0-100), list, programme and DOB. Screening aid only; potential matches need human review. x402 $0.01.","operationId":"screenSanctions","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","examples":["Sberbank"],"title":"Name"}},{"name":"threshold","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":50,"default":85,"title":"Threshold"}},{"name":"birth_year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"lists","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["EU,UN,OFAC,UK"],"title":"Lists"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/sanctions/screen/batch":{"post":{"tags":["Sanctions"],"summary":"Batch sanctions screening (max 50 names)","description":"Body: {\"names\":[...], \"threshold\":85}. x402 $0.10.","operationId":"screenSanctionsBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanctionsBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/kyb/check":{"post":{"tags":["KYB"],"summary":"One-call KYB: VAT + registry + sanctions -> verdict","description":"Know-your-business check of an EU company in one request: VIES VAT validation, official business-register lookup and EU/UN/OFAC/UK sanctions screening, combined into a pass / review / fail verdict with reasons. x402 $0.045.","operationId":"kybCheck","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KybCheck"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.045000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/eori":{"get":{"tags":["EORI"],"summary":"Validate one EU EORI number (EC EOS)","description":"Check an EU EORI (Economic Operators Registration and Identification) number such as SE5560360793 against the official European Commission EOS service. Returns valid/invalid and name/address when the trader consented to publication. Note: GB EORIs are validated by HMRC, not EOS. x402 $0.01.","operationId":"verifyEori","parameters":[{"name":"eori","in":"query","required":true,"schema":{"type":"string","examples":["SE5560360793"],"title":"Eori"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/eori/batch":{"post":{"tags":["EORI"],"summary":"Validate up to 100 EU EORI numbers","description":"Body: {\"eoris\":[...]}. x402 $0.10.","operationId":"verifyEoriBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EoriBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/einvoice/validate":{"post":{"tags":["E-invoice"],"summary":"Validate an EU e-invoice (EN 16931, XRechnung; UBL, CII, ZUGFeRD/Factur-X PDF)","description":"Send the invoice as the raw request body (Content-Type application/xml or application/pdf), or JSON {\"xml\": \"...\"} / {\"base64\": \"<XML or PDF>\"}. Detects UBL Invoice/CreditNote or UN/CEFACT CII (also the XML embedded in a ZUGFeRD/Factur-X PDF), checks the XML schema and the official CEN EN 16931 Schematron rules, plus the KoSIT XRechnung 3.0 rules when the invoice is an XRechnung (or rules=xrechnung). Returns valid true/false and every error with its official rule ID (e.g. BR-CO-10), plain-English message, XPath location, business terms and a fix hint where known. When the seller is Slovak (UBL), it adds Slovak eFaktúra field checks written from the Financial Administration's Peppol BIS transposition v1.12 (0245:DIČ endpoints, addresses, IČO, BT-33, BT-7, VATEX), as warnings with ruleset SK-FS, plus the invoice UUIDv5 cross-check in 'slovakia'. Each error has error_class 'format' (XML Schema) or 'business_rule' (Schematron), with format_error_count and business_rule_error_count; for German invoices (seller or buyer DE, XRechnung or ZUGFeRD) 'germany.de_vat_status' says how the BMF letter of 15 Oct 2026 reads the result (a business-rule error without a format error is in principle still an e-invoice for VAT). For French invoices (seller or buyer FR) 'france' checks the supplier and client SIREN the 2026 reform requires (BT-30 / BT-47 with scheme 0002), suggests the SIREN from an FR VAT number when it is missing, and lists the French items it does not check (hint only; French XP Z12-012 rules not run). Peppol BIS 3 specific rules are not checked yet. Technical check, not tax advice. Free tier shared with other endpoints, then x402 $0.03.","operationId":"validateEinvoice","parameters":[{"name":"rules","in":"query","required":false,"schema":{"type":"string","description":"auto | en16931 | xrechnung","default":"auto","title":"Rules"},"description":"auto | en16931 | xrechnung"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","properties":{"xml":{"type":"string"},"base64":{"type":"string"}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/einvoice/create":{"post":{"tags":["E-invoice"],"summary":"Create a valid EU e-invoice (UBL 2.1) from simple JSON","description":"Turns JSON (seller, buyer, lines with VAT category/rate, payment) into a UBL 2.1 invoice or credit note in format en16931 (plain EN 16931), xrechnung (German XRechnung 3.0) or peppol-bis3 (Peppol BIS Billing 3.0 structure; Peppol-specific rules not checked yet). Totals and the VAT breakdown are computed for you; the result is validated before it is returned (valid, errors, xml). Optional: tax_point_date (BT-7), party company_id + company_id_scheme (BT-30/BT-47), seller legal_form (BT-33). Example body: GET /einvoice/sample. Free tier shared, then x402 $0.08.","operationId":"createEinvoice","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.080000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/einvoice/route":{"get":{"tags":["E-invoice"],"summary":"\"Can I e-invoice this company?\" VAT + Peppol + country mandate lookup","description":"id: an EU VAT number (e.g. BE0403170701) or a Peppol participant id (e.g. 0208:0403170701). Returns the VIES VAT result, whether the company is in the Peppol Directory (participant id, BIS 3 invoice/credit note support), the country's B2B e-invoice mandate (dates, format, channel, source link) and the recommended format for POST /einvoice/create. French PPF directory not included yet. Free tier shared, then x402 $0.02.","operationId":"einvoiceRoute","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","examples":["BE0403170701"],"title":"Id"}},{"name":"requester","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/ddreport":{"post":{"tags":["KYB"],"summary":"Counterparty due-diligence report (VAT, register, sanctions, EORI, LEI, Peppol) with risk flags","description":"One call bundles VIES VAT validation, official business-register lookup, EU/UN/OFAC/UK sanctions screening, EC EORI check, GLEIF LEI record and the Peppol / e-invoice route into a JSON report with deterministic risk flags, a 0-100 risk score, a pass/review/fail verdict, sources and a UTC timestamp for your audit file. Public company data only; not a regulated AML/KYC decision. x402 $0.49.","operationId":"ddReport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DDReport"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.490000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/einvoice/sample":{"get":{"tags":["E-invoice"],"summary":"Example JSON body for POST /einvoice/create (free)","operationId":"einvoiceSample","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/einvoice/send":{"post":{"tags":["E-invoice"],"summary":"SANDBOX: verify buyer -> create -> validate -> route -> transmit (mock or partner Peppol sandbox) -> signed evidence receipt","description":"One call for the whole e-invoice flow. Body: {\"invoice\": <same JSON as POST /einvoice/create>, \"mode\": \"sandbox\", \"transport\": \"mock\"}. Steps: VIES check of buyer.vat_id (invalid VAT stops the flow), sanctions screen of the buyer name, EN 16931 UBL creation + validation (invalid stops the flow), route lookup (Peppol Directory, country mandate, France PPF), transmission via a pluggable transport, and an Ed25519-signed evidence receipt (JWS; public key at GET /einvoice/evidence-key). SANDBOX ONLY. transport: 'mock' (default; transmits nothing), 'recommand' or 'e-invoice-be' (the validated Peppol BIS 3 UBL is really submitted to that Peppol access point's sandbox/playground and the partner document id is returned and signed into the receipt; it is addressed to W System's own sandbox company, never to the buyer, and does not reach the production Peppol network; transmission.transmitted stays false). Partner transports switch invoice.format to peppol-bis3. mode=live sends over production Peppol via e-invoice.be and needs X-API-Key, an active Peppol mandate for invoice.seller.vat_id recorded with that key, W System KYC approval and a provisioned sending account (403 names what is missing); it returns 501 while live sending is switched off. Free tier shared, then x402 $0.08 (same as create).","operationId":"sendEinvoice","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 v2 challenge (PAYMENT-REQUIRED header). Returned when the free tier is used up, or for a bare call without input."},"429":{"description":"Free tier used up and x402 disabled"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.080000"},"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","scheme":"exact"}}],"freeTier":"20 calls/day per IP, no key"}}},"/einvoice/evidence-key":{"get":{"tags":["E-invoice"],"summary":"Public key (JWK) for verifying /einvoice/send evidence receipts (free)","operationId":"einvoiceEvidenceKey","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/einvoice/usage":{"get":{"tags":["E-invoice"],"summary":"Aggregate e-invoice usage counts for the current UTC month (free; no PII)","description":"Day-90 gate helper. live_transmitted counts successful POST /einvoice/send with mode=live and transmission.transmitted=true. Sandbox sends are listed separately and do not count toward the gate. On api.wsystem.dev counts are stored in Postgres and survive redeploys (see the durable field).","operationId":"einvoiceUsage","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"UTC YYYY-MM; default = current month","title":"Period"},"description":"UTC YYYY-MM; default = current month"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Batch":{"properties":{"vats":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Vats"},"requester":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester","default":"HU33119856"}},"type":"object","required":["vats"],"title":"Batch"},"CheckoutReq":{"properties":{"plan":{"type":"string","title":"Plan"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["plan"],"title":"CheckoutReq"},"CompanyBatch":{"properties":{"queries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":25,"minItems":1,"title":"Queries","examples":[[{"country":"FR","query":"552032534"},{"country":"NO","query":"equinor"}]]},"limit":{"type":"integer","maximum":25.0,"minimum":1.0,"title":"Limit","default":3}},"type":"object","required":["queries"],"title":"CompanyBatch"},"DDReport":{"properties":{"company":{"type":"string","title":"Company","description":"EU VAT ID (best), registry number or company name","examples":["FR40303265045"]},"country":{"type":"string","title":"Country","description":"ISO country code, needed when company is a name or registry number","default":""},"threshold":{"type":"number","maximum":100.0,"minimum":50.0,"title":"Threshold","default":85}},"type":"object","required":["company"],"title":"DDReport"},"EoriBatch":{"properties":{"eoris":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Eoris","examples":[["SE5560360793","IE6388047V"]]}},"type":"object","required":["eoris"],"title":"EoriBatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KybCheck":{"properties":{"company":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Company","description":"VAT ID ('FR40303265045'), 'CC:name or registry id' ('NO:equinor'), or {name, vatNumber, country, registryId}","examples":["FR40303265045",{"country":"NO","name":"Equinor ASA"}]},"requester":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester","default":"HU33119856"},"threshold":{"type":"number","maximum":100.0,"minimum":50.0,"title":"Threshold","default":85}},"type":"object","required":["company"],"title":"KybCheck"},"MandateIn":{"properties":{"company_name":{"type":"string","maxLength":200,"minLength":2,"title":"Company Name","examples":["Muster GmbH"]},"company_id":{"type":"string","maxLength":40,"minLength":4,"title":"Company Id","description":"EU VAT number or national enterprise number","examples":["BE0403170701"]},"peppol_id":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Peppol Id","description":"Optional Peppol participant id, e.g. 0208:0403170701"},"company_email":{"type":"string","maxLength":200,"title":"Company Email"},"company_phone":{"type":"string","maxLength":40,"minLength":5,"title":"Company Phone"},"signer_name":{"type":"string","maxLength":120,"minLength":2,"title":"Signer Name","description":"Person granting the mandate"},"signer_role":{"type":"string","maxLength":120,"minLength":2,"title":"Signer Role","description":"Their role, e.g. Managing Director"},"representative_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Representative Name","description":"Company representative (defaults to signer)"},"terms_version":{"type":"string","title":"Terms Version","description":"Version shown to the signer (GET /einvoice/mandate-terms)"},"terms_sha256":{"type":"string","title":"Terms Sha256","description":"sha256 of the exact terms text shown"},"accept":{"type":"boolean","title":"Accept","description":"Must be true: the signer ticked the acceptance box"},"authority_confirmed":{"type":"boolean","title":"Authority Confirmed","description":"Must be true: signer confirms they may bind the company"}},"type":"object","required":["company_name","company_id","company_email","company_phone","signer_name","signer_role","terms_version","terms_sha256","accept","authority_confirmed"],"title":"MandateIn"},"SanctionsBatch":{"properties":{"names":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Names","examples":[["Sberbank","Example Trading Ltd"]]},"threshold":{"type":"number","maximum":100.0,"minimum":50.0,"title":"Threshold","default":85}},"type":"object","required":["names"],"title":"SanctionsBatch"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Optional monthly-plan key. Without it: free tier, then x402 pay-per-call."}}},"tags":[{"name":"VAT","description":"EU VAT number validation via VIES (27 EU states + XI Northern Ireland)"},{"name":"EORI","description":"EU EORI customs number validation via the EC EOS service"},{"name":"Company","description":"Official business-register lookup (FR, NO, FI, CZ, PL, EE; others via GLEIF LEI)"},{"name":"Sanctions","description":"Name screening against EU, UN, OFAC SDN and UK sanctions lists (refreshed daily)"},{"name":"KYB","description":"VAT + registry + sanctions in one call with a pass/review/fail verdict"},{"name":"E-invoice","description":"EU e-invoice validation (EN 16931, XRechnung; UBL, CII, ZUGFeRD/Factur-X PDF) and creation (JSON -> UBL)"}],"externalDocs":{"description":"Guides, prices and MCP setup","url":"https://wsystem.dev/llms-full.txt"},"x-discovery":{"mcp":"https://api.wsystem.dev/mcp/","serverCard":"https://api.wsystem.dev/server-card","x402":"https://api.wsystem.dev/.well-known/x402"}}