Add To Cart
add_to_cartAdds a product SKU to a specified cart, creating it if absent. Fails if the SKU is unknown or out of stock; does not decrement stock.
Instructions
Add a product to a cart. Does not decrement stock.
Example: cart_id=cart-1, product_id=SKU-1001, qty=1. Use any new cart id; the cart is created if it does not exist. Fails if the SKU is unknown or out of stock (try SKU-1002 to see that error).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | ||
| cart_id | Yes | Client-generated cart handle, e.g. cart-123 | |
| product_id | Yes | Alphanumeric product SKU (hyphens ok), e.g. SKU-1001 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||