How APIs are Fueling Modern Day Affiliate Marketing

Have APIs reached their potential with affiliate marketing programs? As the API economy continues on its journey, we may see more applications for APIs in the affiliate marketing industry. Meanwhile, this article outlines how APIs serve affiliate marketing programs today.

Affiliate marketing is a proven revenue channel for publishers that have good visitor traffic.  For these publishers, affiliate programs work when the publisher can automate the contextual presentation of relevant, interesting content about products or services. For example, if a national musical gear retailer can automate the serving of contextually relevant content into a third party blog about guitars, and if that content is compelling enough for a reader of that blog  to “click” and visit the merchant site to make a purchase, then the blog’s publisher has done their job and earned a commission. But, for the publisher, the mark of death is when the content grows old or the links refer to inactive destinations.

Before APIs, publishers would garner a collection of images and paragraphs of content from the merchant or the affiliate network representing the merchant.  This content may have been of great quality, but it could not shed the risk of becoming stale or having links become outdated. One approach to mitigate this problem required the publisher to sacrifice a section of real estate on their site for a snippet of code to render a data Feed. Though possible, before APIs, the “snippet approach” made it hard for the publisher to integrate dynamic content throughout their site.

With APIs, the publisher has these advantages:

  • Real-time data that is current, accurate and the best the supplying-merchant has to offer;
  • Pre-formatted links, pre-loaded with the publisher ID, ensuring the publisher gets credit for redirecting shoppers to the merchant;
  • Response data in conventional XML or JSON formats so the publisher can integrate the content as they choose.

APIs are available with the affiliate networks as well as with some programs that work directly with merchants.

Of course, use of an API with an affiliate program brings with it the publisher's share of work. The publisher has the tasks of registering with the API program, obtaining needed API security credentials, and the coding to call the API; a skill that not-all content publishers are ready for. There are many API industry proponents that want to steer API evolution towards developer-free implementations and the affiliate marketing space will be a prime candidate for that kind of progress.

Let’s quickly look at two examples of APIs enhancing an affiliate program. The first, Best BuyTrack this API, uses the LinkShare (now Rakuten) affiliate network, and the second, SHOP.COM, is a direct to merchant program.

Best Buy via LinkShare

Once you have registered for the Best Buy Affiliate program and the Best Buy Developer program, you will have a LinkShare ID (LID) and an API Key to make calls to the Best Buy services.

A service call may look like this:


The response you would receive will be machine readable, enabling you to work with its contents as you wish.  In that response, you can expect pre-formatted links that may look like this:


Notice in this example how the “LID” (abcd12345) is carried forward from the service call to the response, and is in the LinkShare URL as the “id”.  This redirect link will take the user to the appropriate page on the Best Buy site, manage the LinkShare tracking, and give the publisher due credit.  Of most importance is that this link came back via an API response, so its current and active (often-touted as a benefit of hypermedia APIs). As the Best Buy page URL for this product changes, so will the link provided back in the API response.


Once you have registered with the SHOP.COM publisher program and the SHOP.COM developer porgram, you will have a publisher ID and an API Key to make calls to the SHOP.COM Product API services.

Here is an example call to get product details and referral links from SHOP.COM:


The JSON response will have current details of the product that will be easy for the publisher to ingest and use as they wish.  Along with the product details, pre-formatted referral links to the active page for this product are also provided:

     "rel": "referralPage",
     "href": "",
     "type": "text/html"

Again, the product content and the referral links from the SHOP.COM service are always current and accurate, and enable the publisher to integrate the content and links into their site as they think will be most affective in driving referrals.

It's arguable that APIs show their full GET potential in the affiliate marketing space as they provide a real-time, easy to use channel for merchants to supply data to publishers. In some cases, APIs also flex their POST muscles and provide the ability for the publisher to create and load a shopping cart or even initiate  payment without ever redirecting the user to the merchant’s site.

And, if APIs progress down the path of providing developer-free implementations, the publishers in the affiliate marketing industry are an eager audience waiting for those advancements.

Be sure to read the next Marketing article: How to Build a Wrapper for External Calls Using the HuffPost Pollster API