Get Price

Parameters:

  • api_username - Required. Your company's API username. Found in your company page.
  • api_key - Required. Your company's API key. Found in your company page.
  • method - Required. This method name is 'get_price'.
  • results - Optional. Your results can be formatted in xml or json. AmazonPepr uses json by default.
  • isbn - Required. The 10 or 13 digit ISBN of the product you want information on.
  • location_id - Optional. Some pricing rules and behaviors can be tied into one of your company's locations. Check your company page to see your locations and their IDs.
  • include_debug - Optional. Values are 'true' or 'false': setting this to true returns information as to how Amazon Pepr used your wholesale data and pricing rules to arrive at this rule.

Sample Call

http://amazonpepr.com/api/?api_username=[sampleUsername]&api_key=[sampleApiKey]&method=get_price&isbn=9781455707072&location_id=2&include_debug=true&results=json

Sample Results

{
"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
            }]
         }
      }
   }
}

Sample Results Decoded

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
                                        )
                                )
                        )
                )
        )
)