5 Products And Coupons API

Products and coupons API allows publishers and merchants get a list of products / coupons shared with them by vendors and request redemption pins for those products / coupons. As a redemption pin is received they provide the pin to a consumer who can redeem the pin at a vendor's property (whether online on e-commerce site or offline in a physical store).

The following products / coupons are supported:
  • Prepaid products (gift cards, wireless, pre-sales, etc.)
  • Prepaid promotions (discounts for prepaid products limited by quantity)
  • Coupons (Single Use and Generic)
  • Music (songs and albums)
  • Movies (purchase or rent)
  • eBooks
  • Electronic Magazines

Get a list of products / coupons
Request

GET https://api.sandbox.adility.com/products?filter

NOTE: You can build up a filter for product / coupons based on type, denomination, location, quantity, etc.

Response

{
    "status": "OK",
    "products": [
        {
            "id": "c4c731bc2d4b6c6e3e379215e48d63da",
            "type": "giftcard",
            "price": "25.00",
            "denom": "50.00",
            "title": "$50 iTunes Gift Card",
            "redemption": {
                "instructions": "<p>Go to <a href=\"http://store.apple.com\">http://store.apple.com</a>, sign into your account and follow the instructions for redemption codes.</p>"
            },
            // might be other attributes for other types of products / coupons
                 },
                 {
                    // another product
                 },
                ...
        ]
}

Request Redemption Pin
Request

POST https://api.sandbox.adility.com/items

{
    "item": {
        "product": {
            "id": "c4c731bc2d4b6c6e3e379215e48d63da",
        }
    }
}

Response

{
    "status": "OK",
    "item": {
        "id": "ff00c047e87260f7c69e55341edf7fae",
        "status": "active",
        "redemption": {
            "pin": "ER5T-08N7-3JD6-KDH1"
        }
    }
}

Void Redemption Pin
Request

PUT https://api.sandbox.adility.com/items/ff00c047e87260f7c69e55341edf7fae

{
    "item": {
        "status": "voided"
    }
}

Response

{
    "status": "OK",
    "item": {
        "id": "c4c731bc2d4b6c6e3e379215e48d63da",
        "status": "voided"
    }
}


Comments