All line items must be stocked at the same location

Highlighted
Tourist
10 1 1

When I send an API request to fulfill a line item on an order with multiple locations, I get "All line items must be stocked at the same location." However, orders from a single location fulfill okay.

 

I've confirmed the item is in fact stocked at this location and there are 4 available.

 

What are we doing wrong?

 

Request:

{
"fulfillment": {
"location_id": "17820516465",
"tracking_number": "117077349568",
"line_item": "4256812564560"
}
}

 

Response:

"All line items must be stocked at the same location."

 

More details:

order_id: 1923881795664

ine_item.id: 4256812564560

variant_id: 30347758239824

inventory_id: 31764393558096

product_id: 4181236580432

 

Response from inventory_levels:

{
"inventory_levels": [
{
"inventory_item_id": 31764393558096,
"location_id": 17820516465,
"available": 4,
"updated_at": "2019-12-05T08:43:15-07:00",
"admin_graphql_api_id": "gid://shopify/InventoryLevel/17432379505?inventory_item_id=31764393558096"
}
]
}

0 Likes
Shopify Staff
Shopify Staff
228 23 26

Hey @SigProdGroup,

 

I had a look at our logs, and it seems the particular line_item on this order got assigned to the PATTER location, which is why you were having trouble fulfilling it from the SP location. Can you confirm if you're still having trouble fulfilling other orders with this item, or did you only have the issue with this one order? 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Tourist
10 1 1

We're having this same or a similar 422 error on every order that has more than one location on it.

0 Likes