aplus-content-api-model

AmzSpApi::AplusContentApiModel - the Ruby gem for the Selling Partner API for A+ Content Management

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

This SDK is automatically generated by the Swagger Codegen project:

Installation

Build a gem

To build the Ruby code into a gem:

gem build aplus-content-api-model.gemspec

Then either install the gem locally:

gem install ./aplus-content-api-model-0.1.0.gem

(for development, run gem install --dev ./aplus-content-api-model-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'aplus-content-api-model', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'aplus-content-api-model', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'aplus-content-api-model'

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
body = AmzSpApi::AplusContentApiModel::PostContentDocumentRequest.new # PostContentDocumentRequest | The content document request details.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.


begin
  result = api_instance.create_content_document(body, marketplace_id)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->create_content_document: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.
included_data_set = ['included_data_set_example'] # Array<String> | The set of A+ Content data types to include in the response.


begin
  result = api_instance.get_content_document(content_reference_key, marketplace_id, included_data_set)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->get_content_document: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.
opts = { 
  included_data_set: ['included_data_set_example'], # Array<String> | The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.
  asin_set: ['asin_set_example'], # Array<String> | The set of ASINs.
  page_token: 'page_token_example' # String | A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
}

begin
  result = api_instance.list_content_document_asin_relations(content_reference_key, marketplace_id, opts)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->list_content_document_asin_relations: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.


begin
  result = api_instance.post_content_document_approval_submission(content_reference_key, marketplace_id)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->post_content_document_approval_submission: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
body = AmzSpApi::AplusContentApiModel::PostContentDocumentAsinRelationsRequest.new # PostContentDocumentAsinRelationsRequest | The content document ASIN relations request details.
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.


begin
  result = api_instance.post_content_document_asin_relations(body, content_reference_key, marketplace_id)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->post_content_document_asin_relations: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.


begin
  result = api_instance.post_content_document_suspend_submission(content_reference_key, marketplace_id)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->post_content_document_suspend_submission: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.
opts = { 
  page_token: 'page_token_example' # String | A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
}

begin
  result = api_instance.search_content_documents(marketplace_id, opts)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->search_content_documents: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.
asin = 'asin_example' # String | The Amazon Standard Identification Number (ASIN).
opts = { 
  page_token: 'page_token_example' # String | A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
}

begin
  result = api_instance.search_content_publish_records(marketplace_id, asin, opts)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->search_content_publish_records: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
body = AmzSpApi::AplusContentApiModel::PostContentDocumentRequest.new # PostContentDocumentRequest | The content document request details.
content_reference_key = 'content_reference_key_example' # String | The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.


begin
  result = api_instance.update_content_document(body, content_reference_key, marketplace_id)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->update_content_document: #{e}"
end

api_instance = AmzSpApi::AplusContentApiModel::AplusContentApi.new
body = AmzSpApi::AplusContentApiModel::PostContentDocumentRequest.new # PostContentDocumentRequest | The content document request details.
marketplace_id = 'marketplace_id_example' # String | The identifier for the marketplace where the A+ Content is published.
opts = { 
  asin_set: ['asin_set_example'] # Array<String> | The set of ASINs.
}

begin
  result = api_instance.validate_content_document_asin_relations(body, marketplace_id, opts)
  p result
rescue AmzSpApi::AplusContentApiModel::ApiError => e
  puts "Exception when calling AplusContentApi->validate_content_document_asin_relations: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://sellingpartnerapi-na.amazon.com/

Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::AplusContentApiModel::AplusContentApi | {create_content_document} | POST /aplus/2020-11-01/contentDocuments | AmzSpApi::AplusContentApiModel::AplusContentApi | {get_content_document} | GET /aplus/2020-11-01/contentDocuments/{contentReferenceKey} | AmzSpApi::AplusContentApiModel::AplusContentApi | {list_content_document_asin_relations} | GET /aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins | AmzSpApi::AplusContentApiModel::AplusContentApi | {post_content_document_approval_submission} | POST /aplus/2020-11-01/contentDocuments/{contentReferenceKey}/approvalSubmissions | AmzSpApi::AplusContentApiModel::AplusContentApi | {post_content_document_asin_relations} | POST /aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins | AmzSpApi::AplusContentApiModel::AplusContentApi | {post_content_document_suspend_submission} | POST /aplus/2020-11-01/contentDocuments/{contentReferenceKey}/suspendSubmissions | AmzSpApi::AplusContentApiModel::AplusContentApi | {search_content_documents} | GET /aplus/2020-11-01/contentDocuments | AmzSpApi::AplusContentApiModel::AplusContentApi | {search_content_publish_records} | GET /aplus/2020-11-01/contentPublishRecords | AmzSpApi::AplusContentApiModel::AplusContentApi | {update_content_document} | POST /aplus/2020-11-01/contentDocuments/{contentReferenceKey} | AmzSpApi::AplusContentApiModel::AplusContentApi | {validate_content_document_asin_relations} | POST /aplus/2020-11-01/contentAsinValidations |

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.