Class: Peddler::APIs::FulfillmentOutbound20200701

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

Overview

Selling Partner APIs for Fulfillment Outbound

The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon’s fulfillment network. You can get information on both potential and existing fulfillment orders.

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

#cancel_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier.

Parameters:

  • seller_fulfillment_order_id (String)

    The identifier assigned to the item by the seller when the fulfillment order was created.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



178
179
180
181
182
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 178

def cancel_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/cancel"
  parser = Peddler::Types::FulfillmentOutbound20200701::CancelFulfillmentOrderResponse if typed?
  meter(rate_limit).put(path, parser:)
end

#create_fulfillment_order(body, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Requests that Amazon ship items from the seller’s inventory in Amazon’s fulfillment network to a destination address.

Parameters:

  • body (Hash)

    CreateFulfillmentOrderRequest parameter

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



75
76
77
78
79
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 75

def create_fulfillment_order(body, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders"
  parser = Peddler::Types::FulfillmentOutbound20200701::CreateFulfillmentOrderResponse if typed?
  meter(rate_limit).post(path, body:, parser:)
end

#create_fulfillment_return(body, seller_fulfillment_order_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Creates a fulfillment return.

Parameters:

  • body (Hash)

    The request body of the ‘createFulfillmentReturn` operation.

  • seller_fulfillment_order_id (String)

    An identifier the seller assigns to the fulfillment order at the time it was created. The seller uses their own records to find the correct ‘sellerFulfillmentOrderId` value based on the buyer’s request to return items.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



137
138
139
140
141
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 137

def create_fulfillment_return(body, seller_fulfillment_order_id, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/return"
  parser = Peddler::Types::FulfillmentOutbound20200701::CreateFulfillmentReturnResponse if typed?
  meter(rate_limit).put(path, body:, parser:)
end

#delivery_offers(body, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns delivery options that include an estimated delivery date and offer expiration, based on criteria that you specify.

Parameters:

  • body (Hash)

    GetDeliveryOffersRequest parameter

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



42
43
44
45
46
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 42

def delivery_offers(body, rate_limit: 5.0)
  path = "/fba/outbound/2020-07-01/deliveryOffers"
  parser = Peddler::Types::FulfillmentOutbound20200701::GetDeliveryOffersResponse if typed?
  meter(rate_limit).post(path, body:, parser:)
end

#get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_start_date: nil, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of inventory items that are eligible for the fulfillment feature you specify.

Parameters:

  • marketplace_id (String)

    The marketplace for which to return a list of the inventory that is eligible for the specified feature.

  • feature_name (String)

    The name of the feature for which to return a list of eligible inventory.

  • next_token (String) (defaults to: nil)

    A string token returned in the response to your previous request that is used to return the next response page. A value of ‘null` will return the first page.

  • query_start_date (String) (defaults to: nil)

    A date that you can use to select inventory that has been updated since a specified date. An update is defined as any change in feature-enabled inventory availability. The date must be in the format ‘yyyy-MM-ddTHH:mm:ss.sssZ`

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



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

def get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_start_date: nil, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/features/inventory/#{percent_encode(feature_name)}"
  params = {
    "marketplaceId" => marketplace_id,
    "nextToken" => next_token,
    "queryStartDate" => query_start_date,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::GetFeatureInventoryResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#get_feature_sku(marketplace_id, feature_name, seller_sku, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns the number of items with the ‘sellerSku` you specify that can have orders fulfilled using the specified feature. Note that if the `sellerSku` isn’t eligible, the response will contain an empty ‘skuInfo` object. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](developer-docs.amazon.com/sp-api/docs/url-encoding).

Parameters:

  • marketplace_id (String)

    The marketplace for which to return the count.

  • feature_name (String)

    The name of the feature.

  • seller_sku (String)

    Used to identify an item in the given marketplace. ‘sellerSku` is qualified by the seller’s ‘sellerId`, which is included with every operation that you submit.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



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

def get_feature_sku(marketplace_id, feature_name, seller_sku, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/features/inventory/#{percent_encode(feature_name)}/#{percent_encode(seller_sku)}"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::GetFeatureSkuResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#get_features(marketplace_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature.

Parameters:

  • marketplace_id (String)

    The marketplace for which to return the list of features.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



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

def get_features(marketplace_id, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/features"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::GetFeaturesResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#get_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns the fulfillment order indicated by the specified order identifier.

Parameters:

  • seller_fulfillment_order_id (String)

    The identifier assigned to the item by the seller when the fulfillment order was created.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



150
151
152
153
154
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 150

def get_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}"
  parser = Peddler::Types::FulfillmentOutbound20200701::GetFulfillmentOrderResponse if typed?
  meter(rate_limit).get(path, parser:)
end

#get_fulfillment_preview(body, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of fulfillment order previews based on shipping criteria that you specify.

Parameters:

  • body (Hash)

    GetFulfillmentPreviewRequest parameter

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



29
30
31
32
33
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 29

def get_fulfillment_preview(body, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders/preview"
  parser = Peddler::Types::FulfillmentOutbound20200701::GetFulfillmentPreviewResponse if typed?
  meter(rate_limit).post(path, body:, parser:)
end

#get_package_tracking_details(package_number: nil, amazon_fulfillment_tracking_number: nil, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order.

Parameters:

  • package_number (Integer) (defaults to: nil)

    The unencrypted package identifier. You can obtain this value from the ‘getFulfillmentOrder` operation.

  • amazon_fulfillment_tracking_number (String) (defaults to: nil)

    The Amazon fulfillment tracking number. You can obtain this value from the ‘getFulfillmentOrder` operation.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



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

def get_package_tracking_details(package_number: nil, amazon_fulfillment_tracking_number: nil, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/tracking"
  params = {
    "packageNumber" => package_number,
    "amazonFulfillmentTrackingNumber" => amazon_fulfillment_tracking_number,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::GetPackageTrackingDetailsResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#list_all_fulfillment_orders(query_start_date: nil, next_token: nil, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the ‘nextToken` parameter.

Parameters:

  • query_start_date (String) (defaults to: nil)

    A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.

  • next_token (String) (defaults to: nil)

    A string token returned in the response to your previous request.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



58
59
60
61
62
63
64
65
66
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 58

def list_all_fulfillment_orders(query_start_date: nil, next_token: nil, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders"
  params = {
    "queryStartDate" => query_start_date,
    "nextToken" => next_token,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::ListAllFulfillmentOrdersResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#list_return_reason_codes(seller_sku, marketplace_id: nil, seller_fulfillment_order_id: nil, language: nil, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of return reason codes for a seller SKU in a given marketplace. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](developer-docs.amazon.com/sp-api/docs/url-encoding).

Parameters:

  • seller_sku (String)

    The seller SKU for which return reason codes are required.

  • marketplace_id (String) (defaults to: nil)

    The marketplace for which the seller wants return reason codes.

  • seller_fulfillment_order_id (String) (defaults to: nil)

    The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.

  • language (String) (defaults to: nil)

    The language that the ‘TranslatedDescription` property of the `ReasonCodeDetails` response object should be translated into.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 115

def list_return_reason_codes(seller_sku, marketplace_id: nil, seller_fulfillment_order_id: nil, language: nil,
  rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/returnReasonCodes"
  params = {
    "sellerSku" => seller_sku,
    "marketplaceId" => marketplace_id,
    "sellerFulfillmentOrderId" => seller_fulfillment_order_id,
    "language" => language,
  }.compact
  parser = Peddler::Types::FulfillmentOutbound20200701::ListReturnReasonCodesResponse if typed?
  meter(rate_limit).get(path, params:, parser:)
end

#submit_fulfillment_order_status_update(seller_fulfillment_order_id, body) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Requests that Amazon update the status of an order in the sandbox testing environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Fulfillment Outbound Dynamic Sandbox Guide](developer-docs.amazon.com/sp-api/docs/fulfillment-outbound-dynamic-sandbox-guide) and [Selling Partner API sandbox](developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.

Parameters:

  • seller_fulfillment_order_id (String)

    The identifier assigned to the item by the seller when the fulfillment order was created.

  • body (Hash)

    The identifier assigned to the item by the seller when the fulfillment order was created.

Returns:



195
196
197
198
199
200
201
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 195

def submit_fulfillment_order_status_update(seller_fulfillment_order_id, body)
  must_sandbox!

  path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/status"
  parser = Peddler::Types::FulfillmentOutbound20200701::SubmitFulfillmentOrderStatusUpdateResponse if typed?
  put(path, body:, parser:)
end

#update_fulfillment_order(body, seller_fulfillment_order_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Updates and/or requests shipment for a fulfillment order with an order hold on it.

Parameters:

  • body (Hash)

    The request body of the ‘updateFulfillmentOrder` operation.

  • seller_fulfillment_order_id (String)

    The identifier assigned to the item by the seller when the fulfillment order was created.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



164
165
166
167
168
# File 'lib/peddler/apis/fulfillment_outbound_2020_07_01.rb', line 164

def update_fulfillment_order(body, seller_fulfillment_order_id, rate_limit: 2.0)
  path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}"
  parser = Peddler::Types::FulfillmentOutbound20200701::UpdateFulfillmentOrderResponse if typed?
  meter(rate_limit).put(path, body:, parser:)
end