Class: Peddler::APIs::CatalogItems20220401

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

Overview

Selling Partner API for Catalog Items

Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).

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

#get_catalog_item(asin, marketplace_ids, included_data: ["summaries"], locale: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves details for an item in the Amazon catalog.



82
83
84
85
86
87
88
89
90
91
# File 'lib/peddler/apis/catalog_items_2022_04_01.rb', line 82

def get_catalog_item(asin, marketplace_ids, included_data: ["summaries"], locale: nil, rate_limit: 5.0)
  path = "/catalog/2022-04-01/items/#{asin}"
  params = {
    "marketplaceIds" => marketplace_ids,
    "includedData" => included_data,
    "locale" => locale,
  }.compact

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

#search_catalog_items(marketplace_ids, identifiers: nil, identifiers_type: nil, included_data: ["summaries"], locale: nil, seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10, page_token: nil, keywords_locale: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/peddler/apis/catalog_items_2022_04_01.rb', line 48

def search_catalog_items(marketplace_ids, identifiers: nil, identifiers_type: nil, included_data: ["summaries"],
  locale: nil, seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10,
  page_token: nil, keywords_locale: nil, rate_limit: 5.0)
  path = "/catalog/2022-04-01/items"
  params = {
    "identifiers" => identifiers,
    "identifiersType" => identifiers_type,
    "marketplaceIds" => marketplace_ids,
    "includedData" => included_data,
    "locale" => locale,
    "sellerId" => seller_id,
    "keywords" => keywords,
    "brandNames" => brand_names,
    "classificationIds" => classification_ids,
    "pageSize" => page_size,
    "pageToken" => page_token,
    "keywordsLocale" => keywords_locale,
  }.compact

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