product-pricing-api-model¶ ↑
AmzSpApi::ProductPricingApiModel
- the Ruby gem for the Selling Partner API for Pricing
The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
This SDK is automatically generated by the Swagger Codegen project:
-
API version: v0
-
Package version: 0.1.0
-
Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen For more information, please visit sellercentral.amazon.com/gp/mws/contactus.html
Installation¶ ↑
Build a gem¶ ↑
To build the Ruby code into a gem:
gem build product-pricing-api-model.gemspec
Then either install the gem locally:
gem install ./product-pricing-api-model-0.1.0.gem
(for development, run gem install --dev ./product-pricing-api-model-0.1.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'product-pricing-api-model', '~> 0.1.0'
Install from Git¶ ↑
If the Ruby gem is hosted at a git repository: github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'product-pricing-api-model', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly¶ ↑
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started¶ ↑
Please follow the installation procedure and then run the following code:
# Load the gem require 'product-pricing-api-model' api_instance = AmzSpApi::ProductPricingApiModel::ProductPricingApi.new marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace for which prices are returned. item_type = 'item_type_example' # String | Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. opts = { asins: ['asins_example'], # Array<String> | A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. skus: ['skus_example'] # Array<String> | A list of up to twenty seller SKU values used to identify items in the given marketplace. } begin result = api_instance.get_competitive_pricing(marketplace_id, item_type, opts) p result rescue AmzSpApi::ProductPricingApiModel::ApiError => e puts "Exception when calling ProductPricingApi->get_competitive_pricing: #{e}" end api_instance = AmzSpApi::ProductPricingApiModel::ProductPricingApi.new marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace for which prices are returned. item_condition = 'item_condition_example' # String | Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. asin = 'asin_example' # String | The Amazon Standard Identification Number (ASIN) of the item. begin result = api_instance.get_item_offers(marketplace_id, item_condition, asin) p result rescue AmzSpApi::ProductPricingApiModel::ApiError => e puts "Exception when calling ProductPricingApi->get_item_offers: #{e}" end api_instance = AmzSpApi::ProductPricingApiModel::ProductPricingApi.new marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace for which prices are returned. item_condition = 'item_condition_example' # String | Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. seller_sku = 'seller_sku_example' # String | Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. begin result = api_instance.get_listing_offers(marketplace_id, item_condition, seller_sku) p result rescue AmzSpApi::ProductPricingApiModel::ApiError => e puts "Exception when calling ProductPricingApi->get_listing_offers: #{e}" end api_instance = AmzSpApi::ProductPricingApiModel::ProductPricingApi.new marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace for which prices are returned. item_type = 'item_type_example' # String | Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. opts = { asins: ['asins_example'], # Array<String> | A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. skus: ['skus_example'], # Array<String> | A list of up to twenty seller SKU values used to identify items in the given marketplace. item_condition: 'item_condition_example' # String | Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. } begin result = api_instance.get_pricing(marketplace_id, item_type, opts) p result rescue AmzSpApi::ProductPricingApiModel::ApiError => e puts "Exception when calling ProductPricingApi->get_pricing: #{e}" end
Documentation for API Endpoints¶ ↑
All URIs are relative to https://sellingpartnerapi-na.amazon.com/
Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::ProductPricingApiModel::ProductPricingApi | {get_competitive_pricing} | GET /products/pricing/v0/competitivePrice | AmzSpApi::ProductPricingApiModel::ProductPricingApi | {get_item_offers} | GET /products/pricing/v0/items/{Asin}/offers | AmzSpApi::ProductPricingApiModel::ProductPricingApi | {get_listing_offers} | GET /products/pricing/v0/listings/{SellerSKU}/offers | AmzSpApi::ProductPricingApiModel::ProductPricingApi | {get_pricing} | GET /products/pricing/v0/price |
Documentation for Models¶ ↑
Documentation for Authorization¶ ↑
All endpoints do not require authorization.