Referencia APIv1DiscountsValidate
Validate a discount code
Check if a discount code is valid for a given order. Returns validity, discount amount, and reason if invalid.
X-API-Key<token>
Per-store API key created in the dashboard at Settings > Developer > API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.whatalo.com/v1/discounts/validate" \ -H "Content-Type: application/json" \ -d '{ "code": "SUMMER20", "order_total": 5000 }'{
"data": {
"valid": true,
"discount_amount": 0,
"reason": "string"
}
}