Module FILLZ.SOURCE.AMAZONDE.v2

Provides access to AmazonDE pricing data.

Module Summary

Using offers

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
var filter = FILLZ.FILTERS.v1;
//all new offers on amazon
var offers = amazon.offers(filter.condition.is_new());
//get lowest price
var price = offers.lowest_price.price;

Using last_updated

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
debug('pricing data last updated ' + amazon.last_updated);

Using last_updated_new

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
debug('new pricing data last updated ' + amazon.last_updated_new);

Using last_updated_used

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
debug('used pricing data last updated ' + amazon.last_updated_used);

Using last_updated_collectible

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
debug('collectible pricing data last updated ' + amazon.last_updated_collectible);

Using offer_count

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
//get the number of offers
debug('# new offers is ' + amazon.offer_count.new);
debug('# used offers is ' + amazon.offer_count.used);
debug('# collectible offers is ' + amazon.offer_count.collectible);

Using status

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
if (amazon.status == 'missing') {
  debug('No pricing information is available for this item');
}
if (amazon.status == 'incomplete') {
  debug('Some pricing information available for this item. Please see amazon.is_condition_received to determine if data is available for a specified condition');
}
if (amazon.status == 'ok') {
  debug('Complete pricing information is available for this item');
}

Using sales_rank

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
debug('sales rank value is ' + amazon.sales_rank);

Using list_price

 var amazon = FILLZ.SOURCE.AMAZONDE.v2;
 debug('list price value is ' + amazon.list_price);

Using buy_box

var amazon = FILLZ.SOURCE.AMAZONDE.v2;
if (amazon.buy_box.new) {
  debug('price is ' + amazon.buy_box.new.price);
  debug('shipping is ' + amazon.buy_box.new.shipping);
  debug('total is ' + amazon.buy_box.new.total);
  debug('condition is ' + amazon.buy_box.new.condition);
}
if (amazon.buy_box.used) {
  debug('price is ' + amazon.buy_box.used.price);
  debug('shipping is ' + amazon.buy_box.used.shipping);
  debug('total is ' + amazon.buy_box.used.total);
}

Properties

  • is_excluding_me

    If true, the offers from this source do not include your items.

  • is_condition_missing(condition)

    The function accepts one of new, used, or collectible, and returns true if data has not been received for an offer in that condition. Please note that this will return false if the offer count for a condition is 0.

  • is_condition_received(condition)

    The function accepts one of new, used, or collectible, and returns true if data has been received for an offer in that condition. Please note that this will return true if the offer count for a condition is 0.

  • last_updated

    Gets the last time the pricing data for any condition of this item was updated. Returned as a JavaScript Date object, or undefined if no value exists.

  • last_updated_new

    Gets the last time the "new" pricing data for this item was updated. Returned as a JavaScript Date object, or undefined if no value exists.

  • last_updated_used

    Gets the last time the "used" pricing data for this item was updated. Returned as a JavaScript Date object, or undefined if no value exists.

  • last_updated_collectible

    Gets the last time the "collectible" pricing data for this item was updated. Returned as a JavaScript Date object, or undefined if no value exists.

  • offer_count

    Gets a structure containing offer counts for various condition classes. Contains these sub-properties: - new - used - collectible

  • status

    Status of the pricing data. Possible values: - ok -- data is available and ready for use. - missing -- data has not been retrieved yet, or failed. - incomplete -- data for only some of the conditions has been received

  • sales_rank

    Get sales rank of item

  • list_price

    Get the list price of the item

  • buy_box

    Get buy box structure for item. Contains these subproperties: - new - used Each of which contain these subproperties: - price - shipping - total - condition (only for 'new')

  • seller_id

    Returns Amazon's Seller Merchant ID, and can be used to filter offers sold by Amazon as a seller.

Methods