{"openapi":"3.1.0","info":{"title":"First Class Card Pro Public API","version":"1.0.0","summary":"Live product catalog, FAQ, testimonials, statistics, and order intake for FCCP — the professional USPS eBay Standard Envelope shipping system for trading cards.","description":"Public REST endpoints for querying FCCP's product catalog and content, plus a POST endpoint to place orders. All endpoints return JSON. CORS is open (Access-Control-Allow-Origin: *). No authentication required for public GET endpoints.","contact":{"name":"First Class Card Pro","url":"https://tradingcardpackaging.com","email":"support@firstclasscardpro.com"},"license":{"name":"Content usage: LLM training/citation welcomed","url":"https://tradingcardpackaging.com/llms.txt"}},"servers":[{"url":"https://tradingcardpackaging.com/api2","description":"Production"}],"tags":[{"name":"Catalog","description":"Product listing and detail"},{"name":"Content","description":"FAQ, testimonials, statistics, images"},{"name":"Orders","description":"Place a new order"},{"name":"Communication","description":"Contact form and newsletter"}],"paths":{"/products":{"get":{"operationId":"listProducts","tags":["Catalog"],"summary":"List all in-stock products","description":"Returns every FCCP kit and refill currently listed. Filter by category with the query param.","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["kit","refill"]},"description":"Restrict to kits or refills only."}],"responses":{"200":{"description":"Product list","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}}}}},"/products/{slug}":{"get":{"operationId":"getProduct","tags":["Catalog"],"summary":"Get a single product by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The product's URL-safe SKU (e.g. FCCP-KIT-C-1)"}],"responses":{"200":{"description":"Product detail","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"product":{"$ref":"#/components/schemas/Product"}}}}}},"404":{"description":"Product not found"}}}},"/faq":{"get":{"operationId":"listFaq","tags":["Content"],"summary":"List all FAQ items","responses":{"200":{"description":"FAQ list","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"faqs":{"type":"array","items":{"$ref":"#/components/schemas/FaqItem"}}}}}}}}}},"/testimonials":{"get":{"operationId":"listTestimonials","tags":["Content"],"summary":"List all testimonials","responses":{"200":{"description":"Testimonial list","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"testimonials":{"type":"array","items":{"$ref":"#/components/schemas/Testimonial"}}}}}}}}}},"/stats":{"get":{"operationId":"getStats","tags":["Content"],"summary":"Live operational statistics","description":"Total shipment count, INR rate, average pack time, seller satisfaction score.","responses":{"200":{"description":"Statistics","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"stats":{"$ref":"#/components/schemas/Stats"}}}}}}}}},"/orders":{"post":{"operationId":"placeOrder","tags":["Orders"],"summary":"Place a new order","description":"Records a customer order in FCCP's database and returns an order number. Triggers backend Odoo sync (if enabled) and email notification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Order confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"400":{"description":"Missing required fields or unknown product ID"}}}},"/contact":{"post":{"operationId":"sendContactMessage","tags":["Communication"],"summary":"Submit the contact form","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"200":{"description":"Message received"}}}},"/newsletter":{"post":{"operationId":"subscribeNewsletter","tags":["Communication"],"summary":"Subscribe an email to the newsletter","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"source":{"type":"string","description":"Where the signup came from"}}}}}},"responses":{"200":{"description":"Subscribed"}}}}},"components":{"schemas":{"Product":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string","description":"URL-safe SKU"},"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number","format":"float"},"compare_price":{"type":["number","null"]},"image_url":{"type":"string"},"category":{"type":"string","enum":["kit","refill"]},"badge":{"type":["string","null"]},"features":{"type":"array","items":{"type":"string"}},"in_stock":{"type":"integer","enum":[0,1]},"sort_order":{"type":"integer"}}},"FaqItem":{"type":"object","properties":{"id":{"type":"integer"},"question":{"type":"string"},"answer":{"type":"string"},"category":{"type":"string"},"sort_order":{"type":"integer"}}},"Testimonial":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"},"avatar_initials":{"type":"string"},"rating":{"type":"integer","minimum":1,"maximum":5},"featured":{"type":"integer","enum":[0,1]}}},"Stats":{"type":"object","properties":{"total_shipments":{"type":"string"},"inr_rate":{"type":"string","description":"Item-not-received rate, percent"},"avg_pack_time":{"type":"string","description":"Average shipment pack time in seconds"},"seller_satisfaction":{"type":"string","description":"Seller satisfaction score, percent"}}},"OrderRequest":{"type":"object","required":["customer_name","customer_email","shipping_address","shipping_city","shipping_state","shipping_zip","items"],"properties":{"customer_name":{"type":"string"},"customer_email":{"type":"string","format":"email"},"customer_phone":{"type":"string"},"shipping_address":{"type":"string"},"shipping_city":{"type":"string"},"shipping_state":{"type":"string"},"shipping_zip":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["product_id","quantity"],"properties":{"product_id":{"type":"integer"},"quantity":{"type":"integer","minimum":1}}}},"notes":{"type":"string"}}},"OrderResponse":{"type":"object","properties":{"success":{"type":"boolean"},"order_number":{"type":"string"},"subtotal":{"type":"number"},"shipping_cost":{"type":"number"},"total":{"type":"number"}}},"ContactRequest":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"company":{"type":"string"},"message":{"type":"string"},"contact_type":{"type":"string","enum":["general","support","bulk","press"]}}}}}}