{"openapi": "3.1.0", "info": {"title": "CrossBorder-Empire-OS API (W4-F04)", "version": "1.0.0", "description": "Unified 5-stage cross-border trade operating engine: Atom (BOM/SKU decomposition & risk tree), Tax (Decimal landed cost, Section 301/MPF/HMF/VAT/IOSS/JCT & net margin), Ship (3D carton & FBA size-tier cliff optimizer + Commercial Invoice & Packing List), Localize (en-US/de-DE/fr-FR/ja-JP compliance & listings), and Clock (multi-country holiday CPM launch scheduler). Strictly $0 charge on invalid/empty/refused requests. Zero BOM/Trade-Secret Reselling."}, "servers": [{"url": "https://crossborder.fastmesh.dev", "description": "Production HTTPS Gateway"}, {"url": "http://127.0.0.1:9024", "description": "Local Engine"}], "paths": {"/health": {"get": {"operationId": "getHealth", "summary": "Service health, uptime, rules status, capabilities & billing telemetry", "responses": {"200": {"description": "Healthy"}}}}, "/openapi.json": {"get": {"operationId": "getOpenApiSpec", "summary": "OpenAPI 3.1.0 specification JSON", "responses": {"200": {"description": "OpenAPI document"}}}}, "/v1/crossborder/landed-cost": {"post": {"operationId": "calculateLandedCost", "summary": "Stage 2 (Tax): Exact Decimal landed cost, customs duties, VAT/JCT, MPF/HMF & net margin ($0.04)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Multi-market Decimal landed cost & margin analysis"}, "422": {"description": "Invalid input or compliance refusal ($0 charged)"}}}}, "/v1/crossborder/optimize-ship": {"post": {"operationId": "optimizeShippingCarton", "summary": "Stage 3 (Ship): 3D carton packer, 4-mode freight compare, FBA cliff tweaks & CI/PL ($0.04)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Carton optimization, FBA tier savings & reconciled CI/PL"}, "422": {"description": "Invalid input or compliance refusal ($0 charged)"}}}}, "/v1/crossborder/compliance-localize": {"post": {"operationId": "compileComplianceLocalization", "summary": "Stage 4 (Localize): US/DE/FR/JP compliance pre-screen, native listings, warnings & claim blocker ($0.05)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "4-locale compliance & localization dossier"}, "422": {"description": "Invalid input or compliance refusal ($0 charged)"}}}}, "/v1/crossborder/launch-clock": {"post": {"operationId": "planLaunchClock", "summary": "Stage 5 (Clock): Forward/backward CPM cross-border launch scheduler with CN/US/DE/FR/JP holidays ($0.03)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "CPM schedule, critical path, slack & latest factory PO date"}, "422": {"description": "Invalid date, DAG cycle or refusal ($0 charged)"}}}}, "/v1/crossborder/compile-dossier": {"post": {"operationId": "compileCrossborderDossier", "summary": "Full 5-stage Atom->Tax->Ship->Localize->Clock pipeline from JSON or CSV BOM ($0.15)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}, "text/csv": {"schema": {"type": "string"}}}}, "responses": {"200": {"description": "Complete 5-stage cross-border launch dossier with SHA-256 receipt"}, "422": {"description": "Invalid/empty BOM or compliance refusal ($0 charged)"}}}}, "/v1/wallet/{tenant_id}": {"get": {"operationId": "getTenantWallet", "summary": "Query never-expiring prepaid credit wallet balance", "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Tenant wallet balance"}}}}, "/webhooks/creem": {"post": {"operationId": "handleCreemWebhook", "summary": "Creem HMAC-SHA256 webhook receiver with idempotent credit grant", "responses": {"200": {"description": "Webhook processed"}, "401": {"description": "Invalid creem-signature"}}}}, "/mcp": {"post": {"operationId": "handleMcpJsonRpc", "summary": "Native JSON-RPC 2.0 MCP endpoint (initialize, notifications/initialized, tools/list, tools/call)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "JSON-RPC 2.0 response"}}}}}}