Class: Peddler::APIs::ListingsItems20210801

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/listings_items_2021_08_01.rb,
lib/peddler/apis/listings_items_2021_08_01/item.rb,
lib/peddler/apis/listings_items_2021_08_01/error.rb,
lib/peddler/apis/listings_items_2021_08_01/issue.rb,
lib/peddler/apis/listings_items_2021_08_01/points.rb,
lib/peddler/apis/listings_items_2021_08_01/audience.rb,
lib/peddler/apis/listings_items_2021_08_01/error_list.rb,
lib/peddler/apis/listings_items_2021_08_01/item_image.rb,
lib/peddler/apis/listings_items_2021_08_01/pagination.rb,
lib/peddler/apis/listings_items_2021_08_01/item_issues.rb,
lib/peddler/apis/listings_items_2021_08_01/item_offers.rb,
lib/peddler/apis/listings_items_2021_08_01/item_summaries.rb,
lib/peddler/apis/listings_items_2021_08_01/issue_exemption.rb,
lib/peddler/apis/listings_items_2021_08_01/patch_operation.rb,
lib/peddler/apis/listings_items_2021_08_01/item_identifiers.rb,
lib/peddler/apis/listings_items_2021_08_01/item_procurement.rb,
lib/peddler/apis/listings_items_2021_08_01/item_relationship.rb,
lib/peddler/apis/listings_items_2021_08_01/issue_enforcements.rb,
lib/peddler/apis/listings_items_2021_08_01/item_product_types.rb,
lib/peddler/apis/listings_items_2021_08_01/item_relationships.rb,
lib/peddler/apis/listings_items_2021_08_01/item_search_results.rb,
lib/peddler/apis/listings_items_2021_08_01/item_variation_theme.rb,
lib/peddler/apis/listings_items_2021_08_01/fulfillment_availability.rb,
lib/peddler/apis/listings_items_2021_08_01/issue_enforcement_action.rb,
lib/peddler/apis/listings_items_2021_08_01/item_offer_by_marketplace.rb,
lib/peddler/apis/listings_items_2021_08_01/listings_item_put_request.rb,
lib/peddler/apis/listings_items_2021_08_01/item_summary_by_marketplace.rb,
lib/peddler/apis/listings_items_2021_08_01/listings_item_patch_request.rb,
lib/peddler/apis/listings_items_2021_08_01/item_identifiers_by_marketplace.rb,
lib/peddler/apis/listings_items_2021_08_01/item_product_type_by_marketplace.rb,
lib/peddler/apis/listings_items_2021_08_01/item_relationships_by_marketplace.rb,
lib/peddler/apis/listings_items_2021_08_01/listings_item_submission_response.rb

Overview

Selling Partner API for Listings Items

The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.

For more information, see the Listings Items API Use Case Guide.

Defined Under Namespace

Classes: ItemIdentifiers, ItemIssues, ItemOffers, ItemProductTypes, ItemRelationships, ItemSummaries

Constant Summary collapse

Item =

A listings item.

Structure.new do
  # @return [String] A selling partner provided identifier for an Amazon listing.
  attribute(:sku, String)

  # @return [Hash]
  attribute?(:attributes, Hash)

  # @return [Array<FulfillmentAvailability>] The fulfillment availability for the listings item.
  attribute?(:fulfillment_availability, [FulfillmentAvailability], from: "fulfillmentAvailability")

  # @return [Array<Issue>]
  attribute?(:issues, [Issue])

  # @return [Array<ItemOfferByMarketplace>]
  attribute?(:offers, [ItemOfferByMarketplace])

  # @return [Array<ItemProcurement>] The vendor procurement information for the listings item.
  attribute?(:procurement, [ItemProcurement])

  # @return [Array<ItemProductTypeByMarketplace>]
  attribute?(:product_types, [ItemProductTypeByMarketplace], from: "productTypes")

  # @return [Array<ItemRelationshipsByMarketplace>]
  attribute?(:relationships, [ItemRelationshipsByMarketplace])

  # @return [Array<ItemSummaryByMarketplace>]
  attribute?(:summaries, [ItemSummaryByMarketplace])
end
Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute?(:details, String)
end
Issue =

An issue with a listings item.

