W System / Docs / API examples

API examples for every operation

Every one of the 57 operations in the W System API with a copy-paste example in curl, Python, Node.js and PHP. Set WSYSTEM_API_KEY (a free key gives 500 units a month, no card) or leave it unset for the keyless free tier. The SDKs (pip install wsystem, npm i wsystem, composer require wsystem/wsystem-php) have one method per operation, named after the operationId; every call accepts a request id, an idempotency key, extra headers, a timeout and a retry count.

Spec version 0.3.131. Full schemas: api.wsystem.dev/docs. Values are examples only.

Billing

billingPlans

GET /billing/plans: Monthly API-key plans

curl -s "https://api.wsystem.dev/billing/plans" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.billing_plans()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.billingPlans();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->billingPlans();
print_r($result);

billingUsage

GET /billing/usage: Your API key's plan, monthly quota, units used, and paid x402 calls attributed to this key (free; no units consumed)

curl -s "https://api.wsystem.dev/billing/usage" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.billing_usage()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.billingUsage();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->billingUsage();
print_r($result);

billingCheckout

POST /billing/checkout: Start Stripe Checkout for a monthly plan

curl -s -X POST "https://api.wsystem.dev/billing/checkout" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"starter","email":"[email protected]","accept_terms":true}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.billing_checkout({"plan": "starter", "email": "[email protected]", "accept_terms": True})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.billingCheckout({"plan": "starter", "email": "[email protected]", "accept_terms": true});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->billingCheckout(['plan' => 'starter', 'email' => '[email protected]', 'accept_terms' => true]);
print_r($result);

E-invoice

einvoiceMandateTerms

GET /einvoice/mandate-terms: Get the Peppol mandate terms to show the signer

curl -s "https://api.wsystem.dev/einvoice/mandate-terms" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_mandate_terms()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceMandateTerms();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceMandateTerms();
print_r($result);

createPeppolMandate

POST /einvoice/mandates: Record a company's Peppol mandate (click-through acceptance)

curl -s -X POST "https://api.wsystem.dev/einvoice/mandates" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_name":"Muster GmbH","company_id":"DE123456789","peppol_id":"9930:DE123456789","company_email":"[email protected]"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.create_peppol_mandate({"company_name": "Muster GmbH", "company_id": "DE123456789", "peppol_id": "9930:DE123456789", "company_email": "[email protected]"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.createPeppolMandate({"company_name": "Muster GmbH", "company_id": "DE123456789", "peppol_id": "9930:DE123456789", "company_email": "[email protected]"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->createPeppolMandate(['company_name' => 'Muster GmbH', 'company_id' => 'DE123456789', 'peppol_id' => '9930:DE123456789', 'company_email' => '[email protected]']);
print_r($result);

getPeppolMandate

GET /einvoice/mandates/{mid}: Get one of your Peppol mandate records

curl -s "https://api.wsystem.dev/einvoice/mandates/mnd_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_peppol_mandate('mnd_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getPeppolMandate("mnd_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getPeppolMandate('mnd_123');
print_r($result);

revokePeppolMandate

POST /einvoice/mandates/{mid}/revoke: Revoke a Peppol mandate

