Add Discount to Cart

Add discounts to a cart given its cart_id.

Discounts are added at a per merchant level and each merchant is required to have created this discount code in their E-Commerce platform prior to being applied through Violet. You can read more about discount codes here.

Add Discount to Cart

post
Path parameters
cart_idinteger · int64Required
Query parameters
price_cartbooleanOptionalDefault: false
Header parameters
X-Violet-TokenstringRequired
X-Violet-App-SecretstringRequired
X-Violet-App-Idinteger · int32Required
Body

Details of the discount being applied to a cart.

codestring · min: 1 · max: 255Required

Discount code being applied.

merchant_idinteger · int32Required

ID of the Merchant the discount belongs to.

emailstring · max: 255Optional

Optional customer email address, possibly necessary for once-per-customer discounts.

Responses
200

success

application/json
post
/checkout/cart/{cart_id}/discounts

Last updated

Was this helpful?