Class: Peddler::APIs::CustomerFeedback20240601

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/apis/customer_feedback_2024_06_01.rb

Overview

The Selling Partner API for CustomerFeedback

The Selling Partner API for Customer Feedback (Customer Feedback API) provides information about customer reviews and returns at both the item and browse node level.

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_browse_node_return_topics(browse_node_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve the topics that customers mention when they return items in a browse node.

Parameters:

  • browse_node_id (String)

    A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

Returns:



116
117
118
119
120
121
122
123
# File 'lib/peddler/apis/customer_feedback_2024_06_01.rb', line 116

def get_browse_node_return_topics(browse_node_id, marketplace_id)
  path = "/customerFeedback/2024-06-01/browseNodes/#{percent_encode(browse_node_id)}/returns/topics"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact

  get(path, params:)
end
Note:

This operation can make a static sandbox call.

Retrieve the trends of topics that customers mention when they return items in a browse node.

Parameters:

  • browse_node_id (String)

    A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

Returns:



133
134
135
136
137
138
139
140
# File 'lib/peddler/apis/customer_feedback_2024_06_01.rb', line 133

def get_browse_node_return_trends(browse_node_id, marketplace_id)
  path = "/customerFeedback/2024-06-01/browseNodes/#{percent_encode(browse_node_id)}/returns/trends"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact

  get(path, params:)
end

#get_browse_node_review_topics(browse_node_id, marketplace_id, sort_by) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve a browse node's ten most positive and ten most negative review topics.

Parameters:

  • browse_node_id (String)

    The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

  • sort_by (String)

    The metric by which to sort the data in the response.

Returns:



64
65
66
67
68
69
70
71
72
# File 'lib/peddler/apis/customer_feedback_2024_06_01.rb', line 64

def get_browse_node_review_topics(browse_node_id, marketplace_id, sort_by)
  path = "/customerFeedback/2024-06-01/browseNodes/#{percent_encode(browse_node_id)}/reviews/topics"
  params = {
    "marketplaceId" => marketplace_id,
    "sortBy" => sort_by,
  }.compact

  get(path, params:)
end
Note:

This operation can make a static sandbox call.

Retrieve the positive and negative review trends of items in a browse node for the past six months.

Parameters:

  • browse_node_id (String)

    A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to Marketplace IDs.

Returns:



99
100
101
102
103
104
105
106
# File 'lib/peddler/apis/customer_feedback_2024_06_01.rb', line 99

def get_browse_node_review_trends(browse_node_id, marketplace_id)
  path = "/customerFeedback/2024-06-01/browseNodes/#{percent_encode(browse_node_id)}/reviews/trends"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact

  get(path, params:)
end

#get_item_browse_node(asin, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.

Parameters:

  • asin (String)

    The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

Returns:



46
47
48
49
50
51
52
53
# File 'lib/peddler/apis/customer_feedback_2024_06_01.rb', line 46

def get_item_browse_node(asin, marketplace_id)
  path = "/customerFeedback/2024-06-01/items/#{percent_encode(asin)}/browseNode"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact

  get(path, params:)
end

#get_item_review_topics(asin, marketplace_id, sort_by) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve an item's ten most positive and ten most negative review topics.

Parameters:

  • asin (String)

    The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

  • sort_by (String)

    The metric by which to sort data in the response.

Returns:



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

def get_item_review_topics(asin, marketplace_id, sort_by)
  path = "/customerFeedback/2024-06-01/items/#{percent_encode(asin)}/reviews/topics"
  params = {
    "marketplaceId" => marketplace_id,
    "sortBy" => sort_by,
  }.compact

  get(path, params:)
end
Note:

This operation can make a static sandbox call.

Retrieve an item's positive and negative review trends for the past six months.

Parameters:

  • asin (String)

    The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.

  • marketplace_id (String)

    The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.

Returns:



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

def get_item_review_trends(asin, marketplace_id)
  path = "/customerFeedback/2024-06-01/items/#{percent_encode(asin)}/reviews/trends"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact

  get(path, params:)
end