Contextual Offers API
Traffic-context-aware offers. Returns bank offers and promotions filtered by the visitor's traffic context.
All Offers (Home Page)
CRS:
POST /api/v1/crs/offers
Website (auto context):
POST /api/v1/offers
{
"rawParams": [
{ "filterName": "channelId", "filterValues": ["B2C"] }
]
}
Response — Visa visitor:
{
"bankOffers": [
{
"id": "visa-offer-1",
"code": "VISA10",
"title": "10% off with Visa",
"bankName": "Visa",
"offerType": "BANK_OFFER",
"discountMethod": "PERCENTAGE",
"discountPercentage": 10.0,
"maximumDiscountAllowed": 2000,
"termsAndConditions": "Valid on Visa credit/debit cards"
}
],
"promotions": [],
"contextApplied": true,
"sourceRuleId": 1
}
Response — default visitor (no context):
{
"bankOffers": [
{ "id": "visa-offer-1", "title": "10% off with Visa", "offerType": "BANK_OFFER" },
{ "id": "hdfc-offer-1", "title": "15% off with HDFC", "offerType": "BANK_OFFER" }
],
"promotions": [
{ "id": "promo-1", "title": "Early Bird 20%", "offerType": "PROMOTION" }
],
"contextApplied": false
}
Listing-Specific Offers (Detail Page)
POST /api/v1/crs/offers/{listingId}
Same request format. Returns only offers mapped to this listing AND allowed by pricing rules.
Response Fields
| Field | Description |
|---|---|
contextApplied | true if a pricing rule matched |
sourceRuleId | Which rule matched (for debugging) |
bankOffers | Filtered bank offers |
promotions | Filtered promotions |