API: POST Offer Activation
Overview
An offer activation is the relationship between an offer and a user's account or specific card sourced from the publisher of the offer. If an offer is account wide, you must include all cards that belong to the user to ensure that they will receive the offer reward no matter which card is used. If a new card is added to an account later on, a new offer mapping must be created with the new card and the existing offer.
Offer activations are used by Banyan to know which receipts on the Banyan network to assess for offers. If an offer activation is missing either a consumer token or a card last four, it will not be considered for an offer redemption.
In this POST, the offer id is supplied as part of the path and the body of the call has all of the details in it described above.
URL
api.banyan.com/rest/v1/offer/{{offer_id}}/activation where offer_id is the byn_offer_id supplied after submitting an offer here
Body
Name | Description | Type | Required | Notes |
---|---|---|---|---|
byn_publisher_id | The ID given to your organization from Banyan | Numeric | Yes | Reach out to your Customer Support representative if you are unsure what your byn_publisher_id is |
publisher_consumer_token | The unique ID your organization has for an account | String | Yes | |
cards | The cards that are valid for the offer | Array of strings | Yes | Requires that there be at least one card |
Example:
POST http://api.banyan.com/rest/v1/6edcde44-f440-5dc2-ad20-5369303a27b0/activation
Bearer: {token_id}
Content-Type: application/json
Accept: application/json
{
"byn_publisher_id": 106,
"publisher_consumer_token": "fe2576ba-f0e3-4256-b700-1035a19d9e7a",
"cards": ["4003"]
}
Response
Name | Description | Type | Notes |
---|---|---|---|
id | Banyan created ID of the offer mapping object. | String |
Example:
{
"data": [
{
"id": "5e811ab5-0be4-5b39-87a9-e2c5423c0cc5",
"byn_offer_id": "6edcde44-f440-5dc2-ad20-5369303a27b0",
"byn_publisher_id": 106,
"publisher_consumer_token": "fe2576ba-f0e3-4256-b700-1035a19d9e7a",
"cards": [
"4003"
],
"created_ts": "2022-12-06T21:44:27.474869Z",
"updated_ts": "2022-12-06T21:44:27.474869Z"
}
],
"errors": []
}
Error Code | Description | Examples |
---|---|---|
400 | Bad Request | 1. Offer mappings with a null array of "cards" |
403 | Forbidden | |
404 | Not Found |
Updated 4 days ago