AmzSpApi - the Ruby gem for the Amazon Selling Partner API (SP-API)
This SDK is automatically generated by running Swagger Codegen on each SP-API model using the codegen.sh script.
To build the Ruby code into a gem:
gem build amz_sp_api.gemspec
Then either install the gem locally:
gem install ./amz_sp_api-0.1.0.gem
(for development, run gem install --dev ./amz_sp_api-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 'amz_sp_api', '~> 0.1.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'amz_sp_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Please follow the installation procedure and then run the following code:
# Load the gem and specific api model you'd like to use
require 'amz_sp_api'
require 'fulfillment-outbound-api-model'
AmzSpApi.configure do |config|
config.refresh_token =
config.client_id =
config.client_secret =
config.aws_access_key_id =
config.aws_secret_access_key =
config.region = 'eu'
# config.debugging = true
end
begin
api = AmzSpApi::FulfillmentOutboundApiModel::FbaOutboundApi.new(AmzSpApi::SpApiClient.new)
p api.list_all_fulfillment_orders.payload
rescue AmzSpApi::ApiError => e
puts "Exception when calling SP-API: #{e}"
end