Chapter 7: Interacting with the Amazon API


Overview

Amazon, while serving as little more than a website and virtual warehouse, has built itself into one of the most recognized names in e-business. With an original product catalog consisting entirely of dead trees, it (with the assistance of partners) has now expanded to sell nearly everything imaginable, from shoes to blenders, diamond rings to dishwashers. Amazon's API offers great flexibility and a possible revenue stream for a site owner. By enrolling in the Associates program, you can earn a percentage of sales generated through your website. This allows site owners to not only present their visitors with relevant products and cross promotions, but also to receive some money for their troubles.

Amazon also offers localized websites from around the globe: Canada, United Kingdom, Germany, Japan, France, and China. Until recently, only a few of these sites offered APIs; however, Amazon launched its API service for all sites in January 2005. Keep in mind, however, that each API offers its own functionality, and not all features are available in all areas. The examples presented in this book are run against the U.S. server, utilizing the WSDL (Web Services Description Language) file for the U.S. as well.

Amazon's API allows for a tremendous variety of different queries, but unfortunately only a few variants can be examined here. The full documentation for the newest version of the API is 457 pages long, which can seem overwhelming at first, but many of the queries are very similar, requiring only a few minor changes to be used.

This chapter examines the following:

  • A simple REST call

  • A simple SOAP call

  • Searching by author or keyword with SOAP

  • Monitoring prices or sales ranks over time

  • Creating a personal storefront




Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
ISBN: 764589547
EAN: N/A
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net