{"openapi":"3.1.0","info":{"title":"Make Parts Now agent API","description":"Upload parts, get instant prices and ship dates, and order SLS, FDM and CNC parts. See /llms.txt. Send an Idempotency-Key header on POST /quotes, /quotes/{id}/items, /quotes/{id}/checkout and /uploads to retry safely; a key is replayed for 7 days, after which the same key runs the request again.","version":"1.0"},"paths":{"/api/agent/v1/":{"get":{"tags":["agent"],"summary":"Index","operationId":"index_api_agent_v1__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent/v1/capabilities":{"get":{"tags":["agent"],"summary":"Processes, materials, finishes, services, speeds, limits","operationId":"capabilities_api_agent_v1_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent/v1/client-events":{"post":{"tags":["agent"],"summary":"Opt-in usage counts from a CAD add-in (no auth, counts only)","description":"Adds the counts to today's row per client, version and event. Nothing else is stored: no address, file name or\nid. Unknown clients or events are refused (422); 60 requests a minute per address, refused while the limiter is down.","operationId":"client_events_api_agent_v1_client_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientEventsIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/accounts":{"post":{"tags":["agent"],"summary":"Create an agent account and API key (no human needed)","operationId":"create_account_api_agent_v1_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account":{"get":{"tags":["agent"],"summary":"Get Account","operationId":"get_account_api_agent_v1_account_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent"],"summary":"Patch Account","operationId":"patch_account_api_agent_v1_account_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account/rotate-key":{"post":{"tags":["agent"],"summary":"Rotate","operationId":"rotate_api_agent_v1_account_rotate_key_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account/webhook-secret/rotate":{"post":{"tags":["agent"],"summary":"New webhook secret; the previous one keeps signing for 24 hours","operationId":"rotate_webhook_secret_api_agent_v1_account_webhook_secret_rotate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account/webhooks/deliveries":{"get":{"tags":["agent"],"summary":"Your recent webhook deliveries, newest first (kept 30 days)","operationId":"webhook_deliveries_api_agent_v1_account_webhooks_deliveries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account/webhooks/deliveries/{delivery_id}/redeliver":{"post":{"tags":["agent"],"summary":"Send a logged delivery again, with the same id","operationId":"redeliver_webhook_api_agent_v1_account_webhooks_deliveries__delivery_id__redeliver_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/account/webhooks/test":{"post":{"tags":["agent"],"summary":"Send a webhook.test event to your callback_url","operationId":"send_test_webhook_api_agent_v1_account_webhooks_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/uploads":{"post":{"tags":["agent"],"summary":"Upload a part file (multipart, URL, or base64)","operationId":"upload_api_agent_v1_uploads_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/uploads/url":{"post":{"tags":["agent"],"summary":"Get a one-time URL to PUT a large file","operationId":"upload_url_api_agent_v1_uploads_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/parts/{part_id}":{"get":{"tags":["agent"],"summary":"Get Part","operationId":"get_part_api_agent_v1_parts__part_id__get","parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","title":"Part Id"}},{"name":"wait","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":0,"description":"Seconds (0-30) to wait for a pending part's analysis before answering (P95)","default":0,"title":"Wait"},"description":"Seconds (0-30) to wait for a pending part's analysis before answering (P95)"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes":{"post":{"tags":["agent"],"summary":"Create a quote with parts and options","operationId":"create_quote_api_agent_v1_quotes_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent"],"summary":"List your API quotes, newest first (no repricing)","operationId":"list_quotes_api_agent_v1_quotes_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["open","expired","ordered","all"],"type":"string","description":"'expired' means discarded","default":"open","title":"Status"},"description":"'expired' means discarded"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}":{"get":{"tags":["agent"],"summary":"Get Quote","operationId":"get_quote_api_agent_v1_quotes__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent"],"summary":"Patch Quote","operationId":"patch_quote_api_agent_v1_quotes__quote_id__patch","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/items":{"post":{"tags":["agent"],"summary":"Add Items","operationId":"add_items_api_agent_v1_quotes__quote_id__items_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ItemIn"},"title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/items/{item_id}":{"patch":{"tags":["agent"],"summary":"Patch Item","operationId":"patch_item_api_agent_v1_quotes__quote_id__items__item_id__patch","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent"],"summary":"Delete Item","operationId":"delete_item_api_agent_v1_quotes__quote_id__items__item_id__delete","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteView"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/pdf":{"get":{"tags":["agent"],"summary":"Formal quote PDF","operationId":"quote_pdf_api_agent_v1_quotes__quote_id__pdf_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/discard":{"post":{"tags":["agent"],"summary":"Discard a quote you no longer need (frees a max_open_quotes slot)","operationId":"discard_quote_api_agent_v1_quotes__quote_id__discard_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/checkout":{"post":{"tags":["agent"],"summary":"Option A: Stripe payment link for a human","operationId":"checkout_api_agent_v1_quotes__quote_id__checkout_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/quotes/{quote_id}/pay":{"post":{"tags":["agent"],"summary":"Option B: pay autonomously with USDC (x402)","operationId":"pay_api_agent_v1_quotes__quote_id__pay_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"use_credit","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Use Credit"}},{"name":"confirm_credit","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"description":"The credit_confirmation token from a 409, to place an order fully paid by account credit","title":"Confirm Credit"},"description":"The credit_confirmation token from a 409, to place an order fully paid by account credit"},{"name":"payment-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}},{"name":"x-payment","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment required: x402 requirements in body and PAYMENT-REQUIRED header"},"409":{"description":"Account credit covers the total: status credit_confirmation_required and a credit_confirmation token. Nothing is charged; call again with confirm_credit=<token> to place the order. Also returned when the quote was already ordered or changed."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/orders":{"get":{"tags":["agent"],"summary":"List Orders","operationId":"list_orders_api_agent_v1_orders_get","parameters":[{"name":"quote_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/orders/{order_id}":{"get":{"tags":["agent"],"summary":"Get Order","operationId":"get_order_api_agent_v1_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/orders/{order_id}/refund-preference":{"post":{"tags":["agent"],"summary":"Refund Preference","operationId":"refund_preference_api_agent_v1_orders__order_id__refund_preference_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundPref"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/v1/orders/{order_id}/cancel-request":{"post":{"tags":["agent"],"summary":"Cancel Request","operationId":"cancel_request_api_agent_v1_orders__order_id__cancel_request_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountIn":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Agent or app name"},"organization":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Organization"},"email":{"type":"string","format":"email","title":"Email","description":"Receipts and order problems are sent here"},"ship_to":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"callback_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Callback Url","description":"Signed webhook events are POSTed here"},"accept_terms":{"type":"boolean","title":"Accept Terms","description":"Must be true: accepts the Terms of Sale and Agent Terms"}},"type":"object","required":["name","email","accept_terms"],"title":"AccountIn"},"AccountPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"ship_to":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"callback_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Callback Url"}},"type":"object","title":"AccountPatch"},"Address":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company"},"line1":{"type":"string","maxLength":255,"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Line2"},"city":{"type":"string","maxLength":128,"title":"City"},"state":{"type":"string","maxLength":64,"title":"State"},"postal_code":{"type":"string","maxLength":16,"title":"Postal Code"},"country":{"type":"string","maxLength":2,"title":"Country","default":"US"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","required":["name","line1","city","state","postal_code"],"title":"Address"},"CancelIn":{"properties":{"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"type":"object","title":"CancelIn"},"CheckoutLink":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url","description":"Stripe Checkout URL for the person paying"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At","description":"When the link stops working, Unix seconds"},"amount_before_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Before Tax","description":"Total in dollars before sales tax"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"quote_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Url","description":"The quote's share link"}},"additionalProperties":true,"type":"object","required":["checkout_url"],"title":"CheckoutLink","description":"A Stripe Checkout link for a person to pay the quote by card."},"ClientEventsIn":{"properties":{"client":{"type":"string","maxLength":32,"title":"Client","description":"The add-in: fusion"},"version":{"type":"string","maxLength":32,"title":"Version","description":"The add-in's version, such as 1.0.0"},"events":{"additionalProperties":{"type":"integer"},"type":"object","title":"Events","description":"Event name to count (1-1000 each), from the allowlist in docs/cad-addins.md"}},"type":"object","required":["client","version","events"],"title":"ClientEventsIn"},"ErrorBody":{"properties":{"error":{"type":"boolean","title":"Error","default":true},"status":{"type":"integer","title":"Status","description":"HTTP status"},"message":{"type":"string","title":"Message"},"code":{"type":"string","title":"Code","description":"Stable error code, for example NOT_FOUND or RATE_LIMITED; codes are only ever added"},"retry_after_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After S","description":"Seconds to wait before retrying; set whenever Retry-After is sent"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"The input field at fault"},"allowed":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed","description":"Values the field accepts"},"next_steps":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Next Steps"},"issues":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Issues","description":"422 validation problems: {field, message}"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"The response's X-Request-Id; quote it when you report a problem"}},"additionalProperties":true,"type":"object","required":["status","message","code"],"title":"ErrorBody","description":"An error. Branch on code; wait retry_after_s seconds when it is set."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemIn":{"properties":{"part_id":{"type":"string","title":"Part Id"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"See capabilities.config_schema"},"quantity":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Quantity","default":1},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["part_id"],"title":"ItemIn"},"ItemPatch":{"properties":{"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"quantity":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Quantity"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ItemPatch"},"QuoteIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ItemIn"},"type":"array","title":"Items","default":[]},"ship_to":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"speed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed","description":"economy | standard | fast | faster | fastest"},"shipping_option":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Option"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"}},"type":"object","title":"QuoteIn"},"QuotePatch":{"properties":{"ship_to":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"speed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed"},"shipping_option":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Option"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"}},"type":"object","title":"QuotePatch"},"QuoteView":{"properties":{"id":{"type":"string","title":"Id","description":"Quote id (qt_...)"},"number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number","description":"Quote number shown on the PDF and the website"},"share_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token","description":"Token of the quote's share link, {base}/quotes/share/{share_token}"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url","description":"The quote's page on makepartsnow.com, to show a person the parts and prices"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"open, ordered or expired (discarded or past its date)"},"rate_set_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Set Version","description":"Version of the price list the quote was priced with"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO 8601"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"ISO 8601. Prices hold until then; a later read re-prices at live rates"},"speed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed","description":"Chosen production speed: economy, standard, fast, faster or fastest"},"ship_to":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ship To","description":"Shipping address {name, company?, line1, line2?, city, state, postal_code, country, phone?}"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email","description":"Email for receipts and order updates"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number","description":"Your purchase order number"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items","description":"Lines: {id, position, part, config, quantity, notes, review_status, review_note, pricing, snapshot_url, action_needed?}"},"tiers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tiers","description":"One entry per speed: price, ship-by and arrive-by dates, eligibility"},"shipping_options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Shipping Options","description":"Carrier options for ship_to; choose one with shipping_option"},"shipping_choice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Choice","description":"Id of the chosen shipping option"},"totals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Totals","description":"Totals for the chosen speed, including total_before_tax"},"needs_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Review","description":"True while a part waits for manual review; payment is blocked until then"},"blocking":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Blocking","description":"What stops the quote from being ready: {item_id, state, detail}"},"ready":{"type":"boolean","title":"Ready","description":"True when the quote can be paid"},"free_shipping_remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Free Shipping Remaining","description":"Dollars more to reach free shipping (0 when reached)"},"min_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Order","description":"Order minimum in dollars"},"tax_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Note","description":"Sales tax is added at checkout"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps","description":"Plain-English instructions for what to do next"}},"additionalProperties":true,"type":"object","required":["id","items","ready","next_steps"],"title":"QuoteView","description":"A priced quote. Fields can be added; none is removed or renamed within v1."},"RefundPref":{"properties":{"method":{"type":"string","pattern":"^(usdc|credit)$","title":"Method","description":"How to receive refunds for USDC orders"}},"type":"object","required":["method"],"title":"RefundPref"},"UploadUrlIn":{"properties":{"filename":{"type":"string","title":"Filename","description":"Original filename; the extension sets the format (stl, 3mf, obj, step)"},"no_controlled_data":{"type":"boolean","title":"No Controlled Data"}},"type":"object","required":["filename","no_controlled_data"],"title":"UploadUrlIn"},"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"}}}}