API: GET Offer
A way to validate the offer details Banyan is storing
Overview
This endpoint can be used for validation of Banyan's API or to check later on what offer details Banyan is storing.
Developers, please see the API Reference for an interactive example.
URL
api.banyan.com/rest/v1/offer/{{byn_offer_id}} where byn_offer_id is the offer to retrieve
Note: This is the Banyan form of ID received in the response to posting the original offer, not the FinX form of the offer ID.
Example:
api.banyan.com/rest/v1/offer/72b5f9c4-2462-5398-b453-71f4040425d9
Response
Name | Description | Type | Notes |
---|---|---|---|
id | Banyan created ID of the offer object. | String | |
publisher_offer_id | Unique ID provided by the publisher used to create the byn_offer_id as well as the key to tie Banyan data back to FinX internal data | String | |
byn_campaign_id | Banyan created unique ID for the campaign | String | |
return_receipt_detail | Whether the offer redemption record delivered back to the FinX has full receipt details or simply the result | Boolean | Valid values are true, false. Default is true |
byn_advertiser_id | Banyan created client/merchant ID that the campaign is advertising | String | |
byn_publisher_id | Banyan created client/finx ID that the campaign is fulfilled by | String | |
amount_back_limit | The highest amount the customer can receive for the offer | String | Relevant when the offer is a % back of a purchase. If left null, there will be no limit. |
amount_back_per_dollar | Rate of the reward per dollar | String | Examples noted below |
amount_back_type | Whether the reward is dollars or points | String | Potential values: dollars, points, miles |
start_ts | When the offer is valid to be redeemed | RFC3339 | Should be sent in UTC |
expiration_ts | When the offer ends | RFC3339 | Should be sent in UTC. If you want the offer to extend for a long period of time, choose a date far out in the future. |
offer_criteria | Top level object | Object |
offer.offer_criteria
Offer criteria is what is used to determine whether the receipt Banyan receives
Name | Description | Type | Required | Notes |
---|---|---|---|---|
order_types | Purchase method such as web, in_store, or phone | Array of strings | No | |
incl_tags | Key value pairs that represent item attributes that are valid for the offer | Array of key value strings | No | |
excl_tags | Key value pairs that represent item attributes that are invalid for the offer | Array of key value strings | No | |
incl_sku | SKUs that are included in the offer | Array of strings | No | |
excl_sku | SKUs that are excluded from the offer | Array of strings | No | |
amount_threshold | The amount of money that must be spent to qualify for the offer | String | No | Default is 0 |
repeat_amount | How many times can the offer be reused by the same card/account | String | No | Default is 0. A 0 value means that the offer can only be used 1 time |
Example:
{
"data": [
{
"id": "72b5f9c4-2462-5398-b453-71f4040425d9",
"publisher_offer_id": "6edcde44-f440-5dc2-ad20-5369303a27b0",
"campaign_id": "79d42b73-5e20-5513-90bc-dbba39c6de90",
"return_receipt_detail": true,
"byn_advertiser_id": 106,
"byn_publisher_id": 106,
"amount_back_limit": "10",
"amount_back_per_dollar": "0.2",
"amount_back_type": "DOLLAR",
"currency": "USD",
"start_ts": "2022-07-05T15:05:32Z",
"expiration_ts": "2022-08-06T16:06:33Z",
"offer_criteria": {
"order_types": [
"in_store"
],
"incl_tags": [
"category_description:|:BABY CARE"
],
"excl_tags": [
"brand:|:Pampers"
],
"incl_sku": [],
"excl_sku": [],
"amount_threshold": "50",
"repeat_amount": 2
},
"created_ts": "2022-12-08T17:01:24.01582Z",
"updated_ts": "2022-12-08T17:01:24.01582Z"
}
],
"errors": []
}
Updated about 1 year ago