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 activation 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.

Developers, please see the API reference for an interactive experience.

URL

api.banyan.com/rest/v1/offer/activation

Remember this must be done after the offer has been created. To see those details please go here

Body

NameDescriptionTypeRequiredNotes
byn_offer_idThe ID of the offer that the activation belongs toStringYes
publisher_consumer_tokenThe unique ID your organization has for an accountStringYes
cardsThe cards that are valid for the offerArray of stringsYesRequires 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_offer_id": "442576ba-f0e3-4236-b700-1035a19djd7a",
    "publisher_consumer_token": "fe2576ba-f0e3-4256-b700-1035a19d9e7a",
    "cards": ["4003"]
}

Response

NameDescriptionTypeNotes
idBanyan created ID of the offer activation 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 CodeDescriptionExamples
400Bad Request1. Offer activations with a null array of "cards"
403Forbidden
404Not Found