Structure.new do
  # @return [Array<String>] List of issue categories.
  #
  # Possible values:
  #
  # * 'INVALID_ATTRIBUTE' - Indicating an invalid attribute in the listing.
  #
  # * 'MISSING_ATTRIBUTE' - Highlighting a missing attribute in the listing.
  #
  # * 'INVALID_IMAGE' - Signifying an invalid image in the listing.
  #
  # * 'MISSING_IMAGE' - Noting the absence of an image in the listing.
  #
  # * 'INVALID_PRICE' - Pertaining to issues with the listing's price-related attributes.
  #
  # * 'MISSING_PRICE' - Pointing out the absence of a price attribute in the listing.
  #
  # * 'DUPLICATE' - Identifying listings with potential duplicate problems, such as this ASIN potentially being a
  # duplicate of another ASIN.
  #
  # * 'QUALIFICATION_REQUIRED' - Indicating that the listing requires qualification-related approval.
  attribute(:categories, [String])

  # @return [String] An issue code that identifies the type of issue.
  attribute(:code, String)

  # @return [String] A message that describes the issue.
  attribute(:message, String)

  # @return [String] The severity of the issue.
  attribute(:severity, String)

  # @return [Array<String>] The names of the attributes associated with the issue, if applicable.
  attribute?(:attribute_names, [String], from: "attributeNames")

  # @return [IssueEnforcements] This field provides information about the enforcement actions taken by Amazon that
  # affect the publishing or status of a listing. It also includes details about any associated exemptions.
  attribute?(:enforcements, IssueEnforcements)
end
Points =

The number of Amazon Points offered with the purchase of an item, and their monetary value. Note that the Points element is only returned in Japan (JP).

Structure.new do
  # @return [Integer]
  attribute(:points_number, Integer, from: "pointsNumber")
end
Audience =

Buyer segment or program this offer is applicable to.

Structure.new do
  # @return [String] Localized display name for the audience.
  attribute?(:display_name, String, from: "displayName")

  # @return [String] Name of the audience an offer is applicable to.
  #
  # Common values:
  #
  # * 'ALL' - Standard offer audience for buyers on Amazon retail websites.
  #
  # * 'B2B' - Offer audience for Amazon Business website buyers.
  attribute?(:value, String)
end
ErrorList =

A list of error responses returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>]
  attribute(:errors, [Error])
end
ItemImage =

The image for the listings item.

Structure.new do
  # @return [Integer] The height of the image in pixels.
  attribute(:height, Integer)

  # @return [String] The link, or URL, to the image.
  attribute(:link, String)

  # @return [Integer] The width of the image in pixels.
  attribute(:width, Integer)
end
Pagination =

When a request produces a response that exceeds the pageSize, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the nextToken value or the previousToken value as the pageToken parameter in the next request. When you receive the last page, there is no nextToken key in the pagination object.

Structure.new do
  # @return [String] A token that can be used to fetch the next page.
  attribute?(:next_token, String, from: "nextToken")

  # @return [String] A token that can be used to fetch the previous page.
  attribute?(:previous_token, String, from: "previousToken")
end
IssueExemption =

Conveying the status of the listed enforcement actions and, if applicable, provides information about the exemption's expiry date.

Structure.new do
  # @return [String] This field indicates the current exemption status for the listed enforcement actions. It can
  # take values such as `EXEMPT`, signifying permanent exemption, `EXEMPT_UNTIL_EXPIRY_DATE` indicating temporary
  # exemption until a specified date, or `NOT_EXEMPT` signifying no exemptions, and enforcement actions were
  # already applied.
  attribute(:status, String)

  # @return [Time] Represents the timestamp, in ISO 8601 format, that specifies the date when the temporary
  # exemptions expires, and Amazon begins enforcing the listed actions.
  attribute?(:expiry_date, Time, from: "expiryDate")
end
PatchOperation =

Individual JSON Patch operation for an HTTP PATCH request.

Structure.new do
  # @return [String] Type of JSON Patch operation. Supported JSON Patch operations include `add`, `replace`,
  # `merge` and `delete`. Refer to <https://tools.ietf.org/html/rfc6902>.
  attribute(:op, String)

  # @return [String] JSON Pointer path of the element to patch. Refer to [JavaScript Object Notation (JSON)
  # Patch](https://tools.ietf.org/html/rfc6902) for more information.
  attribute(:path, String)

  # @return [Array<Object>] JSON value to `add`, `replace`, `merge` or `delete`.
  attribute?(:value, Array)
