Class: Peddler::APIs::CatalogItemsV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/catalog_items_v0.rb

Overview

Selling Partner API for Catalog Items

The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #parser, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for the item.

  • asin (String) (defaults to: nil)

    The Amazon Standard Identification Number (ASIN) of the item.

  • seller_sku (String) (defaults to: nil)

    Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



27
28
29
30
31
32
33
34
35
36
# File 'lib/peddler/apis/catalog_items_v0.rb', line 27

def list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0)
  path = "/catalog/v0/categories"
  params = {
    "MarketplaceId" => marketplace_id,
    "ASIN" => asin,
    "SellerSKU" => seller_sku,
  }.compact

  meter(rate_limit).get(path, params:)
end