Add to Card API

Add to Card API

Koupon Media’s Add to Card Loyalty Solution enables a retailer launch a loyalty-linked offer program. In Koupon’s solution, offers are viewed in a mobile app or mobile web experience, added by the customer to their loyalty account, and redeemed by scanning a loyalty barcode at the register. This article explains how a retailer can use the Koupon Platform to implement this functionality.

Generating a Loyalty Barcode for a Customer

Offer Content

    1. Consumer downloads the loyalty application from their devices app store.
    2. Consumer enters in their registration information, such as email, password, date of birth, etc.
    3. This information is sent to the Loyalty CRM managed by the Retailer.
    4. The loyalty CRM stores all of the consumer registration information and generates a unique customer loyalty ID, which is then sent back to the mobile application.
    5. This loyalty ID then sent to Koupon via the Register Consumer method in the POST body as the loyalty value.
POSThttp://consumer.kouponmedia.com/v2/consumer

POST Body


{
  "loyalty": "d7g459546d805a64",
}

Example Response


{
  "code": 200,
  "message": "success",
  "version": "2",
  "consumer_identity": "fb4a8d42-c772-43a6-9586-d805a64f1ab2",
  "loyalty_barcode": "12345678912345"
  "loyalty_barcode_image": "https:\/\/c8155755.ssl.cf2.rackcdn.com\/96acc940-f14d-4b38-98db-9fb108313c0f.jpeg"
}

  1. The Register consumer response contains a loyalty_barcode value which is sent back to the application to be used as the barcode value for this specific logged in consumer.
  2. Once the loyalty_barcode is returned from Koupon Media, then that value can be presented to the consumer in PDF417 format on the device.

Displaying a Customer’s Available Offers

Offer Content

    1. Retrieving all offers for a consumer involves making a call to our Consumer GET Offers API which returns back with all offers that have not expired or been used. NOTE: Ellipses (…) have been used to omit attributes of the offers that are not necessary for loyalty integration.
GEThttp://consumer.kouponmedia.com/v2/consumer_identity/offers

Example Response


{
  "code": 200,
  "message": "success",
  "version": "2",
  "Offers": [
    {
      ...
      "offerId": 87853,
      "loyaltyCard":{
         "discount_code": "23423235434324", 
         "added": true
        }
      ...
    },
    {
      ...
      "offerId": 13434,
      "loyaltyCard":{
         "discount_code": "23423235434324", 
         "added": true
        }
      ...
    },
  ]
}

  1. The response from the Consumer GET Offers API contains an array of offer objects, each of which have a state and offerStyle associated with them. The application will display “Offer Added” text on the offer if the state is added. Any other offer state the application will display an active Add To Card button which will inform the consumer that this offer can be linked to their loyalty account.

Adding Offers to a Customer’s Loyalty Card

Offer Content

    1. The consumer now has a list of offers, all of which have not been added. The consumer must then be able to select Add To Card on each offer to show their intention of redeeming this offer in store.
    2. The consumer taking an action of adding an offer translates to updating the state of that offer to added. This will allow the POS to recognize this offer and will also update the state of the offer on the Consumer Get Offers call so that the next time this consumer opens up their application, they will not have the ability to add the offer again.
POSThttp://consumer.kouponmedia.com/v2/<consumer_identity>/offers/loyalty/<offerId>

Example Response


{
  "version": "2",
  "state": "added",
  "code": 200,
  "message": "success"
}

Retrieving Added Offers at the POS

To learn more about integrating Koupon Media’s Add to Card solution with your Point-of-Sale, please visit our Store Connect page.