curl -s -X POST "https://api.wsystem.dev/einvoice/mandates/mnd_123/revoke" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.revoke_peppol_mandate('mnd_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.revokePeppolMandate("mnd_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->revokePeppolMandate('mnd_123');
print_r($result);

einvoiceInbox

GET /einvoice/inbox: LIVE: documents received over Peppol for your mandated companies (X-API-Key)

curl -s "https://api.wsystem.dev/einvoice/inbox" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_inbox()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceInbox();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceInbox();
print_r($result);

einvoiceInboxUbl

GET /einvoice/inbox/{document_id}/ubl: LIVE: signed download link for a received document's original UBL (valid 1 hour)

curl -s "https://api.wsystem.dev/einvoice/inbox/doc_123/ubl" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_inbox_ubl('doc_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceInboxUbl("doc_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceInboxUbl('doc_123');
print_r($result);

einvoiceLiveStatus

GET /einvoice/live/{document_id}: LIVE: delivery state of a document you sent with mode=live (TRANSIT -> SENT, or FAILED = not charged)

curl -s "https://api.wsystem.dev/einvoice/live/doc_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_live_status('doc_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceLiveStatus("doc_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceLiveStatus('doc_123');
print_r($result);

validateEinvoice

POST /einvoice/validate: Validate an EU e-invoice (EN 16931, XRechnung; UBL, CII, ZUGFeRD/Factur-X PDF)

curl -s -X POST "https://api.wsystem.dev/einvoice/validate" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<Invoice>...</Invoice>"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.validate_einvoice({"xml": "<Invoice>...</Invoice>"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.validateEinvoice({"xml": "<Invoice>...</Invoice>"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->validateEinvoice(['xml' => '<Invoice>...</Invoice>']);
print_r($result);

parseEinvoice

POST /einvoice/parse: Read an incoming EU e-invoice (UBL, CII, ZUGFeRD/Factur-X PDF) into JSON

curl -s -X POST "https://api.wsystem.dev/einvoice/parse" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<Invoice>...</Invoice>"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.parse_einvoice({"xml": "<Invoice>...</Invoice>"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.parseEinvoice({"xml": "<Invoice>...</Invoice>"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->parseEinvoice(['xml' => '<Invoice>...</Invoice>']);
print_r($result);

createEinvoice

POST /einvoice/create: Create a valid EU e-invoice (UBL 2.1, CII, ZUGFeRD/Factur-X PDF) from simple JSON

curl -s -X POST "https://api.wsystem.dev/einvoice/create" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format":"zugferd","invoice_number":"CN-2026-001","type_code":"381","preceding_invoice":"RE-2026-017","preceding_invoice_date":"2026-10-18","issue_date":"2026-11-23","currency":"EUR","seller":{"name":"Muster GmbH","vat_id":"DE123456789","street":"Hauptstr. 1","city":"Berlin","postal_code":"10115","country":"DE"},"buyer":{"name":"Kunde AG","street":"Weg 5","city":"Wien","postal_code":"1010","country":"AT"},"lines":[{"description":"Widget (returned)","quantity":1,"unit_price":100.0,"vat_rate":19,"vat_category":"S"}]}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.create_einvoice({"format": "zugferd", "invoice_number": "CN-2026-001", "type_code": "381", "preceding_invoice": "RE-2026-017", "preceding_invoice_date": "2026-10-18", "issue_date": "2026-11-23", "currency": "EUR", "seller": {"name": "Muster GmbH", "vat_id": "DE123456789", "street": "Hauptstr. 1", "city": "Berlin", "postal_code": "10115", "country": "DE"}, "buyer": {"name": "Kunde AG", "street": "Weg 5", "city": "Wien", "postal_code": "1010", "country": "AT"}, "lines": [{"description": "Widget (returned)", "quantity": 1, "unit_price": 100.0, "vat_rate": 19, "vat_category": "S"}]})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.createEinvoice({"format": "zugferd", "invoice_number": "CN-2026-001", "type_code": "381", "preceding_invoice": "RE-2026-017", "preceding_invoice_date": "2026-10-18", "issue_date": "2026-11-23", "currency": "EUR", "seller": {"name": "Muster GmbH", "vat_id": "DE123456789", "street": "Hauptstr. 1", "city": "Berlin", "postal_code": "10115", "country": "DE"}, "buyer": {"name": "Kunde AG", "street": "Weg 5", "city": "Wien", "postal_code": "1010", "country": "AT"}, "lines": [{"description": "Widget (returned)", "quantity": 1, "unit_price": 100.0, "vat_rate": 19, "vat_category": "S"}]});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->createEinvoice(['format' => 'zugferd', 'invoice_number' => 'CN-2026-001', 'type_code' => '381', 'preceding_invoice' => 'RE-2026-017', 'preceding_invoice_date' => '2026-10-18', 'issue_date' => '2026-11-23', 'currency' => 'EUR', 'seller' => ['name' => 'Muster GmbH', 'vat_id' => 'DE123456789', 'street' => 'Hauptstr. 1', 'city' => 'Berlin', 'postal_code' => '10115', 'country' => 'DE'], 'buyer' => ['name' => 'Kunde AG', 'street' => 'Weg 5', 'city' => 'Wien', 'postal_code' => '1010', 'country' => 'AT'], 'lines' => [['description' => 'Widget (returned)', 'quantity' => 1, 'unit_price' => 100.0, 'vat_rate' => 19, 'vat_category' => 'S']]]);
print_r($result);

einvoiceRoute

GET /einvoice/route: "Can I e-invoice this company?" VAT + Peppol + country mandate lookup

curl -s "https://api.wsystem.dev/einvoice/route?id=0208:0403170701" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_route('0208:0403170701')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceRoute("0208:0403170701");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceRoute('0208:0403170701');
print_r($result);

frPaRegistry

GET /fr/pa-registry: Is this platform on France's official list of Plateformes Agréées (PA)? (free)

curl -s "https://api.wsystem.dev/fr/pa-registry?limit=5" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.fr_pa_registry(limit=5)
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.frPaRegistry({"limit": 5});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->frPaRegistry(['limit' => 5]);
print_r($result);

extractEinvoiceFromPdf

POST /einvoice/extract: AI draft from a plain PDF invoice -> EN 16931 / XRechnung (for review)

curl -s -X POST "https://api.wsystem.dev/einvoice/extract?format=zugferd" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.extract_einvoice_from_pdf({}, format='zugferd')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.extractEinvoiceFromPdf({}, {"format": "zugferd"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->extractEinvoiceFromPdf([], ['format' => 'zugferd']);
print_r($result);

einvoiceSample

GET /einvoice/sample: Example JSON body for POST /einvoice/create (free)

curl -s "https://api.wsystem.dev/einvoice/sample?type=credit_note" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_sample(type='credit_note')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceSample({"type": "credit_note"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceSample(['type' => 'credit_note']);
print_r($result);

sendEinvoice

POST /einvoice/send: SANDBOX: verify buyer -> create -> validate -> route -> transmit (mock or partner Peppol sandbox) -> signed evidence receipt

curl -s -X POST "https://api.wsystem.dev/einvoice/send" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"mode":"sandbox","invoice":{"format":"zugferd","invoice_number":"CN-2026-001","type_code":"381","preceding_invoice":"RE-2026-017","preceding_invoice_date":"2026-10-18","issue_date":"2026-11-23","currency":"EUR","seller":{"name":"Muster GmbH","vat_id":"DE123456789","street":"Hauptstr. 1","city":"Berlin","postal_code":"10115","country":"DE"},"buyer":{"name":"Kunde AG","street":"Weg 5","city":"Wien","postal_code":"1010","country":"AT"},"lines":[{"description":"Widget (returned)","quantity":1,"unit_price":100.0,"vat_rate":19,"vat_category":"S"}]}}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.send_einvoice({"mode": "sandbox", "invoice": {"format": "zugferd", "invoice_number": "CN-2026-001", "type_code": "381", "preceding_invoice": "RE-2026-017", "preceding_invoice_date": "2026-10-18", "issue_date": "2026-11-23", "currency": "EUR", "seller": {"name": "Muster GmbH", "vat_id": "DE123456789", "street": "Hauptstr. 1", "city": "Berlin", "postal_code": "10115", "country": "DE"}, "buyer": {"name": "Kunde AG", "street": "Weg 5", "city": "Wien", "postal_code": "1010", "country": "AT"}, "lines": [{"description": "Widget (returned)", "quantity": 1, "unit_price": 100.0, "vat_rate": 19, "vat_category": "S"}]}}, options={"idempotency_key": "order-1042-send"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.sendEinvoice({"mode": "sandbox", "invoice": {"format": "zugferd", "invoice_number": "CN-2026-001", "type_code": "381", "preceding_invoice": "RE-2026-017", "preceding_invoice_date": "2026-10-18", "issue_date": "2026-11-23", "currency": "EUR", "seller": {"name": "Muster GmbH", "vat_id": "DE123456789", "street": "Hauptstr. 1", "city": "Berlin", "postal_code": "10115", "country": "DE"}, "buyer": {"name": "Kunde AG", "street": "Weg 5", "city": "Wien", "postal_code": "1010", "country": "AT"}, "lines": [{"description": "Widget (returned)", "quantity": 1, "unit_price": 100.0, "vat_rate": 19, "vat_category": "S"}]}}, {}, { idempotencyKey: "order-1042-send" });
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->sendEinvoice(['mode' => 'sandbox', 'invoice' => ['format' => 'zugferd', 'invoice_number' => 'CN-2026-001', 'type_code' => '381', 'preceding_invoice' => 'RE-2026-017', 'preceding_invoice_date' => '2026-10-18', 'issue_date' => '2026-11-23', 'currency' => 'EUR', 'seller' => ['name' => 'Muster GmbH', 'vat_id' => 'DE123456789', 'street' => 'Hauptstr. 1', 'city' => 'Berlin', 'postal_code' => '10115', 'country' => 'DE'], 'buyer' => ['name' => 'Kunde AG', 'street' => 'Weg 5', 'city' => 'Wien', 'postal_code' => '1010', 'country' => 'AT'], 'lines' => [['description' => 'Widget (returned)', 'quantity' => 1, 'unit_price' => 100.0, 'vat_rate' => 19, 'vat_category' => 'S']]]], [], ['idempotencyKey' => 'order-1042-send']);
print_r($result);

preflightEinvoice

POST /einvoice/preflight: Safe send: check the buyer and the invoice before sending (VAT, Peppol, sanctions, EN 16931) -> ok / warn / block

curl -s -X POST "https://api.wsystem.dev/einvoice/preflight" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<Invoice>...</Invoice>"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.preflight_einvoice({"xml": "<Invoice>...</Invoice>"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.preflightEinvoice({"xml": "<Invoice>...</Invoice>"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->preflightEinvoice(['xml' => '<Invoice>...</Invoice>']);
print_r($result);

einvoiceEvidenceKey

GET /einvoice/evidence-key: Public key (JWK) for verifying /einvoice/send evidence receipts (free)

curl -s "https://api.wsystem.dev/einvoice/evidence-key" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_evidence_key()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceEvidenceKey();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceEvidenceKey();
print_r($result);

einvoiceUsage

GET /einvoice/usage: Aggregate e-invoice usage counts for the current UTC month (free; no PII)

curl -s "https://api.wsystem.dev/einvoice/usage?period=2026-11" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.einvoice_usage(period='2026-11')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.einvoiceUsage({"period": "2026-11"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->einvoiceUsage(['period' => '2026-11']);
print_r($result);

Platform

listPlatformCompanies

GET /platform/companies: List the client companies under your key: onboarding stage, live readiness and per-company live document counts

curl -s "https://api.wsystem.dev/platform/companies" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.list_platform_companies()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.listPlatformCompanies();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->listPlatformCompanies();
print_r($result);

getPlatformCompany

GET /platform/companies/{mandate_id}: One client company under your key: onboarding stage, next step and live document counts

curl -s "https://api.wsystem.dev/platform/companies/mnd_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_platform_company('mnd_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getPlatformCompany("mnd_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getPlatformCompany('mnd_123');
print_r($result);

setPlatformWebhook

POST /platform/webhook: Set or replace your webhook URL for company.stage_changed (signing secret returned once)

curl -s -X POST "https://api.wsystem.dev/platform/webhook" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/wsystem"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.set_platform_webhook({"url": "https://example.com/hooks/wsystem"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.setPlatformWebhook({"url": "https://example.com/hooks/wsystem"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->setPlatformWebhook(['url' => 'https://example.com/hooks/wsystem']);
print_r($result);

getPlatformWebhook

GET /platform/webhook: Your webhook URL and its recent deliveries (the secret is never shown again)

curl -s "https://api.wsystem.dev/platform/webhook" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_platform_webhook()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getPlatformWebhook();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getPlatformWebhook();
print_r($result);

deletePlatformWebhook

DELETE /platform/webhook: Remove your webhook

curl -s -X DELETE "https://api.wsystem.dev/platform/webhook" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.delete_platform_webhook()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.deletePlatformWebhook();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->deletePlatformWebhook();
print_r($result);

testPlatformWebhook

POST /platform/webhook/test: Send a signed webhook.test event to your URL now and return the delivery result

curl -s -X POST "https://api.wsystem.dev/platform/webhook/test" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.test_platform_webhook()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.testPlatformWebhook();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->testPlatformWebhook();
print_r($result);

getPlatformUsage

GET /platform/usage: Platform plan: this month's checked documents, Peppol documents, active companies and cost estimate (free)

curl -s "https://api.wsystem.dev/platform/usage" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_platform_usage()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getPlatformUsage();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getPlatformUsage();
print_r($result);

setPlatformSpendCap

PUT /platform/spend-cap: Platform plan: set or remove an optional monthly spend cap in EUR (calls that would exceed it get 429, nothing charged)

curl -s -X PUT "https://api.wsystem.dev/platform/spend-cap" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"monthly_cap_eur":50}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.set_platform_spend_cap({"monthly_cap_eur": 50})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.setPlatformSpendCap({"monthly_cap_eur": 50});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->setPlatformSpendCap(['monthly_cap_eur' => 50]);
print_r($result);

Inbox

checkReceivedInvoice

POST /einvoice/check: Check a received invoice before paying it: e-invoice rules, supplier VAT + sanctions, amounts, IBAN, duplicates, bank-detail changes -> ok / review / hold

curl -s -X POST "https://api.wsystem.dev/einvoice/check" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<Invoice>...</Invoice>"}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.check_received_invoice({"xml": "<Invoice>...</Invoice>"})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.checkReceivedInvoice({"xml": "<Invoice>...</Invoice>"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->checkReceivedInvoice(['xml' => '<Invoice>...</Invoice>']);
print_r($result);

listInboxInvoices

GET /inbox/invoices: Your checked received invoices, newest first (free)

curl -s "https://api.wsystem.dev/inbox/invoices?limit=5" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.list_inbox_invoices(limit=5)
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.listInboxInvoices({"limit": 5});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->listInboxInvoices(['limit' => 5]);
print_r($result);

getInboxInvoice

GET /inbox/invoices/{iid}: One checked invoice with its full check result (free)

curl -s "https://api.wsystem.dev/inbox/invoices/inv_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_inbox_invoice('inv_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getInboxInvoice("inv_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getInboxInvoice('inv_123');
print_r($result);

deleteInboxInvoice

DELETE /inbox/invoices/{iid}: Delete one invoice from your inbox history (free)

curl -s -X DELETE "https://api.wsystem.dev/inbox/invoices/inv_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.delete_inbox_invoice('inv_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.deleteInboxInvoice("inv_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->deleteInboxInvoice('inv_123');
print_r($result);

getInboxAddress

GET /inbox/address: Your own email intake address: forward supplier invoices there (free)

curl -s "https://api.wsystem.dev/inbox/address" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.get_inbox_address()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.getInboxAddress();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->getInboxAddress();
print_r($result);

rotateInboxAddress

POST /inbox/address/rotate: Issue a new intake address; the old one stops working (free)

curl -s -X POST "https://api.wsystem.dev/inbox/address/rotate" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.rotate_inbox_address()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.rotateInboxAddress();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->rotateInboxAddress();
print_r($result);

KSeF (Poland)

ksefInfo

GET /einvoice/ksef: Poland KSeF connector: what works, environment, how to connect (free)

curl -s "https://api.wsystem.dev/einvoice/ksef" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_info()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefInfo();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefInfo();
print_r($result);

ksefConnect

POST /einvoice/ksef/connections: Connect a company's KSeF account (TEST, or DEMO if enabled): store its KSeF token encrypted after a sign-in check

curl -s -X POST "https://api.wsystem.dev/einvoice/ksef/connections" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_connect({})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefConnect({});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefConnect([]);
print_r($result);

ksefConnections

GET /einvoice/ksef/connections: List the KSeF connections (companies) under your API key

curl -s "https://api.wsystem.dev/einvoice/ksef/connections" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_connections()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefConnections();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefConnections();
print_r($result);

ksefTestCompany

POST /einvoice/ksef/test-company: Create a fictitious company in KSeF TEST (random NIP) and connect it, to try KSeF sending end to end

curl -s -X POST "https://api.wsystem.dev/einvoice/ksef/test-company" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_test_company({})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefTestCompany({});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefTestCompany([]);
print_r($result);

ksefAuthChallenge

POST /einvoice/ksef/auth/challenge: Start certificate sign-in: get a KSeF challenge and the unsigned AuthTokenRequest XML to sign externally

curl -s -X POST "https://api.wsystem.dev/einvoice/ksef/auth/challenge" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_auth_challenge({})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefAuthChallenge({});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefAuthChallenge([]);
print_r($result);

ksefAuthComplete

POST /einvoice/ksef/auth/complete: Finish certificate sign-in: accept the signed AuthTokenRequest, enroll a KSeF Authentication certificate, store it encrypted

curl -s -X POST "https://api.wsystem.dev/einvoice/ksef/auth/complete" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_auth_complete({})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefAuthComplete({});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefAuthComplete([]);
print_r($result);

ksefDisconnect

DELETE /einvoice/ksef/connections/{cid}: Revoke a KSeF connection: the stored KSeF token is deleted at once

curl -s -X DELETE "https://api.wsystem.dev/einvoice/ksef/connections/conn_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_disconnect('conn_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefDisconnect("conn_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefDisconnect('conn_123');
print_r($result);

ksefInvoiceStatus

GET /einvoice/ksef/invoices/{sid}: KSeF status of a sent invoice: processing / accepted (KSeF number) / rejected (code and reason) (free)

curl -s "https://api.wsystem.dev/einvoice/ksef/invoices/ses_123" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_invoice_status('ses_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefInvoiceStatus("ses_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefInvoiceStatus('ses_123');
print_r($result);

ksefInvoiceUpo

GET /einvoice/ksef/invoices/{sid}/upo: UPO (official KSeF receipt, XML signed by the Ministry of Finance) of an accepted invoice (free)

curl -s "https://api.wsystem.dev/einvoice/ksef/invoices/ses_123/upo" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_invoice_upo('ses_123')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefInvoiceUpo("ses_123");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefInvoiceUpo('ses_123');
print_r($result);

ksefInvoices

GET /einvoice/ksef/invoices: List invoices sent to KSeF under your API key (newest first, free)

curl -s "https://api.wsystem.dev/einvoice/ksef/invoices?limit=5" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.ksef_invoices(limit=5)
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ksefInvoices({"limit": 5});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ksefInvoices(['limit' => 5]);
print_r($result);

General

health

GET /health: Liveness check

curl -s "https://api.wsystem.dev/health" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.health()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.health();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->health();
print_r($result);

VAT

viesStatus

GET /vies/status: VIES availability per member state (free, cached 5 min)

curl -s "https://api.wsystem.dev/vies/status" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.vies_status()
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.viesStatus();
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->viesStatus();
print_r($result);

verifyVat

GET /verify: Validate one EU VAT number (VIES)

curl -s "https://api.wsystem.dev/verify?vat=BE0403170701&nocache=true" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.verify_vat('BE0403170701', nocache='true')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.verifyVat("BE0403170701", {"nocache": "true"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->verifyVat('BE0403170701', ['nocache' => 'true']);
print_r($result);

verifyVatBatch

POST /verify/batch: Validate up to 100 EU VAT numbers

curl -s -X POST "https://api.wsystem.dev/verify/batch" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vats":["BE0403170701","DE811569869"]}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.verify_vat_batch({"vats": ["BE0403170701", "DE811569869"]})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.verifyVatBatch({"vats": ["BE0403170701", "DE811569869"]});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->verifyVatBatch(['BE0403170701', 'DE811569869']);
print_r($result);

Company

lookupCompany

GET /company: Look up a company in official EU business registers

curl -s "https://api.wsystem.dev/company?q=Electrabel&country=BE&limit=5" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.lookup_company('Electrabel', country='BE', limit=5)
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.lookupCompany("Electrabel", {"country": "BE", "limit": 5});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->lookupCompany('Electrabel', ['country' => 'BE', 'limit' => 5]);
print_r($result);

lookupCompanyBatch

POST /company/batch: Batch company-registry lookup (max 25 queries)

curl -s -X POST "https://api.wsystem.dev/company/batch" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"queries":[{"q":"Electrabel","country":"BE"}]}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.lookup_company_batch({"queries": [{"q": "Electrabel", "country": "BE"}]})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.lookupCompanyBatch({"queries": [{"q": "Electrabel", "country": "BE"}]});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->lookupCompanyBatch(['queries' => [['q' => 'Electrabel', 'country' => 'BE']]]);
print_r($result);

Sanctions

screenSanctions

GET /sanctions/screen: Screen a name against EU, UN, OFAC and UK sanctions lists

curl -s "https://api.wsystem.dev/sanctions/screen?name=Acme Trading&country=BE" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.screen_sanctions('Acme Trading', country='BE')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.screenSanctions("Acme Trading", {"country": "BE"});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->screenSanctions('Acme Trading', ['country' => 'BE']);
print_r($result);

screenSanctionsBatch

POST /sanctions/screen/batch: Batch sanctions screening (max 50 names)

curl -s -X POST "https://api.wsystem.dev/sanctions/screen/batch" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"names":["Acme Trading"]}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.screen_sanctions_batch({"names": ["Acme Trading"]})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.screenSanctionsBatch({"names": ["Acme Trading"]});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->screenSanctionsBatch(['names' => ['Acme Trading']]);
print_r($result);

KYB

kybCheck

POST /kyb/check: One-call KYB: VAT + registry + sanctions -> verdict

curl -s -X POST "https://api.wsystem.dev/kyb/check" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company":{"name":"Electrabel","country":"BE","vat":"BE0403170701"}}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.kyb_check({"company": {"name": "Electrabel", "country": "BE", "vat": "BE0403170701"}})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.kybCheck({"company": {"name": "Electrabel", "country": "BE", "vat": "BE0403170701"}});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->kybCheck(['name' => 'Electrabel', 'country' => 'BE', 'vat' => 'BE0403170701']);
print_r($result);

ddReport

POST /ddreport: Counterparty due-diligence report (VAT, register, sanctions, EORI, LEI, Peppol) with risk flags

curl -s -X POST "https://api.wsystem.dev/ddreport" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company":{"name":"Electrabel","country":"BE"}}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.dd_report({"company": {"name": "Electrabel", "country": "BE"}})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.ddReport({"company": {"name": "Electrabel", "country": "BE"}});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->ddReport(['company' => ['name' => 'Electrabel', 'country' => 'BE']]);
print_r($result);

EORI

verifyEori

GET /eori: Validate one EU EORI number (EC EOS)

curl -s "https://api.wsystem.dev/eori?eori=DE123456789012345" \
  -H "X-API-Key: $WSYSTEM_API_KEY"
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.verify_eori('DE123456789012345')
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.verifyEori("DE123456789012345");
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->verifyEori('DE123456789012345');
print_r($result);

verifyEoriBatch

POST /eori/batch: Validate up to 100 EU EORI numbers

curl -s -X POST "https://api.wsystem.dev/eori/batch" \
  -H "X-API-Key: $WSYSTEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"eoris":["DE123456789012345"]}'
# pip install wsystem
from wsystem import WSystem

ws = WSystem()  # reads WSYSTEM_API_KEY
result = ws.verify_eori_batch({"eoris": ["DE123456789012345"]})
print(result)
import { WSystem } from "wsystem";

const ws = new WSystem(); // reads WSYSTEM_API_KEY
const result = await ws.verifyEoriBatch({"eoris": ["DE123456789012345"]});
console.log(result);
<?php
require 'vendor/autoload.php';

$ws = new \WSystem\WSystem(); // reads WSYSTEM_API_KEY
$result = $ws->verifyEoriBatch(['DE123456789012345']);
print_r($result);

W System is the maker of this API. Not legal or tax advice.