Add custom print to cart
add_custom_to_cartAdd a finished custom print to the cart as a chosen garment and size and return the updated cart; use it only after the print is ready and product and size are selected.
Instructions
Put a finished custom print (from generate_custom_print) into the cart as a garment and return the updated cart. Call it once get_studio_status reports done and the human has chosen product and size; for catalog designs use add_to_cart instead. product is the garment the human picked in get_studio_options (default mens_oversize_tshirt); size must exist for it — an error lists the sizes. Adding the same print on the same product and size again grows that line (max 99). An unfinished print returns 'print is not ready' and nothing is added. Then checkout goes as usual: set_shipping_address → get_order_preview → prepare_order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | Quantity (default 1, max 99). | |
| size | Yes | Size label; must be available for the chosen product. | |
| product | No | Studio garment base, as chosen in get_studio_options (default mens_oversize_tshirt). | |
| print_id | Yes | Finished print id — get_studio_status must report status=done. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present instead of a cart when the call failed (bad index, unavailable size, ...). | |
| items | No | Cart lines in index order — this index is what update_cart_item takes. | |
| currency | No | ||
| subtotal | No | Sum of price x qty over all lines, USD. | |
| checkout_url | No | Cart page URL for the human. |