{"version":1,"resources":["https://stableprint.dev/api/orders","https://stableprint.dev/api/drafts","https://stableprint.dev/api/drafts/{draftId}","https://stableprint.dev/api/orders/{orderId}"],"mppResources":["https://stableprint.dev/api/orders"],"description":"Server-priced Prodigi print-on-demand catalog, crop proof, quote, and order API.","instructions":"# StablePrint\n\nStablePrint is a server-priced Prodigi print API. Use it to browse purchasable products, quote all-in USD totals, create honest crop proofs, then pay with x402/MPP.\n\nHappy path:\n1. Search GET /api/catalog/products. Catalog is purchase-only for the default US checkout path: every product has a SKU validated against Product Details and US destination support.\n2. Show product_photos before asking the user to choose. For one product, show 3-5 photos with captions and product_page_url.\n3. Get detail with GET /api/catalog/products/by-id/{productId}. Do not rely on slug uniqueness. If catalog search returns none, StablePrint cannot currently sell it; do not treat public Prodigi browse pages as purchasable.\n4. Resolve SKU with GET /api/products/{sku}. Review crop_strategy, print_areas, required_for_quote attributes, allowed_values, recommended_attributes, and attribute_combinations.\n5. Browse price with POST /api/quotes. Use total as the checkout price. If sellable=false or blocking_quote_issues is non-empty, choose another product/destination/shipping setup.\n6. Upload local artwork with StableUpload first. Draft asset URLs must be public direct PNG/JPEG/PDF URLs and must not cross-host redirect.\n7. Create POST /api/drafts with SIWX. Provide UCP buyer and fulfillment metadata instead of a custom recipient object. Clients may autofill buyer/fulfillment from an address book, but the user should review the destination before draft creation. Show product photos plus crop_proofs before buying; verify sku, attributes, sizing, copies, ship country, total, pricing_policy, source_sha256_hash, and proof_hashes. Buyable drafts may include checkout_session for clients that render a structured high-intent checkout review.\n8. Buy with POST /api/orders using draft_id, draft_token, expected_total/currency, a fresh client_request_id, and confirmed_crop_proof_hashes containing every proof_hash. If checkout_session.payment.handlers[0].config.body is present, it is a ready-to-submit body template for this paid endpoint. Poll/list via GET /api/orders.\n\nKey rules:\n- The paid wallet may differ from the SIWX draft creator. The secret draft_token authorizes purchase; StablePrint records buyer_wallet and payer_wallet.\n- checkout_session is display/flow metadata, not the source of truth for payment terms. The paid POST /api/orders challenge still supplies the exact x402/MPP payment options.\n- When present, checkout_session includes UCP buyer and fulfillment metadata that mirrors the stored buyer/fulfillment input and selected shipping quote. Clients with address books should map their stored address into UCP fulfillment for draft creation, then render checkout_session.fulfillment as the final shipping review before payment.\n- Product photos show the physical item, materials, shape, angles, and context. Show 3-5 product_photos plus product_page_url before purchase approval whenever available.\n- Do not quote or buy products that are not returned by GET /api/catalog/products unless the user provides a known SKU and GET /api/products/{sku} succeeds for the buyer's destination.\n- Crop proofs show only StablePrint's flat crop/fit math. They are not product mockups, not rendered by Prodigi, and do not guarantee material, color, wrap, lab output, or final appearance.\n- StablePrint does not provide Prodigi-rendered product mockups through the API. Do not call crop_proofs previews or mockups.\n- proof_hash and source_sha256_hash are the durable confirmation fields.\n- POST /api/quotes and POST /api/drafts return structured errors such as missing_required_attribute, invalid_attribute_value, missing_required_print_area, invalid_asset_url, and unsupported_quote_issues.\n- unsupported_quote_issues is a sellability block before payment/order submission, not a billing-card problem. Do not claim support unless POST /api/quotes returns sellable=true for that exact combination.\n- destinationCountryCode.UsSalesTaxWarning is non-blocking when sellable=true. Charge the returned total; do not add tax estimates.\n- For US, total may include reserve_cost under pricing_policy. Do not alter, waive, estimate, or explain it as tax.\n- Catalog example_skus are validated against Prodigi Product Details, but agents must still call GET /api/products/{sku} to inspect crop_strategy, attributes, and print areas before quote/draft.\n- Use fillPrintArea for normal cropping, fitPrintArea when no cropping is acceptable, stretchToPrintArea only when the user explicitly wants distortion.\n- StablePrint charges USD only. Drafts expire; recreate if destination, asset, SKU, copies, sizing, attributes, or quote changes.\n"}