Step 4: Fetching Offers
Triple let's you build custom user interfaces and experiences by leveraging API responses in your own code. Alternatively, you can leverage the existing Triple UI components or interface, which you can white label (contact Triple for more information). For this getting started example, we'll show you how to fetch offers, offer details, and capture user events. You can then use the various responses to create your own user interfaces.
Prerequisites
Before you perform this step, make sure that:
- You have an active authentication token.
- You have registered card accounts.
Retrieving Offers
You can retrive offers one or two ways:
- Retrieve a batch of offers (max. 1,000) via search
POST /partner/card-accounts/{carhdolder_id}/offers.search
- Retrieve recommended offers for a cardholder via
POST /partner/card-accounts/{cardholder_id}/offers.recommendations
offers.search
{
"apply_filter": {
"category": "AUTOMOTIVE",
"exclude_activated_offers": false,
"exclude_content_provider_ids": [
"triple-abc-123"
],
"exclude_offer_ids": [
"triple-abc-123"
],
"include_offer_ids": [
"triple-abc-123"
],
"mode": "ONLINE",
"type": "CARD_LINKED",
"activation_required": true
},
"page_offset": 0,
"page_size": 25,
"proximity_target": {
"country_code": "US",
"latitude": "40.440624",
"longitude": "-79.995888",
"postal_code": "15206",
"radius": 35000
},
"text_query": "italian food"
}
offers.recommendations
{
"apply_filter": {
"category": "AUTOMOTIVE",
"exclude_activated_offers": false,
"exclude_content_provider_ids": [
"triple-abc-123"
],
"exclude_offer_ids": [
"triple-abc-123"
],
"include_offer_ids": [
"triple-abc-123"
],
"mode": "ONLINE",
"type": "CARD_LINKED",
"activation_required": true
},
"include_categories": [
"AUTOMOTIVE",
"CHILDREN_AND_FAMILY",
"ELECTRONICS",
"ENTERTAINMENT",
"FINANCIAL_SERVICES",
"FOOD",
"HEALTH_AND_BEAUTY",
"HOME",
"OFFICE_AND_BUSINESS",
"RETAIL",
"SERVICES_AND_SUBSCRIPTIONS",
"TRAVEL",
"UTILITIES_AND_TELECOM"
],
"include_modes": [
"ONLINE"
],
"proximity_target": {
"country_code": "US",
"latitude": "40.440624",
"longitude": "-79.995888",
"postal_code": "15206",
"radius": 35000
},
"page_offset": 0,
"page_size": 100
}