Coupons
Calculate a coupon discount
Returns the discount amount a coupon produces for a given purchase total, without redeeming it.
POST
/{locale}/shop/coupons/calculate-discountReturns the discount amount a coupon produces for a given purchase total, without redeeming it.
Authorization
apiKey apiSecret X-API-Key<token>
Partner API key from the Partners Portal. Always sent together with X-API-Secret.
In: header
X-API-Secret<token>
Partner API secret. Always sent together with X-API-Key.
In: header
Path Parameters
locale*string
Locale code
Value in
- "lt"
- "en"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/lt/shop/coupons/calculate-discount" \ -H "Content-Type: application/json" \ -d '{ "coupon_code": "SAVE20", "purchase_amount": 50 }'{ "success": true, "code": 200, "request_id": "550e8400-e29b-41d4-a716-446655440000", "message": "Success message", "data": {}}