Covers all questions related to inventory management, order fulfillment, and shipping.
I'm trying to move a FulfillmentOrder from one location to the next, but it appears that I'm not providing the new_location_id correctly. The code seems to be identical to the API docs.
The business use case is that I need to split fulfill the line items on the order across 2 different fulfillment locations, so I am trying to move a subset of the line_items to a new location id
ShopifyAPI::Base.api_version = '2023-04'
...
new_fulfillment_order = ShopifyAPI::FulfillmentOrder.new
new_fulfillment_order.id = 6326207054137
new_fulfillment_order.move(
body: {"fulfillment_order" => {"new_location_id" => 86003122489, "fulfillment_order_line_items" => [{"id"=>13966098104633, "quantity"=>2}]}}
)
=> ArgumentError: missing keyword: new_location_id
from /usr/share/rvm/gems/ruby-2.4.10/gems/shopify_api-9.4.0/lib/shopify_api/resources/fulfillment_order.rb:38:in `move'
Solved! Go to the solution
This is an accepted solution.
If I understood your context properly, it looks like you are using v9 API and you are following v10 documentation.
In v9 version the move was different
According to the link above something like:
response_fulfillment_orders = fulfillment_order.move(new_location_id: new_location_id)
I hope that will help you
This is an accepted solution.
If I understood your context properly, it looks like you are using v9 API and you are following v10 documentation.
In v9 version the move was different
According to the link above something like:
response_fulfillment_orders = fulfillment_order.move(new_location_id: new_location_id)
I hope that will help you
Ah, yes, I see that now in the documentation that you linked. It seems I need to be using the v10 API because it doesn't look like v9 supports only moving a subset of the line items on an order. That being said, I don't have any idea how to decide to use v10 instead of v9.
You are using Ruby. If you use a Gemfile with bundler (the most common way) you have to update it with bundler
bundle update shopify_api
Then you can verify the gem version used by your project with the command
bundle show | grep shopify_api
* shopify_api (13.0.0)
I hope it helps you.