Results for a specific product


Amazon’s Web services API also supports making requests by ASIN, which is a unique identifier for each of the products Amazon sells. By passing a specific ASIN number to my details page and using that ASIN to request data from Amazon, as shown in Listing D, I can access a lot of information about that product. You can see that I have set the searchRequestType to heavy here, which means I’ll get more information back regarding this product than I would for the first request, which was set to lite.

The code in Listing D is similar to the previous Web service call. However, this time I’m passing in the ASIN from the first page through a URL variable. As you can see from Listing E, the output is also similar to the previous example (in Listing B), but this time, since I chose the heavy for the result type, I have more product data to work with.

For the example in Listing E, the details page displays a larger image for the item along with sales ranking and several customer reviews, data the lite request does not return. The API documentation explains all of the different types of data you have access to, which is pretty impressive. You can call up similar products, UPC codes, publishers, age groups, and track listings.

The entire range of Amazon products are available through its API, including DVDs, software, and, books. Amazon even supplies methods to let people add items to their Amazon shopping cart, wish lists, and even to purchase items. So as an affiliate, you could actually make some cash from your Web site

Additional request types you can use include searching by author and by Amazon-specific features like Listmania searches and wish lists. The code for invoking these other Web services is similar to the examples I provided above. You just need to check the documentation to determine what data a specific request needs and what format its results will be returned in.

We’re starting to see more useful Web services appear, and the pace is only going to accelerate. I hope these examples show how easily you can use ColdFusion MX to leverage Amazon’s Web services. When it comes to consuming Web services, CFMX’s simplicity puts ColdFusion developers in a position to greatly capitalise on this exciting new standard.

Related links

Comments

1

vani kor - 13/01/09

http://www.builderau.com.au/architect/webservices/soa/SOAP-Web-services-with-ColdFusion-MX/0,339024590,320272486,00.htm

none of the listings (A,B,C,) work. Listing A has the url http://www.builderau.com.au/architect/webservices/soa/SOAP-Web-services-with-ColdFusion-MX/0,339024590,320272486,00.htm

and its broken.

Would appreciate if these listings are provided. thanks!

» Report offensive content

Leave a comment

You must read and type the 6 chars within 0..9 and A..F

* indicates mandatory fields.

1

vani kor - 13/01/09

http://www.builderau.com.au/architect/webservices/soa/SOAP-Web-services-with-ColdFusion-MX/0,339024590,320272486,00.htm none of the listings (A,B,C,) work. Listing A has the url http://www.builderau.com.au/architect/webservices/soa/SOAP-Web-services-with-ColdFusion-MX/0,339024590,320272486,00.htm and its broken. Would appreciate if these listings are provided. thanks! ... more

Log in


Sign up | Forgot your password?

Most popular tags

What's on?

  • Optus Deal

    Broadband + home phone + PlayStation®3 in a single package price!