{"openapi":"3.1.0","info":{"title":"SmarterTariff Compliance API","version":"1.0.0","summary":"Fail your deploy when your checkout breaks EAA. Programmatic WCAG 2.2 AA + EAA compliance scans for CI/CD pipelines.","description":"The SmarterTariff Compliance API lets Pro Annual subscribers drop\na single compliance-scan call into their CI/CD pipeline and fail\ndeploys when checkout flows regress on WCAG 2.2 AA / European\nAccessibility Act (EAA) compliance.\n\n**Quickstart**\n\n```bash\ncurl -X POST https://smartertariff.com/api/v1/scan \\\n  -H 'Authorization: Bearer st_live_<your_key>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"url\":\"https://your-checkout.com\",\"audit_type\":\"eaa\"}'\n```\n\n**Generate an SDK in any language**\n\n- Stainless: https://stainless.com (autopilot SDK generation)\n- openapi-generator-cli: `npx @openapitools/openapi-generator-cli generate -i https://smartertariff.com/api/v1/openapi.json -g typescript-fetch`\n- orval: TypeScript hooks + React Query bindings\n- kubb: TypeScript + Zod + clients in one go\n\n**Authentication**\n\nGenerate an API key at https://smartertariff.com/products/settings.\nSend it as `Authorization: Bearer st_live_<key>`. Pro Annual\nsubscribers can create up to 5 keys.\n\n**Rate limits**\n\n- Pro Annual: 30 requests/minute per key\n- Enterprise: 100 requests/minute per key\n\n**Billing**\n\nPro Annual ($2,990/year) includes a monthly bundle of compliance\nscans. Usage above the bundle is billed via Stripe at a per-scan\nmetered rate. See https://smartertariff.com/docs/api for current\nbundle + overage pricing.","contact":{"name":"SmarterTariff Support","email":"hello@sustainable207.com","url":"https://smartertariff.com/connect"},"license":{"name":"Proprietary — Renew EcoMe LLC","url":"https://smartertariff.com/legal/terms"},"termsOfService":"https://smartertariff.com/legal/terms"},"servers":[{"url":"https://smartertariff.com","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"st_live_<32_hex>","description":"Pro Annual API key. Generate at /products/settings."}},"schemas":{"ScanRequest":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"The URL to scan. Bare hostnames (e.g. `example.com`) are accepted and normalized to `https://`.","example":"https://checkout.example.com"},"audit_type":{"type":"string","enum":["eaa","checkout","supply_chain","groundtruth"],"default":"eaa","description":"Which scan pipeline to run.\n- `eaa`: WCAG 2.2 AA + European Accessibility Act compliance\n- `checkout`: Full payment-iframe accessibility audit\n- `supply_chain`: CSRD/CSDDD/UFLPA/EUDR transparency signals\n- `groundtruth`: ESG claim verification + UN SDG alignment"}}},"ScanResponse":{"type":"object","required":["url","audit_type","scanned_at","violation_count","violations"],"properties":{"url":{"type":"string","format":"uri"},"audit_type":{"type":"string","enum":["eaa","checkout","supply_chain","groundtruth"]},"scanned_at":{"type":"string","format":"date-time"},"score":{"type":"number","nullable":true,"minimum":0,"maximum":95,"description":"Compliance score (0–95). 95 is the display ceiling per SmarterTariff scoring methodology. `null` when the scan could not derive a score (visibility gap, robots blocked, etc)."},"eaa_compliant":{"type":"boolean","nullable":true,"description":"Whether the page passed European Accessibility Act compliance criteria. `null` when audit_type does not produce an EAA verdict."},"violation_count":{"type":"integer","minimum":0},"violations":{"type":"array","items":{"$ref":"#/components/schemas/Violation"},"description":"WCAG 2.2 AA violations found. Empty array on a passing scan."},"payment_provider":{"type":"string","nullable":true,"description":"Detected payment provider (`stripe`, `paypal`, `braintree`, `adyen`, `square`, `shopify`, or `null` if not on a checkout page)."},"summary":{"type":"string","description":"Human-readable one-line summary."},"cached":{"type":"boolean","description":"True when served from the 30-day Supabase cache, false when a fresh scan was performed."}}},"Violation":{"type":"object","required":["wcag","impact","description"],"properties":{"wcag":{"type":"string","description":"WCAG 2.2 success criterion reference (e.g. `1.4.3`)."},"impact":{"type":"string","enum":["critical","serious","high","medium","low","minor"]},"description":{"type":"string"},"element":{"type":"string","nullable":true},"remediation":{"type":"string","nullable":true}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"retry_after":{"type":"integer","nullable":true,"description":"Seconds until rate-limit window resets (429 only)."},"upstream_status":{"type":"integer","nullable":true,"description":"Upstream HTTP status (502 only)."}}}}},"paths":{"/api/v1/scan":{"post":{"operationId":"scan","summary":"Run a compliance scan against a URL. Designed for CI/CD pipelines.","description":"Synchronous scan. Returns a structured compliance report. Cached results (≤30 days old) return in ~500ms; fresh scans take 15–60 seconds depending on the audit_type.","tags":["Compliance"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"},"examples":{"eaa":{"summary":"Run an EAA compliance scan","value":{"url":"https://your-checkout.com","audit_type":"eaa"}},"bareDomain":{"summary":"Bare hostname accepted","value":{"url":"nike.com"}}}}}},"responses":{"200":{"description":"Successful scan","headers":{"x-ratelimit-limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"x-ratelimit-window-seconds":{"description":"Window length in seconds","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Active subscription required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","headers":{"retry-after":{"description":"Seconds until window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream scanner unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}