{"openapi":"3.1.0","info":{"title":"compatsy API","version":"0.1.0","description":"Product specs, side-by-side comparison, rule-based fit checks and verified prices for printer, nozzle, hotend, build_plate, filament, enclosure. Same handlers as the MCP server at /3d-printing/mcp. Links are affiliate links; we may earn a commission. The default link is the lowest in-stock price regardless of commission."},"servers":[{"url":"https://compatsy.com/3d-printing"}],"security":[{},{"bearer":[]}],"paths":{"/api/v1/search":{"get":{"operationId":"search_products","summary":"Search products","description":"Find products by name or by category and spec filters; returns key specs and the best in-stock offer. Example: {\"query\":\"0.4 hardened nozzle\",\"category\":\"nozzle\",\"limit\":5}","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":25}},{"name":"filters","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string"}},"description":"Any spec field as a query parameter, e.g. material=brass"}],"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/api/v1/products/{id}":{"get":{"operationId":"get_product","summary":"Get product details","description":"Full specs with per-field confidence and source, every offer with verified time, 30/90-day price range. Example: {\"product_id\":\"prusa-mk4s\"}","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Product id or slug"}],"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/api/v1/compare":{"get":{"operationId":"compare","summary":"Compare products","description":"Side-by-side spec table with offers and the fields that differ. Pass 2-10 product_ids, or a category with filters. Example: {\"product_ids\":[\"e3d-v6-brass-0-4\",\"bondtech-cht-0-4\"]}","parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"string"},"description":"2-10 comma-separated product ids or slugs"},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10}},{"name":"filters","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string"}},"description":"Any spec field as a query parameter, e.g. material=brass"}],"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/api/v1/fit/{subject}/{target}":{"get":{"operationId":"check_fit","summary":"Check fit","description":"Does this part fit that machine? Returns a verdict with the rule id and version that decided it, or the missing fields. Example: {\"subject_id\":\"e3d-v6-brass-0-4\",\"target_id\":\"prusa-mk4s\"}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"},"description":"Part id or slug"},{"name":"target","in":"path","required":true,"schema":{"type":"string"},"description":"Printer or hotend id or slug"}],"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/api/v1/stock/{id}":{"get":{"operationId":"check_stock","summary":"Check stock and price","description":"Availability and price per merchant, re-verified live when the data is over an hour old. Example: {\"product_id\":\"prusa-mk4s\",\"merchant_id\":\"prusa3d\"}","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Product id or slug"},{"name":"merchant","in":"query","required":false,"schema":{"type":"string"},"description":"Merchant id"}],"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/api/v1/report":{"post":{"operationId":"report_issue","summary":"Report a data issue","description":"Flag a wrong spec, price or fit verdict. Reports never edit facts; two independent reports mark a fact disputed. Example: {\"entity_type\":\"product\",\"entity_id\":\"prusa-mk4s\",\"field\":\"nozzle_thread\",\"claim\":\"MK4S uses the Nextruder thread\"}","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity_type":{"type":"string","enum":["product","offer","fit"]},"entity_id":{"type":"string"},"field":{"type":"string"},"claim":{"type":"string","maxLength":500}},"required":["entity_type","entity_id","claim"],"additionalProperties":false}}}},"responses":{"200":{"description":"Envelope with data, verified_at, age_seconds, source_urls and disclosure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"Envelope":{"type":"object","required":["data","verified_at","age_seconds","source_urls","disclosure"],"properties":{"data":{"description":"Tool result"},"verified_at":{"type":["string","null"],"format":"date-time"},"age_seconds":{"type":["integer","null"]},"source_urls":{"type":"array","items":{"type":"string","format":"uri"}},"disclosure":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_params","not_found","rate_limited","unauthorized","internal"]},"message":{"type":"string"}}}}}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional API key from /data"}}}}