Class: Peddler::APIs::AplusContent20201101

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/aplus_content_2020_11_01.rb,
lib/peddler/apis/aplus_content_2020_11_01/faq.rb,
lib/peddler/apis/aplus_content_2020_11_01/faqs.rb,
lib/peddler/apis/aplus_content_2020_11_01/error.rb,
lib/peddler/apis/aplus_content_2020_11_01/issue.rb,
lib/peddler/apis/aplus_content_2020_11_01/media.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/decorator.rb,
lib/peddler/apis/aplus_content_2020_11_01/tech_spec.rb,
lib/peddler/apis/aplus_content_2020_11_01/text_item.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_image.rb,
lib/peddler/apis/aplus_content_2020_11_01/error_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/issue_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/media_info.rb,
lib/peddler/apis/aplus_content_2020_11_01/tech_specs.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_images.rb,
lib/peddler/apis/aplus_content_2020_11_01/description.rb,
lib/peddler/apis/aplus_content_2020_11_01/media_input.rb,
lib/peddler/apis/aplus_content_2020_11_01/message_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_column.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_metadata.rb,
lib/peddler/apis/aplus_content_2020_11_01/decorator_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_columns.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_offsets.rb,
lib/peddler/apis/aplus_content_2020_11_01/related_media.rb,
lib/peddler/apis/aplus_content_2020_11_01/aplus_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_badge_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/comparison_row.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_record.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_hot_spot.rb,
lib/peddler/apis/aplus_content_2020_11_01/publish_record.rb,
lib/peddler/apis/aplus_content_2020_11_01/text_component.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_component.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_hot_spots.rb,
lib/peddler/apis/aplus_content_2020_11_01/plain_text_item.rb,
lib/peddler/apis/aplus_content_2020_11_01/video_component.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_document.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_metadata.rb,
lib/peddler/apis/aplus_content_2020_11_01/description_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_dimensions.rb,
lib/peddler/apis/aplus_content_2020_11_01/asin_metadata_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/comparison_fields.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_badge_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/metric_value_item.rb,
lib/peddler/apis/aplus_content_2020_11_01/comparison_metrics.rb,
lib/peddler/apis/aplus_content_2020_11_01/comparison_product.rb,
lib/peddler/apis/aplus_content_2020_11_01/get_media_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/integer_with_units.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_faq_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/related_media_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/comparison_products.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_module_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_text_hot_spot.rb,
lib/peddler/apis/aplus_content_2020_11_01/paragraph_component.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/publish_record_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/related_media_input.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_text_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/create_media_request.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_carousel_panel.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_text_hot_spots.rb,
lib/peddler/apis/aplus_content_2020_11_01/question_answer_pair.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/update_media_request.rb,
lib/peddler/apis/aplus_content_2020_11_01/create_media_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_carousel_panels.rb,
lib/peddler/apis/aplus_content_2020_11_01/question_answer_pairs.rb,
lib/peddler/apis/aplus_content_2020_11_01/update_media_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/regimen_carousel_panel.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_metadata_record.rb,
lib/peddler/apis/aplus_content_2020_11_01/regimen_carousel_panels.rb,
lib/peddler/apis/aplus_content_2020_11_01/aplus_paginated_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/brand_story_about_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/image_crop_specification.rb,
lib/peddler/apis/aplus_content_2020_11_01/related_media_input_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_text_list_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_text_pair_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_reference_key_set.rb,
lib/peddler/apis/aplus_content_2020_11_01/navigation_carousel_panel.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_hero_video_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_tech_specs_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_video_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_image_text_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/navigation_carousel_panels.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_tech_specs_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/video_image_carousel_panel.rb,
lib/peddler/apis/aplus_content_2020_11_01/three_column_comparison_row.rb,
lib/peddler/apis/aplus_content_2020_11_01/video_image_carousel_panels.rb,
lib/peddler/apis/aplus_content_2020_11_01/brand_story_four_asin_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/brand_story_questions_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/content_metadata_record_list.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_hotspot_image_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_company_logo_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_image_caption_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/get_content_document_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_request.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_image_carousel_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_image_sidebar_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/brand_story_media_asset_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_dual_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_regimen_carousel_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_four_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_header_text_list_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/three_column_comparison_product.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_comparison_table_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_three_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_four_column_images_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_hotspot_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/search_content_documents_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_comparison_product_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_header_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_image_text_caption_block.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_single_side_image_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/brand_story_image_with_logo_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_comparison_carousel_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_comparison_scroller_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_navigation_carousel_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_image_text_overlay_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_full_background_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_video_image_carousel_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_multiple_image_text_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_product_description_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_full_background_image_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/premium_three_column_comparison_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/search_content_publish_records_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_single_image_highlights_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_four_image_text_quadrant_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/standard_single_image_specs_detail_module.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_asin_relations_request.rb,
lib/peddler/apis/aplus_content_2020_11_01/list_content_document_asin_relations_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_asin_relations_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_suspend_submission_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/validate_content_document_asin_relations_response.rb,
lib/peddler/apis/aplus_content_2020_11_01/post_content_document_approval_submission_response.rb,
sig/peddler/apis/aplus_content_2020_11_01.rbs

Overview

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.

Defined Under Namespace

Classes: ASINBadgeSet, ASINImage, ASINImages, ASINMetadata, ASINMetadataSet, ASINSet, AplusPaginatedResponse, AplusResponse, BrandStoryAboutModule, BrandStoryFourASINModule, BrandStoryImageWithLogoModule, BrandStoryMediaAssetModule, BrandStoryQuestionsModule, ComparisonFields, ComparisonMetrics, ComparisonProduct, ComparisonProducts, ComparisonRow, ContentBadgeSet, ContentDocument, ContentMetadata, ContentMetadataRecord, ContentMetadataRecordList, ContentModule, ContentModuleList, ContentRecord, ContentReferenceKeySet, CreateMediaRequest, CreateMediaResponse, Decorator, DecoratorSet, Description, DescriptionList, Error, ErrorList, Faq, Faqs, GetContentDocumentResponse, GetMediaResponse, ImageCarouselPanel, ImageCarouselPanels, ImageColumn, ImageColumns, ImageComponent, ImageCropSpecification, ImageDimensions, ImageHotSpot, ImageHotSpots, ImageOffsets, ImageTextHotSpot, ImageTextHotSpots, IntegerWithUnits, Issue, IssueList, ListContentDocumentASINRelationsResponse, Media, MediaInfo, MediaInput, MessageSet, MetricValueItem, NavigationCarouselPanel, NavigationCarouselPanels, ParagraphComponent, PlainTextItem, PostContentDocumentASINRelationsRequest, PostContentDocumentASINRelationsResponse, PostContentDocumentApprovalSubmissionResponse, PostContentDocumentRequest, PostContentDocumentResponse, PostContentDocumentSuspendSubmissionResponse, PremiumComparisonCarouselModule, PremiumComparisonScrollerModule, PremiumDualImageTextModule, PremiumFaqModule, PremiumFourColumnImagesModule, PremiumFullBackgroundImageModule, PremiumFullBackgroundTextModule, PremiumHeroVideoModule, PremiumHotspotImageModule, PremiumHotspotImageTextModule, PremiumImageCarouselModule, PremiumImageTextModule, PremiumNavigationCarouselModule, PremiumRegimenCarouselModule, PremiumTechSpecsModule, PremiumTextModule, PremiumThreeColumnComparisonModule, PremiumVideoImageCarouselModule, PremiumVideoTextModule, PublishRecord, PublishRecordList, QuestionAnswerPair, QuestionAnswerPairs, RegimenCarouselPanel, RegimenCarouselPanels, RelatedMedia, RelatedMediaInput, RelatedMediaInputList, RelatedMediaList, SearchContentDocumentsResponse, SearchContentPublishRecordsResponse, StandardCompanyLogoModule, StandardComparisonProductBlock, StandardComparisonTableModule, StandardFourImageTextModule, StandardFourImageTextQuadrantModule, StandardHeaderImageTextModule, StandardHeaderTextListBlock, StandardImageCaptionBlock, StandardImageSidebarModule, StandardImageTextBlock, StandardImageTextCaptionBlock, StandardImageTextOverlayModule, StandardMultipleImageTextModule, StandardProductDescriptionModule, StandardSingleImageHighlightsModule, StandardSingleImageSpecsDetailModule, StandardSingleSideImageModule, StandardTechSpecsModule, StandardTextBlock, StandardTextListBlock, StandardTextModule, StandardTextPairBlock, StandardThreeImageTextModule, TechSpec, TechSpecs, TextComponent, TextItem, ThreeColumnComparisonProduct, ThreeColumnComparisonRow, UpdateMediaRequest, UpdateMediaResponse, ValidateContentDocumentASINRelationsResponse, VideoComponent, VideoImageCarouselPanel, VideoImageCarouselPanels

