Practical Ecommerce

Tech Support: Application Programming Interfaces

One of the most exciting trends on the Internet today is interconnectedness. Application programming interfaces (APIs) help make this possible. For example, if I have created a blog at WordPress, I can get a free key to use the API at Akismet, a comment-spam-prevention service. Additionally, if I have a Flickr account, I can get another free key to access its API to display my photos from Flickr on my new blog. By interfacing with other websites, in other words, my blog is now more functional than it used to be. So what are APIs, and why should I pay attention to them?

What is an API?

The first question is much easier than the second, so let’s start with it. When a website such as Flickr offers an API it provides a method for other applications, such as other websites, to access its content. In the same way a person can visit Flickr and be presented with web pages, an API provides a way for computers to visit Flickr and be presented with the requested content.

Here’s an example. Say a user visits the hypothetical blog I spoke of and is presented with images from Flickr via his or her API. First, a request is sent to a particular URL, such as Myblog.wordpress.com, which triggers the server to begin processing the scripts that make up that web page. During this processing period, the server also contacts a particular URL at Flickr, passing some variables such as a user’s access key, user name and any other criteria the API understands. Flickr’s API then responds to the server that made that request, sending it the location of photos that match the user’s request criteria. Now that the user’s blog server has gotten what it needs from the Flickr API, it builds the web page the user asked for in the first place and sends it to him or her. In a nutshell, this is how web services work.

Why focus on APIs?

So if an API is simply a way for computers to interface with each other, why exactly should I pay any attention to it? There are two issues to consider here. As discussed above, by interacting with the Flickr API my blog is able to display photos from my Flickr account. Additionally, by interfacing with the Akismet API, I can protect my blog from comment spam, since comments are first sent to Akismet where they are checked against known spam to determine if they, in fact, qualify as spam. Once the comments clear Akismet, they are allowed to appear on our blog. By taking advantage of the APIs that these services made available, I can seamlessly benefit from their services.

Also consider providing an API for others to use. A website owner may want to implement an API into his or her site in an effort to boost marketing or provide a service to his or her users. For example, let’s pretend the blog I set up earlier is supposed to be a promotional tool for my online store. My intention is to blog about new products available at my online store and how I feel about them as a consumer. By implementing an API, I can have my blog interact with the store and allow me to include the products in my blog. I’ve now created a new method of distributing my content without more maintenance. If I change the product information on my online store, it changes automatically on the blog and any other websites that access the API.

With the amount of new web services created daily, paying attention to which companies are offering APIs can help with important decisions. Providing an API for your partners or customers can help with marketing and with distributing your content. Interacting with an API just might make your website more personable and boost sales.

Brian Getting

Brian Getting

Bio   •   RSS Feed


email-news-env

Sign up for our email newsletter

  1. Legacy User March 20, 2008 Reply

    Very useful and simple article Brian. Thanks!! Are you aware of any blog which uses APIs from a webstore to display products?? Is Amazon already at it?

    — *Arvind*

  2. Legacy User March 20, 2008 Reply

    Great post. Can anyone comment on how to find developers who understand ecommerce/blog environments and their implementation? I am not a programmer and can't do this myself (nor do I have time) and I haven't seen much that makes blog/store interaction possible.

    — *Alan H.*

  3. Legacy User March 20, 2008 Reply

    Great! Sounds cool. Now how do us "regular" folks go about implementing an API? How and where do you get them? Where do you embed them on your website? Etc., etc.

    — *bob n*

  4. Legacy User March 23, 2008 Reply

    This is a superb idea that I have tried to implement into our blog but as I have no knowledge of how API works I have to update the products manually on the blog which features a best sellers list. Heres hoping someone develops a widget to display the best sellers automatically.

    — *Tahir Fayyaz*

  5. Legacy User March 25, 2008 Reply

    APIs are great, but without some inkling of programming knowledge, then like the commenters above said, regular folk just can't cut the mustard. For instance, for our blog, we would love to integrate something like live newsfeeds or even template customization (non-API related), but with limited engineering resources, it just isn't possible.

    Hopefully the less technical can leverage APIs to take advantage of third-party technologies–GUI wrapper anyone?

    Richly Chheuy
    Mediachase
    http://ecommerce.mediachase.com

    — *Richly Chheuy*

  6. Legacy User March 28, 2008 Reply

    APIs can do a lot more for merchants than integrated Flickr feeds and blogs. APIs allow merchants to integrate their stores with third party software such as SalesForce and Endicia. Essentially, you can "plug in" functionality into your store. At Volusion, there are currently resellers who are building and then integrating with apps that send product feeds to hundreds of comparative shopping sites. Others print shipping labels for multiple shipping carriers. With an API, if a cart doesn't have the functionality, you can build it or tie it in and yet still have the security and support of a hosted shopping cart.

    — *Michelle Greer*