discounts.code.apply
This request validates a shopper-submitted discount code and applies the discount to the cart if it exists.
Authorization
ApiKeyAuth X-API-KeyX-API-Key<token>
Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard.
In: header
Scope: X-API-Key
Header Parameters
X-Bolt-Hmac-Sha256?string
Bolt sends a signed HMAC for hook verification
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/discounts.code.apply" \ -H "Content-Type: application/json" \ -d '{}'{ "event": "discounts.code.apply", "status": "success", "data": { "discount_code": "SUMMERFUN15", "description": "Take 15% off of your order.", "discount_type": "percentage", "discount_amount": 754, "category": "hats" }}