MP3-Music-Store API

General Information

The MP3-Music-Store API allows for easy access to the enormous mp3-database Amazon offers to it's customers. Amazon has a unique database where every item has exactly one ID, a so called ASIN. ASINs are unique even internationally, so that there is no ASIN from the German AmazonStore that you can find in the American store.
Our API offers three general calls: Search for titles and albums with keywords, LoadAlbum for a specific album as defined by an ASIN, and CreateCart which creates a cart on the Amazon webpages and returns the link for the user to checkout.
A typical call to our API is a HTTP GET Request, the parameters appended like this: http://www.mp3-music-store.de/index.php?method=LoadAlbum&apikey=27274503cb405cb1929f353fc507f09c&Location=de&Player=amarok&ASIN=B001SW8TFC&output=json
With the ASINs returned by this query you can do many useful things for example load a 30 second music sample from Amazon: http://www.amazon.de/gp/dmusic/get_sample_url.html?ASIN=B001SVU3GG
Be careful to allways load from the right locale for your ASIN, for example a German ASIN will allways lead to an error on Amazon-America.

Functions

Function::Search
Parameters:(String) $method = Search
 (String) $apikey
 (String) $output
 (String) $Location
 (String) $Player
 (String<base64>) $Text
 (String<base64>) $Author
 (String<base64>) $Title
 (String) $Page
Description:Searches the Amazon Website defined by the Location for the given Parameters. The $Text,$Author and $Title Strings have to be base64 encoded data.
Return:XMLElement::searchresponse

Function::LoadAlbum
Parameters:(String) $method = LoadAlbum
 (String) $apikey
 (String) $output
 (String) $Location
 (String) $Player
 (String) $ASIN
Description:Searches the Amazon Website defined by the Location for the given Parameters.
Return:XMLElement::searchresponse

Function::CreateCart
Parameters:(String) $method = CreateCart
 (String) $apikey
 (String) $output
 (String) $Location
 (String) $Player
 (Array<String>) $ASINs
Description:Adds the Items defined by $ASINs to a cart and returns the purchaseurl for that cart.
Return:XMLElement::createcartresponse


Variable Values

Value::apikey
Parametername:apikey
Type:String
Description:The apikey to gain access to the MP3-Music-Store API.
Supported Values:Please contact a member of Krohlas&Wingert IT GbR for access for your application.

Value::output
Parametername:output
Type:String
Description:The output method of the results.
Supported Values:json|xml default: xml

Value::Location
Parametername:Location
Type:String
Description:The Location indicator tells the backend which amazon country specific version to query.
Supported Values:de|fr|co.uk|co.jp

Value::Player
Parametername:Player
Type:String
Description:The Player indicator tells the backend which player the request was routed through in order to assign sales revenue.
Supported Values:Please contact a member of Krohlas&Wingert IT GbR for access for your application.

Value::Text
Parametername:Text
Type:String
Description:The Text string has to be base64 encoded in order to be treated correctly, it contains the Keywords to be searched for.
Supported Values:Any Base64 encoded String.

Value::Author
Parametername:Author
Type:String
Description:The Author string has to be base64 encoded in order to be treated correctly, it contains the Author name to be searched for.
Supported Values:Any Base64 encoded String.

Value::Title
Parametername:Title
Type:String
Description:The Title string has to be base64 encoded in order to be treated correctly, it contains the songtitle to be searched for.
Supported Values:Any Base64 encoded String.

Value::Page
Parametername:Page
Type:String
Description:The Page indicator tells the backend which page of the request to show.
Supported Values:Numbers, default 1.

Value::ASIN
Parametername:ASIN
Type:String
Description:The ASIN string has to be a valid Amazon Standard Identification Number for the system to return valid output. Please be aware that ASINs may vary according to Location, an ASIN from de might not be valid in us and so on.
Supported Values:Any ASIN recognized by Amazon.

Value::ASINs
Parametername:ASINs
Type:Array<String>
Description:The ASINs stringarray has to be built out of valid Amazon Standard Identification Numbers for the system to return valid output. Please be aware that ASINs may vary according to Location, an ASIN from de might not be valid in us and so on.
Supported Values:Any Array containing ASINs recognized by Amazon.


Answer Elements


XMLElement::searchresponse
Content:XMLElement::albums
 XMLElement::tracks

XMLElement::albums
Content:XMLElement::Item
Comment:String::title not present

XMLElement::tracks
Content:XMLElement::Item
Comment:String::img not present

XMLElement::item
Content:String::asin
 String::artist
 String::album &
 String::albumasin or XMLElement::album
 String::title
 String::price
 String::img
Comment:String::img and String::title not allways present. The order given here will allways be the order of the output.

XMLElement::album
Content:String::asin
 String::artist
 String::album
Comment:Special subtype for XMLElement::item.

XMLElement::createcartresponse
Content:String::purchaseurl
Comment: