{"openapi":"3.1.0","info":{"title":"AutoQuote3D API","version":"0.0.1","description":"API for the AutoQuote3D platform"},"paths":{"/api/ping":{"get":{"tags":["ping"],"operationId":"ping","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","enum":["pong"]}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"Verify API connectivity"}},"/api/v0/quote":{"post":{"tags":["quotes"],"operationId":"quotes.getQuotes","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"QuoteListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteListResponse"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/BadRequest"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"422":{"description":"UnprocessableEntity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"List provider quotes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteListRequest"}}},"required":true}}},"/api/v0/quote/{quote_id}":{"get":{"tags":["quotes"],"operationId":"quotes.getQuote","parameters":[{"name":"quote_id","in":"path","schema":{"type":"string","description":"a string at least 1 character(s) long","title":"minLength(1)","minLength":1},"required":true,"description":"a string at least 1 character(s) long"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"QuoteDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/BadRequest"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"UnprocessableEntity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"Get a single quote"}},"/api/v0/order":{"post":{"tags":["orders"],"operationId":"orders.getOrders","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"OrderListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderListResponse"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/BadRequest"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"422":{"description":"UnprocessableEntity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"List provider orders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderListRequest"}}},"required":true}}},"/api/v0/order/{order_id}":{"get":{"tags":["orders"],"operationId":"orders.getOrder","parameters":[{"name":"order_id","in":"path","schema":{"type":"string","description":"a string at least 1 character(s) long","title":"minLength(1)","minLength":1},"required":true,"description":"a string at least 1 character(s) long"}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"OrderDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetail"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/BadRequest"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"UnprocessableEntity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"Get a single order"}},"/api/v0/analytics/store":{"post":{"tags":["analytics"],"operationId":"analytics.getStoreAnalytics","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"StoreAnalytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreAnalytics"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/BadRequest"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"422":{"description":"UnprocessableEntity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}},"500":{"description":"InternalServerError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"summary":"Store performance analytics and optimization insights","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreAnalyticsRequest"}}},"required":true}}}},"components":{"schemas":{"HttpApiDecodeError":{"type":"object","required":["issues","message","_tag"],"properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"message":{"type":"string"},"_tag":{"type":"string","enum":["HttpApiDecodeError"]}},"additionalProperties":false,"description":"The request did not match the expected schema"},"Issue":{"type":"object","required":["_tag","path","message"],"properties":{"_tag":{"type":"string","enum":["Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden"],"description":"The tag identifying the type of parse issue"},"path":{"type":"array","items":{"$ref":"#/components/schemas/PropertyKey"},"description":"The path to the property where the issue occurred"},"message":{"type":"string","description":"A descriptive message explaining the issue"}},"additionalProperties":false,"description":"Represents an error encountered while parsing a value to match the schema"},"PropertyKey":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object","required":["_tag","key"],"properties":{"_tag":{"type":"string","enum":["symbol"]},"key":{"type":"string"}},"additionalProperties":false,"description":"an object to be decoded into a globally shared symbol"}]},"Unauthorized":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["Unauthorized"]}},"additionalProperties":false},"RateLimited":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["RateLimited"]}},"additionalProperties":false},"InternalServerError":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["InternalServerError"]}},"additionalProperties":false},"QuoteListRequest":{"type":"object","required":[],"properties":{"range":{"$ref":"#/components/schemas/DateRange"},"pagination":{"type":"object","required":[],"properties":{"page":{"allOf":[{"$ref":"#/components/schemas/Int","description":"a number greater than or equal to 1","title":"greaterThanOrEqualTo(1)","minimum":1}],"title":"greaterThanOrEqualTo(1)","description":"a number greater than or equal to 1"},"limit":{"allOf":[{"$ref":"#/components/schemas/Int","description":"a number less than or equal to 100","title":"lessThanOrEqualTo(100)","minimum":1,"maximum":100}],"title":"lessThanOrEqualTo(100)","description":"a number less than or equal to 100"}},"additionalProperties":false}},"additionalProperties":false},"DateRange":{"type":"object","required":["from","to"],"properties":{"from":{"$ref":"#/components/schemas/Date"},"to":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false},"Date":{"type":"string","description":"a string to be decoded into a Date"},"Int":{"type":"integer","description":"an integer","title":"int"},"QuoteListResponse":{"type":"object","required":["count","quotes"],"properties":{"count":{"type":"number"},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/QuoteSummary"}}},"additionalProperties":false},"QuoteSummary":{"type":"object","required":["id","userId","dateCreated","invoiceId","requestForQuote","dateArchived","dateOpened","urgency","shippingOptionId","notes","user"],"properties":{"id":{"type":"string"},"userId":{"type":"string"},"dateCreated":{"$ref":"#/components/schemas/Date"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestForQuote":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateArchived":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateOpened":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"urgency":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingOptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}]}},"additionalProperties":false},"UserSummary":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}},"additionalProperties":false},"BadRequest":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["BadRequest"]}},"additionalProperties":false},"UnprocessableEntity":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["UnprocessableEntity"]}},"additionalProperties":false},"QuoteDetail":{"type":"object","required":["id","userId","providerId","dateCreated","invoiceId","requestForQuote","dateArchived","dateOpened","urgency","shippingOptionId","notes","quoteOrderItems","user"],"properties":{"id":{"type":"string"},"userId":{"type":"string"},"providerId":{"type":"string"},"dateCreated":{"$ref":"#/components/schemas/Date"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestForQuote":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateArchived":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateOpened":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"urgency":{"anyOf":[{"type":"number"},{"type":"null"}]},"shippingOptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoteOrderItems":{"type":"array","items":{"$ref":"#/components/schemas/QuoteOrderItem"}},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}]}},"additionalProperties":false},"QuoteOrderItem":{"type":"object","required":["id","quoteOrderId","s3Key","label","settings","tech","material","color","infill","layerThickness","units","qty","price","createdAt","upsells"],"properties":{"id":{"type":"string"},"quoteOrderId":{"type":"string"},"s3Key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"$id":"/schemas/unknown","title":"unknown"},"tech":{"type":"string","enum":["fdm","sla","sls","mjf"]},"material":{"type":"string"},"color":{"type":"string"},"infill":{"type":"string"},"layerThickness":{"type":"string"},"units":{"type":"string"},"qty":{"type":"number"},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"upsells":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},"NotFound":{"type":"object","required":["message","_tag"],"properties":{"message":{"type":"string"},"_tag":{"type":"string","enum":["NotFound"]}},"additionalProperties":false},"OrderListRequest":{"type":"object","required":[],"properties":{"range":{"$ref":"#/components/schemas/DateRange"},"status":{"type":"array","items":{"type":"string","enum":["paid","delivering","picked_up","completed","cancelled","invoiced","refunded","pending","authorized","printing","printed","expired"]},"description":"The statuses to filter by"},"pagination":{"type":"object","required":[],"properties":{"page":{"allOf":[{"$ref":"#/components/schemas/Int","description":"a number greater than or equal to 1","title":"greaterThanOrEqualTo(1)","minimum":1}],"title":"greaterThanOrEqualTo(1)","description":"a number greater than or equal to 1"},"limit":{"allOf":[{"$ref":"#/components/schemas/Int","description":"a number less than or equal to 100","title":"lessThanOrEqualTo(100)","minimum":1,"maximum":100}],"title":"lessThanOrEqualTo(100)","description":"a number less than or equal to 100"}},"additionalProperties":false}},"additionalProperties":false},"OrderListResponse":{"type":"object","required":["count","orders"],"properties":{"count":{"type":"number"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderSummary"}}},"additionalProperties":false},"OrderSummary":{"type":"object","required":["id","quoteId","stripeOrderId","type","urgency","paymentIntentId","price","userId","dateCreated","datePaid","dateExpires","dateArchived","status","notes","user"],"properties":{"id":{"type":"string"},"quoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeOrderId":{"type":"string"},"type":{"type":"string","enum":["checkout","invoice"]},"urgency":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"type":"number"},"userId":{"type":"string"},"dateCreated":{"$ref":"#/components/schemas/Date"},"datePaid":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateExpires":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateArchived":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"status":{"type":"string","enum":["paid","delivering","picked_up","completed","cancelled","invoiced","refunded","pending","authorized","printing","printed","expired"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}]}},"additionalProperties":false},"OrderDetail":{"type":"object","required":["id","quoteId","stripeOrderId","type","urgency","paymentIntentId","price","userId","providerId","dateCreated","datePaid","dateExpires","dateArchived","status","notes","paidOrderItems","user"],"properties":{"id":{"type":"string"},"quoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeOrderId":{"type":"string"},"type":{"type":"string","enum":["checkout","invoice"]},"urgency":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"type":"number"},"userId":{"type":"string"},"providerId":{"type":"string"},"dateCreated":{"$ref":"#/components/schemas/Date"},"datePaid":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateExpires":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"dateArchived":{"anyOf":[{"$ref":"#/components/schemas/Date"},{"type":"null"}]},"status":{"type":"string","enum":["paid","delivering","picked_up","completed","cancelled","invoiced","refunded","pending","authorized","printing","printed","expired"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"paidOrderItems":{"type":"array","items":{"$ref":"#/components/schemas/PaidOrderItem"}},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}]}},"additionalProperties":false},"PaidOrderItem":{"type":"object","required":["id","stripeProductId","paidOrderId","s3Key","settings","status"],"properties":{"id":{"type":"string"},"stripeProductId":{"type":"string"},"paidOrderId":{"type":"string"},"s3Key":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"$id":"/schemas/unknown","title":"unknown"},"status":{"type":"string","enum":["pending","printing","printed"]}},"additionalProperties":false},"StoreAnalyticsRequest":{"type":"object","required":[],"properties":{"range":{"$ref":"#/components/schemas/DateRange"},"granularity":{"type":"string","enum":["day","week","month"]}},"additionalProperties":false},"StoreAnalytics":{"type":"object","required":["business","currency","range","granularity","revenue","orders","quotes","topMaterials","timeSeries","insights"],"properties":{"business":{"type":"string"},"currency":{"type":"string"},"range":{"anyOf":[{"type":"object","required":["from","to"],"properties":{"from":{"$ref":"#/components/schemas/Date"},"to":{"$ref":"#/components/schemas/Date"}},"additionalProperties":false},{"type":"null"}]},"granularity":{"type":"string","enum":["day","week","month"]},"revenue":{"type":"object","required":["grossRevenue","netRevenue","refundedAmount","averageOrderValue"],"properties":{"grossRevenue":{"type":"number"},"netRevenue":{"type":"number"},"refundedAmount":{"type":"number"},"averageOrderValue":{"type":"number"}},"additionalProperties":false},"orders":{"type":"object","required":["total","revenueOrders","byStatus"],"properties":{"total":{"type":"number"},"revenueOrders":{"type":"number"},"byStatus":{"type":"object","required":[],"properties":{},"additionalProperties":{"type":"number"}}},"additionalProperties":false},"quotes":{"type":"object","required":["total","opened","abandoned","requestsForQuote","conversionRate"],"properties":{"total":{"type":"number"},"opened":{"type":"number"},"abandoned":{"type":"number"},"requestsForQuote":{"type":"number"},"conversionRate":{"type":"number"}},"additionalProperties":false},"topMaterials":{"type":"array","items":{"type":"object","required":["material","tech","quantity","appearances"],"properties":{"material":{"type":"string"},"tech":{"type":"string"},"quantity":{"type":"number"},"appearances":{"type":"number"}},"additionalProperties":false}},"timeSeries":{"type":"array","items":{"type":"object","required":["period","revenue","orders"],"properties":{"period":{"type":"string"},"revenue":{"type":"number"},"orders":{"type":"number"}},"additionalProperties":false}},"insights":{"type":"array","items":{"$ref":"#/components/schemas/OptimizationInsight"}}},"additionalProperties":false},"OptimizationInsight":{"type":"object","required":["id","severity","title","detail","recommendation"],"properties":{"id":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","opportunity"]},"title":{"type":"string"},"detail":{"type":"string"},"recommendation":{"type":"string"}},"additionalProperties":false}},"securitySchemes":{"apiKey":{"description":"Provider API key for AutoQuote3D","type":"apiKey","name":"x-api-key","in":"header"}}},"security":[],"tags":[{"name":"ping"},{"name":"quotes"},{"name":"orders"},{"name":"analytics"}]}