end
ItemProcurement =

The vendor procurement information for the listings item.

Structure.new do
  # @return [Money] The price (numeric value) that you want Amazon to pay you for this product.
  attribute(:cost_price, Money, from: "costPrice")
end
ItemRelationship =

The relationship details for a listing item.

Structure.new do
  # @return [String] The type of relationship.
  attribute(:type, String)

  # @return [Array<String>] Identifiers (SKUs) of the related items that are children of this listing item.
  attribute?(:child_skus, [String], from: "childSkus")

  # @return [Array<String>] Identifiers (SKUs) of the related items that are parents of this listing item.
  attribute?(:parent_skus, [String], from: "parentSkus")

  # @return [ItemVariationTheme] For `VARIATION` relationships, the variation theme is the combination of listing
  # item attributes that define the variation family.
  attribute?(:variation_theme, ItemVariationTheme, from: "variationTheme")
end
IssueEnforcements =

This field provides information about the enforcement actions taken by Amazon that affect the publishing or status of a listing. It also includes details about any associated exemptions.

Structure.new do
  # @return [Array<IssueEnforcementAction>] List of enforcement actions taken by Amazon that affect the publishing
  # or status of a listing.
  attribute(:actions, [IssueEnforcementAction])

  # @return [IssueExemption] The "exemption" field serves to convey the status of enforcement actions by Amazon.
  attribute(:exemption, IssueExemption)
end
ItemSearchResults =

Selling partner listings items and search related metadata.

Structure.new do
  # @return [Array<Item>] A list of listings items.
  attribute(:items, [Item])

  # @return [Integer] The total number of selling partner listings items found for the search criteria (only
  # results up to the page count limit is returned per request regardless of the number found).
  #
  # Note: The maximum number of items (SKUs) that can be returned and paged through is 1000.
  attribute(:number_of_results, Integer, from: "numberOfResults")

  # @return [Pagination] If available, the `nextToken` and/or `previousToken` values required to return paginated
  # results.
  attribute?(:pagination, Pagination)
end
ItemVariationTheme =

A variation theme that indicates the combination of listing item attributes that define the variation family.

Structure.new do
  # @return [Array<String>] The names of the listing item attributes that are associated with the variation theme.
  attribute(:attributes, [String])

  # @return [String] The variation theme that indicates the combination of listing item attributes that define the
  # variation family.
  attribute(:theme, String)
end
FulfillmentAvailability =

The fulfillment availability details for the listings item.

Structure.new do
  # @return [String] Designates which fulfillment network is used.
  attribute(:fulfillment_channel_code, String, from: "fulfillmentChannelCode")

  # @return [Integer] The quantity of the item you are making available for sale.
  attribute?(:quantity, Integer)
end
IssueEnforcementAction =

The enforcement action taken by Amazon that affect the publishing or status of a listing

Structure.new do
  # @return [String] The enforcement action name.
  #
  # Possible values:
  #
  # * `LISTING_SUPPRESSED` - This enforcement takes down the current listing item's buyability.
  #
  # * `ATTRIBUTE_SUPPRESSED` - An attribute's value on the listing item is invalid, which causes it to be rejected
  # by Amazon.
  #
  # * `CATALOG_ITEM_REMOVED` - This catalog item is inactive on Amazon, and all offers against it in the
  # applicable marketplace are non-buyable.
  #
  # * `SEARCH_SUPPRESSED` - This value indicates that the catalog item is hidden from search results.
  attribute(:action, String)
end
ItemOfferByMarketplace =

Offer details of a listings item for an Amazon marketplace.

Structure.new do
  # @return [String] The Amazon marketplace identifier.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [String] Type of offer for the listings item.
  attribute(:offer_type, String, from: "offerType")

  # @return [Money] The purchase price of the listings item
  attribute(:price, Money)

  # @return [Audience] Buyer segment or program this offer is applicable to.
  attribute?(:audience, Audience)

  # @return [Points]
  attribute?(:points, Points)
end
ListingsItemPutRequest =

The request body schema for the putListingsItem operation.

