{"name":"PreFlight Diagnostic API","version":"1.1.0","description":"Programmatic access to the PreFlight Shopify storefront diagnostic engine. Scan any Shopify store and receive a structured health report.","base_url":"https://preflight-t6rf.polsia.app","rate_limit":"20 requests per minute per IP","endpoints":[{"method":"POST","path":"/api/diagnose","description":"Run a full diagnostic on a Shopify store URL.","request":{"content_type":"application/json","body":{"url":{"type":"string","required":true,"example":"https://example.myshopify.com"}}},"response":{"health_score":{"type":"integer","range":"0–100","description":"Overall store health score"},"checks":{"type":"array","description":"Results of each diagnostic check"},"dom_elements_scanned":{"type":"integer","description":"Total DOM elements parsed"},"scan_duration_ms":{"type":"integer","description":"Scan wall-clock time in milliseconds"},"timestamp":{"type":"string","description":"ISO 8601 scan timestamp"},"url":{"type":"string","description":"Normalised URL that was scanned"},"is_shopify":{"type":"boolean","description":"Whether the store was detected as Shopify"},"summary":{"type":"string","description":"Human-readable summary"}},"checks_schema":{"name":{"type":"string","description":"Human-readable check name"},"check_id":{"type":"string","description":"Machine-readable check identifier"},"status":{"type":"string","enum":["pass","fail"],"description":"Pass if no critical/warning issues"},"severity":{"type":"string","enum":["critical","warning","info",null]},"details":{"type":"string","description":"Description of what was found"},"suggested_fix":{"type":"string","description":"Actionable fix (null if passing)"},"issue_count":{"type":"integer","description":"Total issues for this check"}},"example_request":{"url":"https://example.myshopify.com"},"errors":[{"status":400,"reason":"Missing or invalid URL"},{"status":429,"reason":"Rate limit exceeded"},{"status":502,"reason":"Storefront returned HTTP error"},{"status":504,"reason":"Storefront request timed out (15s limit)"}]},{"method":"GET","path":"/api/diagnose","description":"Same as POST but via query parameter. Useful for webhooks and direct URL sharing.","query_params":{"url":{"type":"string","required":true,"example":"/api/diagnose?url=https://example.myshopify.com"}},"response":"Same as POST /api/diagnose"},{"method":"GET","path":"/api/history","description":"Returns the 20 most recent scans.","response":{"type":"array","fields":["id","store_url","score","issues_count","scanned_at"]}},{"method":"GET","path":"/health","description":"Service health check.","response":{"status":"healthy","version":"1.1.0"}}]}