/vat • v1.0.0

EU VAT Triangulation, Chain Logic & VIES Audit Vault API

Deterministic 3-party EU chain evaluation (A → B → C) against EU VAT Directive 2006/112/EC (Articles 36a, 40–42, 138, 141, 197, 226(11a), 265) and CJEU Case C-247/21 (Luxury Trust Automobil), paired with resilient EU VIES verification and SHA-256 signed audit receipts.

27 EU Member States + XICase C-247/21 Wording GuardSHA-256 Audit Receipts

Core REST Endpoints

Base path: https://api.contextapi.dev/vat (or /api/vat via local portal proxy).

Directive 2006/112/EC
Method Path Cost Capabilities
POST /v1/vat/triangulation/evaluate 1 credit Evaluates A → B → C chain eligibility, Art. 36a transport leg, reporting matrix, fallback risk, and mandatory invoice text.
POST /v1/vat/triangulation/batch Pay-Per-Success Evaluate up to 50 EU chains concurrently; upstream EU VIES 502 errors cost 0 credits (1-credit floor).
POST /v1/vat/vies/verify 1 credit Resilient live EU VIES check (with retries & 1h cache) or offline syntax_only check, storing a SHA-256 vies_* receipt.
GET /v1/vat/audit/{receipt_id} & /v1/vat/audit 1 credit Retrieve tenant-isolated vies_* or tri_* cryptographic proof and tier retention metadata.
GET /v1/vat/wording/{country_code} & /v1/vat/member-states 1 credit Mandatory localized Art. 226(11a) "Reverse charge" invoice text, GR → EL normalization, and VAT regexes (27 EU + XI).

Quickstart & Hosted MCP Integration

Gate ERP/OMS invoices deterministically or register https://api.contextapi.dev/vat/mcp in your AI agent.

Quickstart — Evaluate FR → DE → PL Chain

curl -X POST "https://api.contextapi.dev/vat/v1/vat/triangulation/evaluate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "party_a": {"country_code": "FR", "vat_id": "FRXX123456789"},
    "party_b": {"country_code": "DE", "vat_id": "DE123456789"},
    "party_c": {"country_code": "PL", "vat_id": "PL1234567890"},
    "transport_arranger": "A",
    "verify_vies": false
  }'
→ {"eligible": true, "transport_allocated_leg": "A->B", "mandatory_invoice_wording": {"mandatory_phrase_en": "Reverse charge"}}

Hosted Streamable HTTP MCP (4 Tools + Resource)

Register in .cursor/mcp.json (or use npx -y mcp-remote for Claude Desktop):

{
  "mcpServers": {
    "contextapi-vat": {
      "url": "https://api.contextapi.dev/vat/mcp",
      "headers": { "X-API-Key": "${CONTEXTAPI_API_KEY}" }
    }
  }
}
  • evaluate_eu_vat_triangulationTool

    Evaluates A → B → C EU triangulation eligibility, transport-leg rules, and fallback risk with a SHA-256 audit receipt.

  • verify_eu_vat_idTool

    Verifies EU VAT IDs against live EU VIES (with resilient caching) or offline syntax rules and stores cryptographic proof.

  • get_eu_reverse_charge_wordingTool

    Provides mandatory localized Art. 226(11a) reverse-charge invoice wording so invoices stay compliant across member states.

  • list_eu_vat_member_statesTool

    Lists supported EU27 + XI jurisdictions, country code normalizations (e.g. GR → EL), and VAT format rules.

  • contextvat://vault/statusResource

    Exposes live audit vault receipt counts and service readiness for agent pre-flight health checks.