FulfillmentOrder endpoint returning multiple "fulfillment orders" for orders with a single item

23 0 4

I'm trying to use the FulfillemntOrder endpoint to figure out which warehouse shopify allocated the order to. I'm using this data to assign the correct warehouse in Shipstation. 

I'm using these docs:


My current logic as been: 

- get order ID from shipstation

- get fulfillmentorder information for that ID from shopify via the endpoint referenced above. 

- if the list of "fulfillment_orders" that gets returned has more than one element, I've been assuming it's a multi-location order, so i'm tagging it with "needs manual split" in shipstation so that staff can follow up

- if the list of orders has one element, I set the location for that order in Shipstation to match the warehouse allocated in shopify. 

The problem: 

- I'm finding that orders started as Drafts or entered via the shopify iphone app come through with two fulfillment_orders even for a single item order.

How can I figure out which location the item has been allocated to? 

Am I missing something fundamental about the fulfilment_orders endpoint? based on the results i'm getting I could see a scenario where I filled the same order from 2 or more locations, which would obviously be problematic. 

Editing to add, I'm now seeing that sometimes one of the items has 0 for "fulfillable_quantity", and that the net quantity appears to be correct.