Updated Deadline: Aug 1st -- [Deprecation] Important changes to ProductVariant, Refund and Fulfillment APIs

New Member
2 0 0

Hi Ryan,

Do we need access to the locations API if we are just setting the inventory levels?  I'm trying to figure out how to query the levels and set their quantities but I'm a bit confused by the guide.

Do we need a location_id and an inventory Item id to adjust an inventory level?

Thanks

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Hi Ryan,

For the fulfillment service API, how will i know which location_id i need to use for each line item? 

Right now my company uses a private app to do all our fulfillments and we have about 600 different fufillment service. 

Some of our order's come with a origin_location attached with the line item but some order's do not have it. how will i be able to fufill the line item if it does not come with an origin_location?

thanks.

Hi Mark, what is the use case behind 600 fulfillment services? 

When an item is assigned to a fulfillment service, an order will contain a property for `fulfillment_service` with the name of the fulfillment service responsible for that line item.  All fulfillment services have a ` location_id` assigned to them, which is what you should use.

Do we need access to the locations API if we are just setting the inventory levels?  I'm trying to figure out how to query the levels and set their quantities but I'm a bit confused by the guide.

Do we need a location_id and an inventory Item id to adjust an inventory level?

Thanks

If you want to query the `locations.json` endpoint you will need the read_locations.  For some more examples and details check out the migration guide for inventory and fulfillment

Developer Experience @ Shopify
0 Likes
New Member
2 0 0

Hi Ryan,

Thanks for the response, Im assuming you need to query locations to update an inventory level since 
https://help.shopify.com/api/reference/inventory/inventorylevel#adjust takes an inventory_item_id and a location_id? 

We don't really need to do anything with locations at all, but I don't see how we adjust inventory levels without it.

Thanks

0 Likes
Shopify Staff
Shopify Staff
469 36 92

For your use-case you will need it!

Developer Experience @ Shopify
1 Like
Shopify Partner
5 0 0

Hello,

I want to adjust multiple inventory_levels (around 300-400) in single GraphQL mutation query call, is there a way to do so? I tried adjusting 400 inventory levels using GraphQL App, but it showed " TypeError: NetworkError when attempting to fetch resource. " error to me. Is this error due to adjusting large number inventory levels at a time or weather am i missing something.

Thanks in advance.

0 Likes
Shopify Staff
Shopify Staff
469 36 92

New blog post How the New GraphQL Admin API Can Help You Manage Inventory and Locations.

 

 

I want to adjust multiple inventory_levels (around 300-400) in single GraphQL mutation query call, is there a way to do so? I tried adjusting 400 inventory levels using GraphQL App, but it showed " TypeError: NetworkError when attempting to fetch resource. " error to me. Is this error due to adjusting large number inventory levels at a time or weather am i missing something.

 

Radesh, you will want to look into how the call limit works for GraphQL.  That mutation would be too large.  I think the limit would be 200 inventoryAdjustQuantity mutations at one time.

Developer Experience @ Shopify
0 Likes
Shopify Partner
6 0 1

Hi Ryan,

We are using a Private app to update the inventory levels from our warehouse using Inventory set.json API. We noticed that once we update the inventory using the seet.json API, "Fulfillment service" value for the Product/variant changes to the Fulfillment service associated with the location_id.

Is this expected ? 

We are using Fulfillment service = Manual right now for all the products and we update inventory quantity only for certain products. 

 

Thanks,

Hari

 

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Hi Hari,

Is the location_id you are passing in the inventory_levels set, the location_id of a fulfillment service? If so then yes this is intended.  This is because you are adding stock to that fulfillment service location.

Developer Experience @ Shopify
0 Likes
Shopify Partner
6 0 1

Yes Ryan. location id is tied to a fulfillment service.

Can we use any a location id that is not tied to a fulfillment service for inventory SET ?

Will Fulfillment service stay as Manual in this case ?

Also, for some the SKUs we are receiving 403 forbidden though all the information are accurate.

0 Likes
Shopify Staff
Shopify Staff
469 36 92

I believe setting inventory to be stocked at a fulfillment service location, means that inventory is now fulfilled by that location which is why you are seeing it change.  Setting inventory to a location that is not a fulfillment service will not change the fulfillment service off of manual.

For the SKU issue, its probably if the item is stocked at a fulfillment service already, in that case you have to include disconnect_if_true, to remove it from it's current location and connect it to the location specified in your call.

Developer Experience @ Shopify
0 Likes