Structure.new do
  # @return [Hash] A JSON object containing structured listings item attribute data keyed by attribute name.
  attribute(:attributes, Hash)

  # @return [String] The Amazon product type of the listings item.
  attribute(:product_type, String, from: "productType")

  # @return [String] The name of the requirements set for the provided data.
  attribute?(:requirements, String)
end
ItemSummaryByMarketplace =

Summary details of a listings item for an Amazon marketplace.

Structure.new do
  # @return [Time] The date the listings item was created in ISO 8601 format.
  attribute(:created_date, Time, from: "createdDate")

  # @return [Time] The date the listings item was last updated in ISO 8601 format.
  attribute(:last_updated_date, Time, from: "lastUpdatedDate")

  # @return [String] A marketplace identifier. Identifies the Amazon marketplace for the listings item.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [String] The Amazon product type of the listings item.
  attribute(:product_type, String, from: "productType")

  # @return [Array<String>] Statuses that apply to the listings item.
  attribute(:status, [String])

  # @return [String] Amazon Standard Identification Number (ASIN) of the listings item.
  attribute?(:asin, String)

  # @return [String] Identifies the condition of the listings item.
  attribute?(:condition_type, String, from: "conditionType")

  # @return [String] The fulfillment network stock keeping unit is an identifier used by Amazon fulfillment
  # centers to identify each unique item.
  attribute?(:fn_sku, String, from: "fnSku")

  # @return [String] The name or title associated with an Amazon catalog item.
  attribute?(:item_name, String, from: "itemName")

  # @return [ItemImage] The main image for the listings item.
  attribute?(:main_image, ItemImage, from: "mainImage")
end
ListingsItemPatchRequest =

The request body schema for the patchListingsItem operation.

Structure.new do
  # @return [Array<PatchOperation>] One or more JSON Patch operations to perform on the listings item.
  attribute(:patches, [PatchOperation])

  # @return [String] The Amazon product type of the listings item.
  attribute(:product_type, String, from: "productType")
end
ItemIdentifiersByMarketplace =

Identity attributes associated with the item in the Amazon catalog for the indicated Amazon marketplace.

Structure.new do
  # @return [String] Amazon Standard Identification Number (ASIN) of the listings item.
  attribute?(:asin, String)

  # @return [String] A marketplace identifier. Identifies the Amazon marketplace for the listings item.
  attribute?(:marketplace_id, String, from: "marketplaceId")
end
ItemProductTypeByMarketplace =

Product types that are associated with the listing item for the specified marketplace.

Structure.new do
  # @return [String] Amazon marketplace identifier.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [String] The name of the product type that is submitted by the Selling Partner.
  attribute(:product_type, String, from: "productType")
end
ItemRelationshipsByMarketplace =

Relationship details for the listing item in the specified marketplace.

Structure.new do
  # @return [String] Amazon marketplace identifier.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [Array<ItemRelationship>] Relationships for the listing item.
  attribute(:relationships, [ItemRelationship])
end
ListingsItemSubmissionResponse =

Response containing the results of a submission to the Selling Partner API for Listings Items.

Structure.new do
  # @return [String] A selling partner provided identifier for an Amazon listing.
  attribute(:sku, String)

  # @return [String] The status of the listings item submission.
  attribute(:status, String)

  # @return [String] The unique identifier of the listings item submission.
  attribute(:submission_id, String, from: "submissionId")

  # @return [Array<ItemIdentifiersByMarketplace>] Identity attributes associated with the item in the Amazon
  # catalog, such as the ASIN.
  attribute?(:identifiers, [ItemIdentifiersByMarketplace])

  # @return [Array<Issue>] Listings item issues related to the listings item submission.
  attribute?(:issues, [Issue])
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #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

#delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Delete a listings item for a selling partner.

of the first marketplace is used. Examples: en_US, fr_CA, fr_FR. Localized messages default to en_US when a localization is not available in the specified locale.

Parameters:

  • seller_id (String)

    A selling partner identifier, such as a merchant account or vendor code.

  • sku (String)

    A selling partner provided identifier for an Amazon listing.

  • marketplace_ids (Array<String>)

    A comma-delimited list of Amazon marketplace identifiers for the request.

  • issue_locale (String) (defaults to: nil)

    A locale for localization of issues. When not provided, the default language code

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



