fulfillment-outbound-api-model

AmzSpApi::FulfillmentOutboundApiModel - the Ruby gem for the 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.

This SDK is automatically generated by the Swagger Codegen project:

Installation

Build a gem

To build the Ruby code into a gem:

gem build fulfillment-outbound-api-model.gemspec

Then either install the gem locally:

gem install ./fulfillment-outbound-api-model-0.1.0.gem

(for development, run gem install --dev ./fulfillment-outbound-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 'fulfillment-outbound-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 'fulfillment-outbound-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 'fulfillment-outbound-api-model'

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
seller_fulfillment_order_id = 'seller_fulfillment_order_id_example' # String | The identifier assigned to the item by the seller when the fulfillment order was created.


begin
  result = api_instance.cancel_fulfillment_order(seller_fulfillment_order_id)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->cancel_fulfillment_order: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
body = AmzSpApi::FulfillmentOutboundApiModel::CreateFulfillmentOrderRequest.new # CreateFulfillmentOrderRequest |


begin
  result = api_instance.create_fulfillment_order(body)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->create_fulfillment_order: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
body = AmzSpApi::FulfillmentOutboundApiModel::CreateFulfillmentReturnRequest.new # CreateFulfillmentReturnRequest |
seller_fulfillment_order_id = 'seller_fulfillment_order_id_example' # String | An identifier assigned by the seller 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.


begin
  result = api_instance.create_fulfillment_return(body, seller_fulfillment_order_id)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->create_fulfillment_return: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
marketplace_id = 'marketplace_id_example' # String | The marketplace for which to return a list of the inventory that is eligible for the specified feature.
feature_name = 'feature_name_example' # String | The name of the feature for which to return a list of eligible inventory.
opts = { 
  next_token: 'next_token_example' # String | 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.
}

begin
  result = api_instance.get_feature_inventory(marketplace_id, feature_name, opts)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_feature_inventory: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
marketplace_id = 'marketplace_id_example' # String | The marketplace for which to return the count.
feature_name = 'feature_name_example' # String | The name of the feature.
seller_sku = 'seller_sku_example' # 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.


begin
  result = api_instance.get_feature_sku(marketplace_id, feature_name, seller_sku)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_feature_sku: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
marketplace_id = 'marketplace_id_example' # String | The marketplace for which to return the list of features.


begin
  result = api_instance.get_features(marketplace_id)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_features: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
seller_fulfillment_order_id = 'seller_fulfillment_order_id_example' # String | The identifier assigned to the item by the seller when the fulfillment order was created.


begin
  result = api_instance.get_fulfillment_order(seller_fulfillment_order_id)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_fulfillment_order: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
body = AmzSpApi::FulfillmentOutboundApiModel::GetFulfillmentPreviewRequest.new # GetFulfillmentPreviewRequest |


begin
  result = api_instance.get_fulfillment_preview(body)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_fulfillment_preview: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
package_number = 56 # Integer | The unencrypted package identifier returned by the getFulfillmentOrder operation.


begin
  result = api_instance.get_package_tracking_details(package_number)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->get_package_tracking_details: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
opts = { 
  query_start_date: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | 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: 'next_token_example' # String | A string token returned in the response to your previous request.
}

begin
  result = api_instance.list_all_fulfillment_orders(opts)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->list_all_fulfillment_orders: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
seller_sku = 'seller_sku_example' # String | The seller SKU for which return reason codes are required.
language = 'language_example' # String | The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into.
opts = { 
  marketplace_id: 'marketplace_id_example', # String | The marketplace for which the seller wants return reason codes.
  seller_fulfillment_order_id: 'seller_fulfillment_order_id_example' # String | 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.
}

begin
  result = api_instance.list_return_reason_codes(seller_sku, language, opts)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->list_return_reason_codes: #{e}"
end

api_instance = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new
body = AmzSpApi::FulfillmentOutboundApiModel::UpdateFulfillmentOrderRequest.new # UpdateFulfillmentOrderRequest |
seller_fulfillment_order_id = 'seller_fulfillment_order_id_example' # String | The identifier assigned to the item by the seller when the fulfillment order was created.


begin
  result = api_instance.update_fulfillment_order(body, seller_fulfillment_order_id)
  p result
rescue AmzSpApi::FulfillmentOutboundApiModel::ApiError => e
  puts "Exception when calling FbaOutboundApi->update_fulfillment_order: #{e}"
end

Documentation for API Endpoints

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

Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {cancel_fulfillment_order} | PUT /fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/cancel | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {create_fulfillment_order} | POST /fba/outbound/2020-07-01/fulfillmentOrders | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {create_fulfillment_return} | PUT /fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/return | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_feature_inventory} | GET /fba/outbound/2020-07-01/features/inventory/{featureName} | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_feature_sku} | GET /fba/outbound/2020-07-01/features/inventory/{featureName}/{sellerSku} | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_features} | GET /fba/outbound/2020-07-01/features | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_fulfillment_order} | GET /fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId} | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_fulfillment_preview} | POST /fba/outbound/2020-07-01/fulfillmentOrders/preview | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {get_package_tracking_details} | GET /fba/outbound/2020-07-01/tracking | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {list_all_fulfillment_orders} | GET /fba/outbound/2020-07-01/fulfillmentOrders | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {list_return_reason_codes} | GET /fba/outbound/2020-07-01/returnReasonCodes | AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi | {update_fulfillment_order} | PUT /fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId} |

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.