curl --request GET \
--url https://edge.kelviq.com/api/v1/promotions \
--header 'Authorization: Bearer <token>'{
"country": "India",
"countryCode": "IN",
"percentage": 40,
"code": "KQP5LHNZB1Z",
"message": "",
"widgets": [
{
"type": "BANNER",
"backgroundColor": "#3182CE",
"fontColor": "#F9F9F9",
"highlightFontColor": "#DD5C64",
"fontSize": "1rem",
"unStyled": false,
"addCloseIcon": false,
"countryMessage": "Hello {country_flag} Hey! It looks like you are from <b>{country}</b>. Use code <b>“{coupon_code}”</b> to get <b>{discount_percentage}%</b> off.",
"placement": "top",
"borderRadius": "0"
}
],
"security": {
"proxy": false,
"crawler": false,
"vpn": false,
"tor": false,
"relay": false
}
}Resolves the active promotion for the caller’s detected location. Returns the applicable discount percentage, coupon code, banner widget configuration, and security check results.
curl --request GET \
--url https://edge.kelviq.com/api/v1/promotions \
--header 'Authorization: Bearer <token>'{
"country": "India",
"countryCode": "IN",
"percentage": 40,
"code": "KQP5LHNZB1Z",
"message": "",
"widgets": [
{
"type": "BANNER",
"backgroundColor": "#3182CE",
"fontColor": "#F9F9F9",
"highlightFontColor": "#DD5C64",
"fontSize": "1rem",
"unStyled": false,
"addCloseIcon": false,
"countryMessage": "Hello {country_flag} Hey! It looks like you are from <b>{country}</b>. Use code <b>“{coupon_code}”</b> to get <b>{discount_percentage}%</b> off.",
"placement": "top",
"borderRadius": "0"
}
],
"security": {
"proxy": false,
"crawler": false,
"vpn": false,
"tor": false,
"relay": false
}
}The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'
The promotion ID from the Kelviq dashboard.
Promotion data for the visitor's location
Promotion data resolved for the visitor's detected location.
Full name of the visitor's detected country.
"India"
ISO 3166-1 alpha-2 country code.
"IN"
Discount percentage for the visitor's country. 0 means no active discount.
40
Coupon code the visitor can apply at checkout.
"KQP5LHNZB1Z"
Optional plain-text message. Usually empty — the banner message is in widgets[].countryMessage.
""
UI widgets configured for this promotion. Currently contains one BANNER widget.
Show child attributes
Security check results for the visitor. true means the check flagged the request.
Show child attributes