Store Connect – Post Transaction APIs

Post Transaction APIs

Note: Every call made to the Post Transaction APIs must be made via the signed URL process. Any request without a valid signature will be rejected.

Redeem Transaction

This method is to inform Koupon of final basket data for a given barcode scanned (discountAsset) as well as have Koupon remove an offer (couponCode) from being shown the customer that presented that barcode at the POS.

POSThttp://storeconnect.kouponmedia.com/v1/transaction/redeem

POST Body Options

Parameter Required/Optional Description
redemptions required An array of redemptions, represented by Offer Barcodes or Loyalty Ids and offers. Each asset in the array must be a unique ‘discountAsset’ or ‘discountAsset’/’couponCode’ pair.
redemptions[x].discountAsset required The description of the product. Required.
redemptions[x].couponCode required The Coupon Code representing the offer being redeemed for a Loyalty Account. Required if ‘id’ is a Loyalty Id; must be omitted otherwise.
redemptions[x].qty required The quantity of redemptions to apply for the asset.

Example POST Body

    
{
    "redemptions":  [  
        {
            "discountAsset": String,
            "couponCode": String,
            "qty": PosNumber
        }  ...  
    ]
}
    

Success Response

    
{
    "results":  [
{
    "discountAsset": String,
    "couponCode": String,
    "redeemedQty": PosNumber,
    "exceptionCode":  String
        }  ...
    ]
}

Failure Response

    
{
    "version":  String,
    "errorCode":  String,
    "errorMessage":  String
}
    

Report Offer Post Transaction

For analytics purposes, this method is to be used when the POS is informing Koupon that a transaction happened. This method will not apply any discounts and will not redeem any offers, this method simply allows the ability for Koupon to receive transactions that analytics will be performed upon.

POSThttp://storeconnect.kouponmedia.com/v1/transaction/report

POST Body Options

Parameter Required/Optional Description
timestamp required The time, in UTC, that the POS Transaction was completed, in ISO 8601 time format, UTC (e.g. “2016-12-01T16:41:37Z”).
currency optional The currency type indicated in the Transaction. Only “USD” supported currently. Optional; “USD” is assumed if absent.
products optional An array of products that have been scanned by the POS (“basket”). Optional.
products[x].index required The index of the product in the basket. Required.
products[x].description required The description of the product. Required.
products[x].scanCode required The barcode of the product. Required.
products[x].price required The selling price of the product. Required.
products[x].quantity required The quantity of the products. Required.
summary optional Contains summary information about the Transaction.
summary.subTotal required The gross subtotal of all the products scanned, before application of discounts. Required.
summary.totalDiscounts optional The gross subtotal of all of the discounts applied. Optional.
summary.total required The net total of the basket, with discounts applied and tax added. Required.
discountAssets required The Loyalty Card or single use barcode that was scanned at the POS. Required.

Example POST Body

    
{
  "timestamp": ISOTime,
  "currency": Enum,
  "products": [
    {
      "index":  Digits,
      "description":  String,
      "scanCode":  String,
      "price":  Decimal,
      "quantity":  NonNegNumber,
      "discounts":  []
    }  
    ...
  ],
  "summary": {
    "subTotal":  Decimal,
    "totalDiscounts":  Decimal,
    "total":  Decimal
  },
  "discountAssets":  [  String,  ...  ],
}
    

Success Response

    
{
    "version":  String,
    "code":  Digit,
    "message":  String
}
    

Failure Response

    
{
    "version":  String,
    "errorCode":  String,
    "errorMessage":  String
}