Constant Summary

Constants inherited from Peddler::API

Peddler::API::TRANSIENT_STATUSES

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #base_url, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

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

Create a new A+ Content document.

Parameters:

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • post_content_document_request (Hash) —

    The content document request details.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { PostContentDocumentResponse }
  post(path, body:, params:, rate_limit:, parser:)
end

#create_media(create_media_request, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Create a media asset record. The mediaType field determines the type of asset to create.

This operation is idempotent; if the asset or pairing already exists with identical metadata, this operation returns a 200 response with existing data. Returns 201 when a new asset or pairing is created. Returns 409 if the asset or pairing already exists but the metadata fields differ.

If an uploadDestinationId is provided, it is resolved to its mediaId before any further processing. A request that references an asset by uploadDestinationId and a subsequent request that uses the resulting mediaId are treated as referring to the same identity.

Parameters:

  • create_media_request (Hash) —

    The media creation request details.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



257
258
259
260
261
262
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 257

def create_media(create_media_request, rate_limit: 10.0)
  path = "/aplus/2020-11-01/media"
  body = create_media_request
  parser = -> { CreateMediaResponse }
  post(path, body:, rate_limit:, parser:)
end

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

Retrieve 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • included_data_set (Array<String>) —

    The set of A+ Content data types to include in the response. Known values: CONTENTS, METADATA.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • (Array[String])
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}"
  params = {
    "marketplaceId" => marketplace_id,
    "includedDataSet" => stringify_array(included_data_set),
  }.compact
  parser = -> { GetContentDocumentResponse }
  get(path, params:, rate_limit:, parser:)
end

#get_media(media_id, associated_media_id: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve media metadata and related media for a given media ID. The response uses the unified Media shape. Related media associations are also included in the response.

When associatedMediaId is provided, relatedMedia is filtered to the specific pairing. When omitted, all related media are returned.

Parameters:

  • media_id (String) —

    The unique identifier for the media asset.

  • associated_media_id (String) (defaults to: nil) —

    When provided, returns only the specific association. When omitted, returns all associated media.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • associated_media_id: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



276
277
278
279
280
281
282
283
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 276