29
30
31
32
33
34
35
36
37
# File 'lib/peddler/apis/listings_items_2021_08_01.rb', line 29

def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0)
  path = "/listings/2021-08-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "issueLocale" => issue_locale,
  }.compact
  parser = -> { ListingsItemSubmissionResponse }
  meter(rate_limit).delete(path, params:, parser:)
end

#get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: ["summaries"], rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns details about a listings item for a selling partner.

of the first marketplace is used. Examples: en_US, fr_CA, fr_FR. Localized messages default to en_US when a localization is not available in the specified locale. summaries.

Parameters:

  • seller_id (String)

    A selling partner identifier, such as a merchant account or vendor code.

  • sku (String)

    A selling partner provided identifier for an Amazon listing.

  • marketplace_ids (Array<String>)

    A comma-delimited list of Amazon marketplace identifiers for the request.

  • issue_locale (String) (defaults to: nil)

    A locale for localization of issues. When not provided, the default language code

  • included_data (Array<String>) (defaults to: ["summaries"])

    A comma-delimited list of data sets to include in the response. Default:

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/peddler/apis/listings_items_2021_08_01.rb', line 52

def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: ["summaries"],
  rate_limit: 5.0)
  path = "/listings/2021-08-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "issueLocale" => issue_locale,
    "includedData" => stringify_array(included_data),
  }.compact
  parser = -> { Item }
  meter(rate_limit).get(path, params:, parser:)
end

#patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil, issue_locale: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.

issues. of the first marketplace is used. Examples: en_US, fr_CA, fr_FR. Localized messages default to en_US when a localization is not available in the specified locale.

Parameters:

  • seller_id (String)

    A selling partner identifier, such as a merchant account or vendor code.

  • sku (String)

    A selling partner provided identifier for an Amazon listing.

  • marketplace_ids (Array<String>)

    A comma-delimited list of Amazon marketplace identifiers for the request.

  • included_data (Array<String>) (defaults to: ["issues"])

    A comma-delimited list of data sets to include in the response. Default:

  • mode (String) (defaults to: nil)

    The mode of operation for the request.

  • issue_locale (String) (defaults to: nil)

    A locale for localization of issues. When not provided, the default language code

  • body (Hash)

    The request body schema for the patchListingsItem operation.

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



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

def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
  issue_locale: nil, rate_limit: 5.0)
  path = "/listings/2021-08-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "includedData" => stringify_array(included_data),
    "mode" => mode,
    "issueLocale" => issue_locale,
  }.compact
  parser = -> { ListingsItemSubmissionResponse }
  meter(rate_limit).patch(path, body:, params:, parser:)
end

#put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil, issue_locale: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates a new or fully-updates an existing listings item for a selling partner.

issues. of the first marketplace is used. Examples: en_US, fr_CA, fr_FR. Localized messages default to en_US when a localization is not available in the specified locale.

Parameters:

  • seller_id (String)

    A selling partner identifier, such as a merchant account or vendor code.

  • sku (String)

    A selling partner provided identifier for an Amazon listing.

  • marketplace_ids (Array<String>)

    A comma-delimited list of Amazon marketplace identifiers for the request.

  • included_data (Array<String>) (defaults to: ["issues"])

    A comma-delimited list of data sets to include in the response. Default:

  • mode (String) (defaults to: nil)

    The mode of operation for the request.

  • issue_locale (String) (defaults to: nil)

    A locale for localization of issues. When not provided, the default language code

  • body (Hash)

    The request body schema for the putListingsItem operation.

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/peddler/apis/listings_items_2021_08_01.rb', line 108

def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil,
  issue_locale: nil, rate_limit: 5.0)
  path = "/listings/2021-08-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "includedData" => stringify_array(included_data),
    "mode" => mode,
    "issueLocale" => issue_locale,
  }.compact
  parser = -> { ListingsItemSubmissionResponse }
  meter(rate_limit).put(path, body:, params:, parser:)
end

#search_listings_items(seller_id, marketplace_ids, issue_locale: nil, included_data: ["summaries"], identifiers: nil, identifiers_type: nil, variation_parent_sku: nil, package_hierarchy_sku: nil, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, with_issue_severity: nil, with_status: nil, without_status: nil, sort_by: "lastUpdatedDate", sort_order: "DESC", page_size: 10, page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Search for and return a list of selling partner listings items and their respective details.

