fulfillment-inbound-api-model

AmzSpApi::FulfillmentInboundApiModel - the Ruby gem for the Selling Partner API for Fulfillment Inbound

The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.

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-inbound-api-model.gemspec

Then either install the gem locally:

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

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

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.
need_by_date = Date.parse('2013-10-20') # Date | Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value.
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace the shipment is tied to.


begin
  result = api_instance.confirm_preorder(shipment_id, need_by_date, marketplace_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->confirm_preorder: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.confirm_transport(shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->confirm_transport: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
body = AmzSpApi::FulfillmentInboundApiModel::InboundShipmentRequest.new # InboundShipmentRequest |
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.create_inbound_shipment(body, shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->create_inbound_shipment: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
body = AmzSpApi::FulfillmentInboundApiModel::CreateInboundShipmentPlanRequest.new # CreateInboundShipmentPlanRequest |


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

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.estimate_transport(shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->estimate_transport: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.get_bill_of_lading(shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_bill_of_lading: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace where the product would be stored.
opts = { 
  seller_sku_list: ['seller_sku_list_example'], # Array<String> | A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon's fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold.
  asin_list: ['asin_list_example'] # Array<String> | A list of ASIN values. Used to identify items for which you want inbound guidance for shipment to Amazon's fulfillment network. Note: If you specify a ASIN that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold.
}

begin
  result = api_instance.get_inbound_guidance(marketplace_id, opts)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_inbound_guidance: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.
page_type = 'page_type_example' # String | The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error.
label_type = 'label_type_example' # String | The type of labels requested.
opts = { 
  number_of_packages: 56, # Integer | The number of packages in the shipment.
  package_labels_to_print: ['package_labels_to_print_example'], # Array<String> | A list of identifiers that specify packages for which you want package labels printed.  Must match CartonId values previously passed using the FBA Inbound Shipment Carton Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code.
  number_of_pallets: 56 # Integer | The number of pallets in the shipment. This returns four identical labels for each pallet.
}

begin
  result = api_instance.get_labels(shipment_id, page_type, label_type, opts)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_labels: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace the shipment is tied to.


begin
  result = api_instance.get_preorder_info(shipment_id, marketplace_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_preorder_info: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
ship_to_country_code = 'ship_to_country_code_example' # String | The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country.
opts = { 
  seller_sku_list: ['seller_sku_list_example'], # Array<String> | A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon's fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API.  Note: Include seller SKUs that you have used to list items on Amazon's retail website. If you include a seller SKU that you have never used to list an item on Amazon's retail website, the seller SKU is returned in the InvalidSKUList property in the response.
  asin_list: ['asin_list_example'] # Array<String> | A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions.  Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller  participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers.
}

begin
  result = api_instance.get_prep_instructions(ship_to_country_code, opts)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_prep_instructions: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
query_type = 'query_type_example' # String | Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request.
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace where the product would be stored.
opts = { 
  last_updated_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller.
  last_updated_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller.
  next_token: 'next_token_example' # String | A string token returned in the response to your previous request.
}

begin
  result = api_instance.get_shipment_items(query_type, marketplace_id, opts)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_shipment_items: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier used for selecting items in a specific inbound shipment.
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace where the product would be stored.


begin
  result = api_instance.get_shipment_items_by_shipment_id(shipment_id, marketplace_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_shipment_items_by_shipment_id: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
query_type = 'query_type_example' # String | Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request.
marketplace_id = 'marketplace_id_example' # String | A marketplace identifier. Specifies the marketplace where the product would be stored.
opts = { 
  shipment_status_list: ['shipment_status_list_example'], # Array<String> | A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify.
  shipment_id_list: ['shipment_id_list_example'], # Array<String> | A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned.
  last_updated_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | A date used for selecting inbound shipments that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller.
  last_updated_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | A date used for selecting inbound shipments that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller.
  next_token: 'next_token_example' # String | A string token returned in the response to your previous request.
}

begin
  result = api_instance.get_shipments(query_type, marketplace_id, opts)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_shipments: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.get_transport_details(shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->get_transport_details: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
body = AmzSpApi::FulfillmentInboundApiModel::PutTransportDetailsRequest.new # PutTransportDetailsRequest |
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.put_transport_details(body, shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->put_transport_details: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
body = AmzSpApi::FulfillmentInboundApiModel::InboundShipmentRequest.new # InboundShipmentRequest |
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.update_inbound_shipment(body, shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->update_inbound_shipment: #{e}"
end

api_instance = AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi.new
shipment_id = 'shipment_id_example' # String | A shipment identifier originally returned by the createInboundShipmentPlan operation.


begin
  result = api_instance.void_transport(shipment_id)
  p result
rescue AmzSpApi::FulfillmentInboundApiModel::ApiError => e
  puts "Exception when calling FbaInboundApi->void_transport: #{e}"
end

Documentation for API Endpoints

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

Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {confirm_preorder} | PUT /fba/inbound/v0/shipments/{shipmentId}/preorder/confirm | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {confirm_transport} | POST /fba/inbound/v0/shipments/{shipmentId}/transport/confirm | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {create_inbound_shipment} | POST /fba/inbound/v0/shipments/{shipmentId} | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {create_inbound_shipment_plan} | POST /fba/inbound/v0/plans | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {estimate_transport} | POST /fba/inbound/v0/shipments/{shipmentId}/transport/estimate | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_bill_of_lading} | GET /fba/inbound/v0/shipments/{shipmentId}/billOfLading | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_inbound_guidance} | GET /fba/inbound/v0/itemsGuidance | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_labels} | GET /fba/inbound/v0/shipments/{shipmentId}/labels | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_preorder_info} | GET /fba/inbound/v0/shipments/{shipmentId}/preorder | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_prep_instructions} | GET /fba/inbound/v0/prepInstructions | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_shipment_items} | GET /fba/inbound/v0/shipmentItems | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_shipment_items_by_shipment_id} | GET /fba/inbound/v0/shipments/{shipmentId}/items | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_shipments} | GET /fba/inbound/v0/shipments | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {get_transport_details} | GET /fba/inbound/v0/shipments/{shipmentId}/transport | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {put_transport_details} | PUT /fba/inbound/v0/shipments/{shipmentId}/transport | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {update_inbound_shipment} | PUT /fba/inbound/v0/shipments/{shipmentId} | AmzSpApi::FulfillmentInboundApiModel::FbaInboundApi | {void_transport} | POST /fba/inbound/v0/shipments/{shipmentId}/transport/void |

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.