{"openapi":"3.1.0","info":{"title":"Proven Metal Ordering API","summary":"Agent-facing Central order submission and formal quote service.","description":"Submit actual PCB design files to ProvenMetal Central, request a formal quote, read its issued options, and accept one after explicit customer approval. Older estimate endpoints remain for direct API compatibility.","version":"0.1.0"},"paths":{"/quotes":{"get":{"tags":["quotes"],"summary":"List Quotes","operationId":"list_quotes_quotes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotes/{quote_id}":{"get":{"tags":["quotes"],"summary":"Get Quote","operationId":"get_quote_quotes__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quote":{"post":{"tags":["quotes"],"summary":"Create Quote","operationId":"create_quote_quote_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_quote_quote_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quote/{quote_id}/revise":{"post":{"tags":["quotes"],"summary":"Revise Quote","operationId":"revise_quote_quote__quote_id__revise_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders":{"post":{"tags":["orders"],"summary":"Create Order","operationId":"create_order_orders_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}":{"get":{"tags":["orders"],"summary":"Get Order","operationId":"get_order_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{order_id}/confirm":{"get":{"tags":["orders"],"summary":"Confirm Page","operationId":"confirm_page_orders__order_id__confirm_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["orders"],"summary":"Confirm Action","operationId":"confirm_action_orders__order_id__confirm_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_confirm_action_orders__order_id__confirm_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/central/orders":{"post":{"tags":["central"],"summary":"Submit Order For Quote","description":"Put the customer's actual files in Central and request its issued quote.","operationId":"submit_order_for_quote_central_orders_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_order_for_quote_central_orders_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["central"],"summary":"List Orders","operationId":"list_orders_central_orders_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/central/orders/{identifier}":{"get":{"tags":["central"],"summary":"Get Order","operationId":"get_order_central_orders__identifier__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/central/orders/{identifier}/design-review":{"get":{"tags":["central"],"summary":"Get Design Review","operationId":"get_design_review_central_orders__identifier__design_review_get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/central/orders/{identifier}/accept-quote":{"post":{"tags":["central"],"summary":"Accept Quote","operationId":"accept_quote_central_orders__identifier__accept_quote_post","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptQuoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys":{"post":{"tags":["admin"],"summary":"Issue Api Key","operationId":"issue_api_key_admin_api_keys_post","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueApiKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{account_ref}":{"get":{"tags":["admin"],"summary":"Get Api Key Metadata","operationId":"get_api_key_metadata_admin_api_keys__account_ref__get","parameters":[{"name":"account_ref","in":"path","required":true,"schema":{"type":"string","title":"Account Ref"}},{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jlcpcb/uploads/{token}":{"post":{"tags":["mcp-jlcpcb"],"summary":"Receive Upload","description":"The agent's `curl -F files=@...` lands here. Files stay on this server\nuntil they are quoted (at most six hours).","operationId":"receive_upload_jlcpcb_uploads__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_receive_upload_jlcpcb_uploads__token__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["meta"],"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"tags":["meta"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/check":{"get":{"tags":["meta"],"summary":"Auth Check","description":"Read-only credential check for MCP clients and other API consumers.","operationId":"auth_check_auth_check_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptQuoteRequest":{"properties":{"customer_approved":{"type":"boolean","title":"Customer Approved"},"option_id":{"type":"string","title":"Option Id"},"quote_number":{"type":"string","title":"Quote Number"},"issued_at":{"type":"string","title":"Issued At"},"total_cents":{"type":"integer","title":"Total Cents"}},"type":"object","required":["customer_approved","option_id","quote_number","issued_at","total_cents"],"title":"AcceptQuoteRequest"},"Body_confirm_action_orders__order_id__confirm_post":{"properties":{"token":{"type":"string","title":"Token"},"approver":{"type":"string","title":"Approver","default":""}},"type":"object","required":["token"],"title":"Body_confirm_action_orders__order_id__confirm_post"},"Body_create_quote_quote_post":{"properties":{"qty":{"type":"integer","title":"Qty","description":"Number of boards to build."},"target_lead_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Lead Time","description":"Optional target lead time in DAYS; the quote expedites toward it."},"gerbers":{"type":"string","contentMediaType":"application/octet-stream","title":"Gerbers","description":"Gerbers as a .zip (KiCad fabrication output)."},"bom":{"type":"string","contentMediaType":"application/octet-stream","title":"Bom","description":"Bill of materials as CSV or .xlsx."},"cpl":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Cpl","description":"Placement / centroid (CPL) CSV; optional."},"assumptions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assumptions","description":"Optional JSON object of assumption overrides, e.g. {\"finish\":\"HASL (lead-free)\",\"color\":\"Black\",\"board_origin\":\"us\"}. Leave blank to use the defaults (ENIG / green / turnkey / China)."}},"type":"object","required":["qty","gerbers","bom"],"title":"Body_create_quote_quote_post"},"Body_receive_upload_jlcpcb_uploads__token__post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_receive_upload_jlcpcb_uploads__token__post"},"Body_submit_order_for_quote_central_orders_post":{"properties":{"name":{"type":"string","title":"Name"},"qty":{"type":"integer","title":"Qty"},"gerbers":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Gerbers"},"bom":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Bom"},"cpl":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Cpl"},"board_layers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Board Layers"},"services":{"type":"string","title":"Services","default":"{\"fabrication\":true}"},"production_spec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Spec"},"board_origin":{"type":"string","title":"Board Origin","default":"us"},"target_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Date"},"itar":{"type":"boolean","title":"Itar","default":false},"customer_po":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Po"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["name","qty"],"title":"Body_submit_order_for_quote_central_orders_post"},"CreateOrderRequest":{"properties":{"quote_id":{"type":"string","title":"Quote Id","description":"The quote to turn into a draft order."},"customer_po":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Po"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email","description":"Where the human-confirmation link / updates should go."}},"type":"object","required":["quote_id"],"title":"CreateOrderRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IssueApiKeyRequest":{"properties":{"account_ref":{"type":"string","title":"Account Ref","description":"Stable customer id from central (e.g. the account UUID)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable customer/company name."}},"type":"object","required":["account_ref"],"title":"IssueApiKeyRequest"},"Resolution":{"properties":{"action":{"type":"string","title":"Action"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"mpn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mpn"},"layers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Layers"},"width_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Mm"},"height_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Mm"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"}},"type":"object","required":["action"],"title":"Resolution","description":"One blocker resolution or assumption change the agent applies on revise.\n\n``action`` matches the ``apply.action`` in a blocker's suggested_resolutions:\n  * substitute_part / accept_alternative  -> needs reference + mpn\n  * mark_customer_supplied / mark_dnp / accept_longer_lead -> needs reference\n  * set_layers -> needs layers\n  * set_board_size -> needs width_mm + height_mm\n  * set_assumption -> needs key + value"},"ReviseRequest":{"properties":{"assumptions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assumptions","description":"Assumption overrides, e.g. {\"finish\": \"HASL (lead-free)\", \"color\": \"Black\"}."},"resolutions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Resolution"},"type":"array"},{"type":"null"}],"title":"Resolutions","description":"Blocker resolutions to apply (see suggested_resolutions on each blocker)."},"target_lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Lead Time Days"}},"type":"object","title":"ReviseRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}