code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". When a localization is not available in the specified locale, localized messages default to "en_US". response. Default: summaries. listings items. Note: 1. This is required when you specify identifiersType. 2. You cannot use 'identifiers' if you specify variationParentSku or packageHierarchySku. Note: This is required when identifiers is provided. specified SKU. Note: You cannot use variationParentSku if you include identifiers or packageHierarchySku in your request. the specified SKU. Note: You cannot use packageHierarchySku if you include identifiers or variationParentSku in your request. items that were created at or after this time. Values are in ISO 8601 date-time format. items that were created at or before this time. Values are in ISO 8601 date-time format. listings items that were last updated at or after this time. Values are in ISO 8601 date-time format. listings items that were last updated at or before this time. Values are in ISO 8601 date-time format. match one or more of the specified severity levels. specified statuses. results.

Parameters:

  • seller_id (String)

    A selling partner identifier, such as a merchant account or vendor code.

  • marketplace_ids (Array<String>)

    A comma-delimited list of Amazon marketplace identifiers for the request.

  • issue_locale (String) (defaults to: nil)

    A locale that is used to localize issues. When not provided, the default language

  • included_data (Array<String>) (defaults to: ["summaries"])

    A comma-delimited list of datasets that you want to include in the

  • identifiers (Array<String>) (defaults to: nil)

    A comma-delimited list of product identifiers that you can use to search for

  • identifiers_type (String) (defaults to: nil)

    A type of product identifiers that you can use to search for listings items.

  • variation_parent_sku (String) (defaults to: nil)

    Filters results to include listing items that are variation children of the

  • package_hierarchy_sku (String) (defaults to: nil)

    Filter results to include listing items that contain or are contained by

  • created_after (String) (defaults to: nil)

    A date-time that is used to filter listing items. The response includes listings

  • created_before (String) (defaults to: nil)

    A date-time that is used to filter listing items. The response includes listings

  • last_updated_after (String) (defaults to: nil)

    A date-time that is used to filter listing items. The response includes

  • last_updated_before (String) (defaults to: nil)

    A date-time that is used to filter listing items. The response includes

  • with_issue_severity (Array<String>) (defaults to: nil)

    Filter results to include only listing items that have issues that

  • with_status (Array<String>) (defaults to: nil)

    Filter results to include only listing items that have the specified status.

  • without_status (Array<String>) (defaults to: nil)

    Filter results to include only listing items that don't contain the

  • sort_by (String) (defaults to: "lastUpdatedDate")

    An attribute by which to sort the returned listing items.

  • sort_order (String) (defaults to: "DESC")

    The order in which to sort the result items.

  • page_size (Integer) (defaults to: 10)

    The number of results that you want to include on each page.

  • page_token (String) (defaults to: nil)

    A token that you can use to fetch a specific page when there are multiple pages of

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/peddler/apis/listings_items_2021_08_01.rb', line 166

def search_listings_items(seller_id, marketplace_ids, issue_locale: nil, included_data: ["summaries"],
  identifiers: nil, identifiers_type: nil, variation_parent_sku: nil, package_hierarchy_sku: nil,
  created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil,
  with_issue_severity: nil, with_status: nil, without_status: nil, sort_by: "lastUpdatedDate", sort_order: "DESC",
  page_size: 10, page_token: nil, rate_limit: 5.0)
  path = "/listings/2021-08-01/items/#{percent_encode(seller_id)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "issueLocale" => issue_locale,
    "includedData" => stringify_array(included_data),
    "identifiers" => stringify_array(identifiers),
    "identifiersType" => identifiers_type,
    "variationParentSku" => variation_parent_sku,
    "packageHierarchySku" => package_hierarchy_sku,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "lastUpdatedAfter" => last_updated_after,
    "lastUpdatedBefore" => last_updated_before,
    "withIssueSeverity" => stringify_array(with_issue_severity),
    "withStatus" => stringify_array(with_status),
    "withoutStatus" => stringify_array(without_status),
    "sortBy" => sort_by,
    "sortOrder" => sort_order,
    "pageSize" => page_size,
    "pageToken" => page_token,
  }.compact
  parser = -> { ItemSearchResults }
  meter(rate_limit).get(path, params:, parser:)
end