Class: Peddler::APIs::Messaging20260420
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Messaging20260420
- Defined in:
- lib/peddler/apis/messaging_2026_04_20.rb,
lib/peddler/apis/messaging_2026_04_20/error.rb,
lib/peddler/apis/messaging_2026_04_20/error_list.rb,
lib/peddler/apis/messaging_2026_04_20/pagination.rb,
lib/peddler/apis/messaging_2026_04_20/automation_details.rb,
lib/peddler/apis/messaging_2026_04_20/trigger_conditions.rb,
lib/peddler/apis/messaging_2026_04_20/marketplace_automation.rb,
lib/peddler/apis/messaging_2026_04_20/automation_configuration.rb,
lib/peddler/apis/messaging_2026_04_20/create_automation_config_request.rb,
lib/peddler/apis/messaging_2026_04_20/list_automation_configs_response.rb,
lib/peddler/apis/messaging_2026_04_20/update_automation_config_request.rb,
sig/peddler/apis/messaging_2026_04_20.rbs
Overview
The Selling Partner API for Messaging Automations
The Selling Partner API for Messaging Automations allows sellers to programmatically manage automated buyer-seller
messaging configurations. An automation configuration defines rules for automatically responding to buyer messages
(for example, auto-responses to common questions about shipping, returns, or product details). A seller can create
multiple automation configurations, and each configuration can apply to one or more Amazon stores. Each
store-specific entry within a configuration contains the response content and the automation trigger conditions.
The marketplaceIds query parameter is required on all operations for store-scoped authorization.
Defined Under Namespace
Classes: AutomationConfiguration, AutomationDetails, CreateAutomationConfigRequest, Error, ErrorList, ListAutomationConfigsResponse, MarketplaceAutomation, Pagination, TriggerConditions, UpdateAutomationConfigRequest
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
-
#create_automation_configuration(marketplace_ids, body) ⇒ Peddler::Response
Creates a new automation configuration for automated buyer-seller messaging.
-
#get_automation_configuration(automation_id, marketplace_ids) ⇒ Peddler::Response
Returns the details of a specific automation configuration, including its store-specific automation entries with response content and trigger conditions.
-
#list_automation_configurations(marketplace_ids, automation_type: nil, automation_sub_type: nil, include_marketplace_automations: "FALSE", page_size: nil, pagination_token: nil) ⇒ Peddler::Response
Returns a list of automation configurations that include the specified Amazon store.
-
#update_automation_configuration(automation_id, marketplace_ids, body) ⇒ Peddler::Response
Updates an existing automation configuration.
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_automation_configuration(marketplace_ids, body) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a new automation configuration for automated buyer-seller messaging. The configuration is ACTIVE as
soon as it is created. The response returns the full automation configuration resource, including the
server-generated automationId.
29 30 31 32 33 34 35 36 |
# File 'lib/peddler/apis/messaging_2026_04_20.rb', line 29 def create_automation_configuration(marketplace_ids, body) path = "/messaging/2026-04-20/automationConfigurations" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { AutomationConfiguration } post(path, body:, params:, parser:) end |
#get_automation_configuration(automation_id, marketplace_ids) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the details of a specific automation configuration, including its store-specific automation entries with response content and trigger conditions.
82 83 84 85 86 87 88 89 |
# File 'lib/peddler/apis/messaging_2026_04_20.rb', line 82 def get_automation_configuration(automation_id, marketplace_ids) path = "/messaging/2026-04-20/automationConfigurations/#{percent_encode(automation_id)}" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { AutomationConfiguration } get(path, params:, parser:) end |
#list_automation_configurations(marketplace_ids, automation_type: nil, automation_sub_type: nil, include_marketplace_automations: "FALSE", page_size: nil, pagination_token: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns a list of automation configurations that include the specified Amazon store. Results may include configurations that also apply to other stores, since a single configuration can span multiple stores.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/peddler/apis/messaging_2026_04_20.rb', line 57 def list_automation_configurations(marketplace_ids, automation_type: nil, automation_sub_type: nil, include_marketplace_automations: "FALSE", page_size: nil, pagination_token: nil) path = "/messaging/2026-04-20/automationConfigurations" params = { "marketplaceIds" => stringify_array(marketplace_ids), "automationType" => automation_type, "automationSubType" => automation_sub_type, "includeMarketplaceAutomations" => include_marketplace_automations, "pageSize" => page_size, "paginationToken" => pagination_token, }.compact parser = -> { ListAutomationConfigsResponse } get(path, params:, parser:) end |
#update_automation_configuration(automation_id, marketplace_ids, body) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates an existing automation configuration. This is a full replacement operation using PUT semantics; you
must provide the complete desired state, including automationDisplayName, automationStatus, and
marketplaceAutomations. The marketplaceAutomations entries you provide replace all of the configuration's
existing Amazon store entries; any store that you omit is removed from the configuration. To deactivate a
configuration, send its complete current state with automationStatus set to DEACTIVATED.
105 106 107 108 109 110 111 112 |
# File 'lib/peddler/apis/messaging_2026_04_20.rb', line 105 def update_automation_configuration(automation_id, marketplace_ids, body) path = "/messaging/2026-04-20/automationConfigurations/#{percent_encode(automation_id)}" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { AutomationConfiguration } put(path, body:, params:, parser:) end |