Checkout
Add Item to Cart
Once a cart has been created you can begin adding items to it. Items are added by their SKU ID. SKUs can be found by searching the product catalog, and then selecting the desired SKU of the desired offer.
POST /checkout/cart/{cart_id}/skus
Add an item to a specific cart given product SKU. API Reference: Add SKU to Cart
Request
cart_id
the ID of the cart you would like to add this SKU to.
Required Body Parameters:
sku_idrequired
the ID of the SKU you wish to add to the cart.
Optional Query Parameters:
quantity
the quantity of this item you wish to purchase. Note: the current upper limit for quantity is 10, and the lower limit is 1. Any values above 10 will default to 10 and any values below 1 will default to 1. If no quantity is passed the value will default to 1.
Curl
curl -X POST https://sandbox-api.violet.io/v1/checkout/cart/{cart_id}/skus \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"sku_id": 999, "quantity": 1}'