def get_media(media_id, associated_media_id: nil, rate_limit: 10.0)
  path = "/aplus/2020-11-01/media/#{percent_encode(media_id)}"
  params = {
    "associatedMediaId" => associated_media_id,
  }.compact
  parser = -> { GetMediaResponse }
  get(path, params:, rate_limit:, 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

Retrieve a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

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

    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. Known values: METADATA.

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

    The set of ASINs.

  • page_token (String) (defaults to: nil) —

    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.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • included_data_set: (Array[String], nil) (defaults to: nil)
  • asin_set: (Array[String], nil) (defaults to: nil)
  • page_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 120

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)
  cannot_sandbox!

  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 = -> { ListContentDocumentASINRelationsResponse }
  get(path, params:, rate_limit:, 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



212
213
214
215
216
217
218
219
220
221
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 212

def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/approvalSubmissions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { PostContentDocumentApprovalSubmissionResponse }
  post(path, params:, rate_limit:, 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 may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • post_content_document_asin_relations_request (Hash) —

    The content document ASIN relations request details.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def post_content_document_asin_relations(content_reference_key, marketplace_id,
  post_content_document_asin_relations_request, rate_limit: 10.0)
  cannot_sandbox!

  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 = -> { PostContentDocumentASINRelationsResponse }
  post(path, body:, params:, rate_limit:, 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 neither deletes the content document nor 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



232
233
234
235
236
237
238
239
240
241
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 232

def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/suspendSubmissions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { PostContentDocumentSuspendSubmissionResponse }
  post(path, params:, rate_limit:, parser:)
end

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

Retrieve a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents.

Parameters:

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • page_token (String) (defaults to: nil) —

    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.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • page_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments"
  params = {
    "marketplaceId" => marketplace_id,
    "pageToken" => page_token,
  }.compact
  parser = -> { SearchContentDocumentsResponse }
  get(path, params:, rate_limit:, 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 identifier for the Amazon store where the A+ Content is published.

  • asin (String) —

    The Amazon Standard Identification Number (ASIN).

  • page_token (String) (defaults to: nil) —

    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.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • page_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 191

def search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentPublishRecords"
  params = {
    "marketplaceId" => marketplace_id,
    "asin" => asin,
    "pageToken" => page_token,
  }.compact
  parser = -> { SearchContentPublishRecordsResponse }
  get(path, params:, rate_limit:, parser:)
end

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

Update 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 may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id (String) —

    The identifier for the Amazon store where the A+ Content is published.

  • post_content_document_request (Hash) —

    The content document request details.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def update_content_document(content_reference_key, marketplace_id, post_content_document_request,
  rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { PostContentDocumentResponse }
  post(path, body:, params:, rate_limit:, parser:)
end

#update_media(media_id, update_media_request, associated_media_id: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Update metadata on an existing media asset. The mediaId path parameter identifies the target asset. For video-image pairing title updates, provide associatedMediaId as a query parameter. For video-level description updates or standalone image title updates, omit associatedMediaId.

Each request updates either title or descriptions, but not both. Descriptions are upserted by locale; only provided locales are modified, and existing locales not in the request are preserved.

The response contains the full unified Media shape. When associatedMediaId is provided, relatedMedia contains only the specified pairing. When associatedMediaId is absent, relatedMedia contains all affected pairings.

Parameters:

  • media_id (String) —

    The unique identifier for the media asset to update.

  • associated_media_id (String) (defaults to: nil) —

    When provided, identifies the specific video-image pairing for title updates. Required when updating a pairing title.

  • update_media_request (Hash) —

    The media update request details.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • associated_media_id: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



303
304
305
306
307
308
309
310
311
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 303

def update_media(media_id, update_media_request, associated_media_id: nil, rate_limit: 10.0)
  path = "/aplus/2020-11-01/media/#{percent_encode(media_id)}"
  body = update_media_request
  params = {
    "associatedMediaId" => associated_media_id,
  }.compact
  parser = -> { UpdateMediaResponse }
  patch(path, body:, params:, rate_limit:, 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 identifier for the Amazon store where the A+ Content is published.

  • 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

  • (String)
  • (Hash[untyped, untyped])
  • asin_set: (Array[String], nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



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

def validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil,
  rate_limit: 10.0)
  cannot_sandbox!

  path = "/aplus/2020-11-01/contentAsinValidations"
  body = post_content_document_request
  params = {
    "marketplaceId" => marketplace_id,
    "asinSet" => stringify_array(asin_set),
  }.compact
  parser = -> { ValidateContentDocumentASINRelationsResponse }
  post(path, body:, params:, rate_limit:, parser:)
end