API Glossary
Every API call will include your api_username and api_key. They will also have a method, which is the name of the command being called, and the return type-- how you'd like the results formatted.
Every API call will include your api_username and api_key. They will also have a method, which is the name of the command being called, and the return type-- how you'd like the results formatted.
Parameters:
http://amazonpepr.com/api/?api_username=[sampleUsername]&api_key=[sampleApiKey]&method=get_metadata&isbn=9780023078255&results=json
{
"success":true,
"message":"Item metadata retrieved successfully.",
"query":{
"isbn":"9780023078255",
"timestamp":1421872126
},
"metadata":{
"author":"Immanuel Kant",
"binding":"Paperback",
"edition":"2",
"image_small":"http:\/\/ecx.images-amazon.com\/images\/I\/71BTSBMRSXL._SL75_.gif",
"image_medium":"http:\/\/ecx.images-amazon.com\/images\/I\/71BTSBMRSXL._SL160_.gif",
"image_large":"http:\/\/ecx.images-amazon.com\/images\/I\/71BTSBMRSXL.gif",
"isbn10":"0023078251",
"isbn13":"9780023078255",
"pages":"90",
"published_date":"1989-10-15",
"publisher":"Pearson",
"title":"Foundations of the Metaphysics of Morals"
}
}
This is what the above data looks like after decoding the json into an associative array:
Array
(
[success] => 1
[message] => Item metadata retrieved successfully.
[query] => Array
(
[isbn] => 9780023078255
[timestamp] => 1421872511
)
[metadata] => Array
(
[author] => Immanuel Kant
[binding] => Paperback
[edition] => 2
[image_small] => http://ecx.images-amazon.com/images/I/71BTSBMRSXL._SL75_.gif
[image_medium] => http://ecx.images-amazon.com/images/I/71BTSBMRSXL._SL160_.gif
[image_large] => http://ecx.images-amazon.com/images/I/71BTSBMRSXL.gif
[isbn10] => 0023078251
[isbn13] => 9780023078255
[pages] => 90
[published_date] => 1989-10-15
[publisher] => Pearson
[title] => Foundations of the Metaphysics of Morals
)
)
Parameters:
http://amazonpepr.com/api/?api_username=[sampleUsername]&api_key=[sampleApiKey]&method=get_price&isbn=9781455707072&location_id=2&include_debug=true&results=json
{
"success":true,
"message":"Item price retrieved successfully.",
"price":"23.25",
"winner":"Ingram Guide",
"query":{
"isbn":"9781455707072",
"location_id":"1",
"include_debug":true,
"timestamp":1421882481
},
"metadata":{
"author":"Abul K. Abbas MBBS",
"binding":"Paperback",
"edition":"4",
"image_small":"http:\/\/ecx.images-amazon.com\/images\/I\/51WVvYhdP%2BL._SL75_.jpg",
"image_medium":"http:\/\/ecx.images-amazon.com\/images\/I\/51WVvYhdP%2BL._SL160_.jpg",
"image_large":"http:\/\/ecx.images-amazon.com\/images\/I\/51WVvYhdP%2BL.jpg",
"isbn10":"1455707074",
"isbn13":"9781455707072",
"pages":"336",
"published_date":"2012-11-27",
"publisher":"Saunders",
"title":"Basic Immunology: Functions and Disorders of the Immune System, 4e"
},
"debug":{
"salesrank":"4629",
"amazon_price_list":null,
"amazon_price_lowest_new":"42.09",
"amazon_price_lowest_used":"38.55",
"amazon_quantity_new":"56",
"amazon_quantity_used":"49",
"wholesalers":{
"Ingram Guide":{
"name":"Ingram Guide",
"price_after_rules":"23.25",
"price_original":"30.39",
"guide_start_date":"2015-01-14",
"guide_end_date":"2015-02-14",
"rules_used":[{
"name":"Baseline",
"sort_order":"1",
"condition":"always:",
"action":"then the purchase price decreases by 15%.",
"price_before":"30.39",
"price_change":4.5585,
"price_after":25.8315
},{
"name":"Test Rule 2",
"sort_order":"3",
"condition":"if amazon salesrank is in the range of 1-10000",
"action":"then the purchase price decreases by 10%",
"price_before":25.8315,
"price_change":2.58315,
"price_after":23.24835
}]
},
"Nebraska":{
"name":"Nebraska",
"price_after_rules":"17.60",
"price_original":"23.00",
"guide_start_date":"2014-12-08",
"guide_end_date":"2015-01-08",
"rules_used":[{
"name":"Baseline",
"sort_order":"1",
"condition":"always:",
"action":"then the purchase price decreases by 15%.",
"price_before":"23.00",
"price_change":3.45,
"price_after":19.55
},{
"name":"Test Rule 2",
"sort_order":"3",
"condition":"if amazon salesrank is in the range of 1-10000",
"action":"then the purchase price decreases by 10%",
"price_before":19.55,
"price_change":1.955,
"price_after":17.595
}]
}
}
}
}
This is what the above data looks like after decoding the json into an associative array:
Array
(
[success] => 1
[message] => Item price retrieved successfully.
[price] => 23.25
[winner] => Ingram Guide
[query] => Array
(
[isbn] => 9781455707072
[location_id] => 1
[include_debug] => 1
[timestamp] => 1421882481
)
[metadata] => Array
(
[author] => Abul K. Abbas MBBS
[binding] => Paperback
[edition] => 4
[image_small] => http://ecx.images-amazon.com/images/I/51WVvYhdP%2BL._SL75_.jpg
[image_medium] => http://ecx.images-amazon.com/images/I/51WVvYhdP%2BL._SL160_.jpg
[image_large] => http://ecx.images-amazon.com/images/I/51WVvYhdP%2BL.jpg
[isbn10] => 1455707074
[isbn13] => 9781455707072
[pages] => 336
[published_date] => 2012-11-27
[publisher] => Saunders
[title] => Basic Immunology: Functions and Disorders of the Immune System, 4e
)
[debug] => Array
(
[salesrank] => 4629
[amazon_price_list] =>
[amazon_price_lowest_new] => 42.09
[amazon_price_lowest_used] => 38.55
[amazon_quantity_new] => 56
[amazon_quantity_used] => 49
[wholesalers] => Array
(
[Ingram Guide] => Array
(
[name] => Ingram Guide
[price_original] => 30.39
[price_after_rules] => 23.25
[guide_start_date] => 2015-01-14
[guide_end_date] => 2015-02-14
[rules_used] => Array
(
[0] => Array
(
[name] => Baseline
[sort_order] => 1
[condition] => always:
[action] => then the purchase price decreases by 15%.
[price_before] => 30.39
[price_change] => 4.5585
[price_after] => 25.8315
)
[1] => Array
(
[name] => Test Rule 2
[sort_order] => 3
[condition] => if amazon salesrank is in the range of 1-10000
[action] => then the purchase price decreases by 10%
[price_before] => 25.8315
[price_change] => 2.58315
[price_after] => 23.24835
)
)
)
[Nebraska] => Array
(
[name] => Nebraska
[price_original] => 23.00
[price_after_rules] => 17.60
[guide_start_date] => 2014-12-08
[guide_end_date] => 2015-01-08
[rules_used] => Array
(
[0] => Array
(
[name] => Baseline
[sort_order] => 1
[condition] => always:
[action] => then the purchase price decreases by 15%.
[price_before] => 23.00
[price_change] => 3.45
[price_after] => 19.55
)
[1] => Array
(
[name] => Test Rule 2
[sort_order] => 3
[condition] => if amazon salesrank is in the range of 1-10000
[action] => then the purchase price decreases by 10%
[price_before] => 19.55
[price_change] => 1.955
[price_after] => 17.595
)
)
)
)
)
)
Coming Soon!