{"openapi":"3.1.0","info":{"title":"Print My Design — assistant ordering","version":"1.0.0","summary":"List products, quote a print run, and hand the customer a checkout link. Payment never happens in chat.","description":"Public, rate-limited, read-mostly API for AI assistants. Prices come from the live store engine. createDesignDraft builds a proof and a cart, then returns a short-lived link to printmydesign.shop/checkout?d=<token>. The customer must review the proof and pay on the existing PAI'D checkout. Do not collect card numbers. Registered in Valparaiso, Indiana; also serves Denver, Colorado; ships across the United States and internationally.","contact":{"name":"Print My Design","url":"https://printmydesign.shop/for/ai-assistants"}},"servers":[{"url":"https://printmydesign.shop/api/v4/ai","description":"Shopper assistant API"}],"tags":[{"name":"Catalog","description":"Products and options the store actually sells."},{"name":"Quotes","description":"Live prices from the store's pricing engine."},{"name":"Handoff","description":"Draft a design and return a checkout link for the customer to review and pay."}],"paths":{"/products":{"get":{"operationId":"listProducts","tags":["Catalog"],"summary":"List products, options and from-prices","responses":{"200":{"description":"The catalog.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/products/{slug}":{"get":{"operationId":"getProduct","tags":["Catalog"],"summary":"One product and its options","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The product.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown product.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}}}}},"/quote":{"post":{"operationId":"getQuote","tags":["Quotes"],"summary":"Quote a product and options at a quantity","description":"Uses the same pricing engine as the storefront. Never invent a price if this fails.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"product":{"type":"string","default":"business-cards"},"quantity":{"type":"integer","minimum":1},"options":{"type":"object","additionalProperties":false,"properties":{"stockId":{"type":"string"},"sizeId":{"type":"string"},"finishId":{"type":"string"},"cornersId":{"type":"string"},"sidesId":{"type":"string"},"finishingId":{"type":"string"}}}}}}}},"responses":{"200":{"description":"A live quote.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"product":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"stockId":{"type":"string"},"sizeId":{"type":"string"},"finishId":{"type":"string"},"cornersId":{"type":"string"},"sidesId":{"type":"string"},"finishingId":{"type":"string"}}},"quantity":{"type":"integer"},"currency":{"type":"string","enum":["USD"]},"lead_time":{"type":"object","additionalProperties":false,"properties":{"business_days":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2},"needs_agreement":{"type":"boolean"}},"required":["business_days","needs_agreement"]},"quote":{"type":"object","additionalProperties":false,"properties":{"variant_key":{"type":"string"},"quantity":{"type":"integer"},"final_price_cents":{"type":"integer"},"list_price_cents":{"type":"integer"},"savings_cents":{"type":"integer"},"discount_bps":{"type":"integer"},"list_price_basis":{"type":"string"}},"required":["final_price_cents","quantity"]},"requested_quantity":{"type":"integer","description":"Present only when the asked run is not sold on this selection and the quote is for the next run offered (D138)."},"quantity_note":{"type":"string","description":"Tell the customer this when present: the run quoted is not the one asked."},"back_included":{"type":"boolean","description":"Glossy flyers only: a front-only option that costs the same printed both sides (D136, D139)."},"sides_note":{"type":"string","description":"Glossy flyers only. Tell the customer this when present: the back side is included at no additional cost."},"review_required":{"type":"boolean"},"payment_in_chat":{"type":"boolean"}},"required":["product","quantity","quote","lead_time","review_required","payment_in_chat"]}}}},"400":{"description":"Bad options.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}},"422":{"description":"Not priced or not printable as asked.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}}}}},"/design-drafts":{"post":{"operationId":"createDesignDraft","tags":["Handoff"],"summary":"Create a proof and a checkout deep link","description":"Builds a draft cart from card details (name, title, company, phone, email, website, colours, layout), an optional logo URL or image, or a finished image. Returns checkout_url. Show that link to the customer. They review the proof and pay on the site. Do not take payment yourself.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"product":{"type":"string","default":"business-cards"},"quantity":{"type":"integer","minimum":1},"options":{"type":"object","additionalProperties":false,"properties":{"stockId":{"type":"string"},"sizeId":{"type":"string"},"finishId":{"type":"string"},"cornersId":{"type":"string"},"sidesId":{"type":"string"},"finishingId":{"type":"string"}}},"card":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"title":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"website":{"type":"string"},"colors":{"type":"object","additionalProperties":false,"properties":{"background":{"type":"string"},"text":{"type":"string"},"accent":{"type":"string"}}},"layout":{"type":"string","enum":["left","centered","right"]}}},"logo_url":{"type":"string","format":"uri"},"logo_image":{"type":"object","additionalProperties":false,"properties":{"mime":{"type":"string","enum":["image/png","image/jpeg"]},"data":{"type":"string","contentEncoding":"base64"}},"required":["mime","data"]},"artwork":{"type":"object","additionalProperties":false,"properties":{"mime":{"type":"string","enum":["image/png","image/jpeg"]},"data":{"type":"string","contentEncoding":"base64"}},"required":["mime","data"]}}}}}},"responses":{"201":{"description":"A draft and checkout link.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string"},"product":{"type":"string"},"quantity":{"type":"integer"},"options":{"type":"object","additionalProperties":false,"properties":{"stockId":{"type":"string"},"sizeId":{"type":"string"},"finishId":{"type":"string"},"cornersId":{"type":"string"},"sidesId":{"type":"string"},"finishingId":{"type":"string"}}},"quote":{"type":"object","additionalProperties":false,"properties":{"final_price_cents":{"type":"integer"},"list_price_cents":{"type":"integer"},"savings_cents":{"type":"integer"},"currency":{"type":"string","enum":["USD"]}},"required":["final_price_cents","currency"]},"lead_time":{"type":"object","additionalProperties":false,"properties":{"business_days":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2},"needs_agreement":{"type":"boolean"}},"required":["business_days","needs_agreement"]},"checkout_url":{"type":"string"},"editor_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"review_required":{"type":"boolean","enum":[true]},"payment_in_chat":{"type":"boolean","enum":[false]}},"required":["token","product","quantity","quote","lead_time","checkout_url","editor_url","expires_at","review_required","payment_in_chat"]}}}},"400":{"description":"Incomplete or invalid details.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}},"422":{"description":"Could not build or price the proof.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}}}}},"/checkout-link":{"post":{"operationId":"getCheckoutLink","tags":["Handoff"],"summary":"Re-issue the checkout URL for an existing handoff token","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string"},"product":{"type":"string"},"quantity":{"type":"integer"},"options":{"type":"object","additionalProperties":false,"properties":{"stockId":{"type":"string"},"sizeId":{"type":"string"},"finishId":{"type":"string"},"cornersId":{"type":"string"},"sidesId":{"type":"string"},"finishingId":{"type":"string"}}},"quote":{"type":"object","additionalProperties":false,"properties":{"final_price_cents":{"type":"integer"},"list_price_cents":{"type":"integer"},"savings_cents":{"type":"integer"},"currency":{"type":"string","enum":["USD"]}},"required":["final_price_cents","currency"]},"lead_time":{"type":"object","additionalProperties":false,"properties":{"business_days":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2},"needs_agreement":{"type":"boolean"}},"required":["business_days","needs_agreement"]},"checkout_url":{"type":"string"},"editor_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"review_required":{"type":"boolean","enum":[true]},"payment_in_chat":{"type":"boolean","enum":[false]}},"required":["token","product","quantity","quote","lead_time","checkout_url","editor_url","expires_at","review_required","payment_in_chat"]}}}},"404":{"description":"Invalid or expired token.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}}}}},"/handoff":{"get":{"operationId":"redeemHandoff","tags":["Handoff"],"summary":"Redeem a checkout token (used by the storefront, not by the assistant)","parameters":[{"name":"d","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The session to adopt."},"404":{"description":"Invalid or expired token.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"message":{"type":"string"},"available_quantities":{"type":"array","items":{"type":"integer"},"description":"On no_price: the runs this selection is sold in (D138)."}},"required":["error","message"]}}}}}}}}}