Class: Peddler::APIs::AplusContent20201101

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

Overview

Selling Partner API for A+ Content Management

Use the A+ Content API to build applications that help selling partners add rich marketing content to their Amazon product detail pages. Selling partners can use A+ content to share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners use content modules to add images and text.

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?, #typed, #typed?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response

Creates a new A+ Content document.

Parameters:

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • post_content_document_request (Hash)

    The content document request details.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



49
50
51
52
53
54
55
56
57
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 49

def create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::AplusContent20201101::PostContentDocumentResponse if typed?
  meter(rate_limit).post(path, body:, params:, parser:)
end

#get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) ⇒ Peddler::Response

Returns an A+ Content document, if available.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • included_data_set (Array<String>)

    The set of A+ Content data types to include in the response.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



70
71
72
73
74
75
76
77
78
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 70

def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}"
  params = {
    "marketplaceId" => marketplace_id,
    "includedDataSet" => stringify_array(included_data_set),
  }.compact
  parser = Peddler::Types::AplusContent20201101::GetContentDocumentResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil, asin_set: nil, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Returns a list of ASINs that are related to the specified A+ Content document, if available. If you don't include the asinSet parameter, this operation returns all ASINs related to the content document.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

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

    The set of A+ Content data types to include in the response. If you don't include this parameter, the operation returns the related ASINs without metadata.

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

    The set of ASINs.

  • page_token (String) (defaults to: nil)

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

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 118

def list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil,
  asin_set: nil, page_token: nil, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/asins"
  params = {
    "marketplaceId" => marketplace_id,
    "includedDataSet" => stringify_array(included_data_set),
    "asinSet" => stringify_array(asin_set),
    "pageToken" => page_token,
  }.compact
  parser = Peddler::Types::AplusContent20201101::ListContentDocumentAsinRelationsResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response

Submits an A+ Content document for review, approval, and publishing.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



209
210
211
212
213
214
215
216
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 209

def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/approvalSubmissions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::AplusContent20201101::PostContentDocumentApprovalSubmissionResponse if typed?
  meter(rate_limit).post(path, params:, parser:)
end

#post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) ⇒ Peddler::Response

Replaces all ASINs related to the specified A+ Content document, if available. This operation can add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN will suspend the content document from that ASIN.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • post_content_document_asin_relations_request (Hash)

    The request details for the content document ASIN relations.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



145
146
147
148
149
150
151
152
153
154
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 145

def post_content_document_asin_relations(content_reference_key, marketplace_id,
  post_content_document_asin_relations_request, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/asins"
  body = post_content_document_asin_relations_request
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::AplusContent20201101::PostContentDocumentAsinRelationsResponse if typed?
  meter(rate_limit).post(path, body:, params:, parser:)
end

#post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response

Submits a request to suspend visible A+ Content. This doesn't delete the content document or the ASIN relations.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



228
229
230
231
232
233
234
235
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 228

def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/suspendSubmissions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::AplusContent20201101::PostContentDocumentSuspendSubmissionResponse if typed?
  meter(rate_limit).post(path, params:, parser:)
end

#search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner. To get the actual contents of the A+ Content documents, call the getContentDocument operation.

Parameters:

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • page_token (String) (defaults to: nil)

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

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



31
32
33
34
35
36
37
38
39
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 31

def search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments"
  params = {
    "marketplaceId" => marketplace_id,
    "pageToken" => page_token,
  }.compact
  parser = Peddler::Types::AplusContent20201101::SearchContentDocumentsResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response

Searches for A+ Content publishing records, if available.

Parameters:

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • asin (String)

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

  • page_token (String) (defaults to: nil)

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

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



188
189
190
191
192
193
194
195
196
197
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 188

def search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentPublishRecords"
  params = {
    "marketplaceId" => marketplace_id,
    "asin" => asin,
    "pageToken" => page_token,
  }.compact
  parser = Peddler::Types::AplusContent20201101::SearchContentPublishRecordsResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response

Updates an existing A+ Content document.

Parameters:

  • content_reference_key (String)

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • post_content_document_request (Hash)

    The content document request details.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



91
92
93
94
95
96
97
98
99
100
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 91

def update_content_document(content_reference_key, marketplace_id, post_content_document_request,
  rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::AplusContent20201101::PostContentDocumentResponse if typed?
  meter(rate_limit).post(path, body:, params:, parser:)
end

#validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) ⇒ Peddler::Response

Checks if the A+ Content document is valid for use on a set of ASINs.

Parameters:

  • marketplace_id (String)

    The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

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

    The set of ASINs.

  • post_content_document_request (Hash)

    The content document request details.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:



165
166
167
168
169
170
171
172
173
174
175
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 165

def validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil,
  rate_limit: 10.0)
  path = "/aplus/2020-11-01/contentAsinValidations"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
    "asinSet" => stringify_array(asin_set),
  }.compact
  parser = Peddler::Types::AplusContent20201101::ValidateContentDocumentAsinRelationsResponse if typed?
  meter(rate_limit).post(path, body:, params:, parser:)
end