在铁轨中使用小贩创建入境

问题描述 投票:0回答:1

我试图创建InboundShipment。

client.create_inbound_shipment(id, inbound_shipment_header, inbound_shipment_items)

id是由Shipplan创建的shipplan id。

inbound_shipment_header = {:shipment_name=>"kum_03_01_2019_AVP1", :ship_from_address=>{:name=>"xxxx", :address_line1=>"xxxx", :address_line2=>"", :city=>"xxxx", :state_or_province_code=>"XX", :postal_code=>"xxxx", :country_code=>"xxxx"}, :destination_fulfillment_center_id=>"AVP1", :label_prep_preference=>"SELLER_LABEL", :are_cases_required=>false, :shipment_status=>"WORKING", :intended_box_contents_source=>"2D_BARCODE"}

inbound_shipment_items = [{:seller_sku=>"SKU", :quantity=>25, :prep_details=>[{:prep_instruction=>"Labeling", :prep_owner=>"SELLER"}]}]

但它会返回错误。

#<Peddler::Errors::InvalidRequestException: Error: You must include a valid ShipmentId with a call to the CreateInboundShipment operation. Get ShipmentId values by calling the CreateInboundShipmentPlan operation. The request to CreateInboundShipment must include only items and quantities that have been previously planned through CreateInboundShipmentPlan. If a ShipmentId is not used to create a shipment within 48 hours it will expire.>

当我在MWS便笺簿上尝试这个时,它正常工作。

在RubyOnRails上创建入库货件的解决方案是什么?

ruby-on-rails amazon-web-services amazon-mws peddler
1个回答
0
投票

我刚刚解决了这个问题。

编写入库货件时出错。

inbound_shipment_item应该如下。

inbound_shipment_items = [{:seller_sku=>"SKU", :quantity_shipped=>25, :prep_details=>[{:prep_instruction=>"Labeling", :prep_owner=>"SELLER"}]}]
© www.soinside.com 2019 - 2024. All rights reserved.