Move a FulfillmentOrder

Topic summary

A developer is attempting to move a FulfillmentOrder to a different location to split line items across two fulfillment locations, but encounters a missing keyword argument error for new_location_id.

Root Cause Identified:

  • The issue stems from using shopify_api gem v9 while following v10 API documentation
  • The move method syntax differs between versions

Solution Provided:

  • In v9, the correct syntax is: fulfillment_order.move(location_id: new_location_id)
  • To use v10 (which supports moving subsets of line items), update the gem via bundle update shopify_api
  • Verify the installed version with bundle show | grep shopify_api

Current Status:

  • The original poster confirmed understanding the version mismatch but is uncertain whether v9 supports moving only a subset of line items from an order, which is their actual requirement
Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

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'

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

1 Like

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.

1 Like