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.