How to successfully bulk update inventory using REST and GraphQL API?

Solved

How to successfully bulk update inventory using REST and GraphQL API?

Mads_W
Excursionist
16 2 14

How do I bulk update item inventory using API?

We can do both REST and Graph QL api, but I can't get bulk updating of inventory on variants to work?

Thanks!

Accepted Solutions (2)

GreenFlux_LLC
Shopify Partner
4 1 4

This is an accepted solution.

I don't think the REST API supports bulk inventory updates, but the GraphQL API does:
https://shopify.dev/api/admin-graphql/2022-01/mutations/inventoryBulkAdjustQuantityAtLocation

 

Bulk inventory updates can also be done with a CSV import:
https://help.shopify.com/en//manual/locations/changing-quantities/exporting-or-importing-inventory

 

 

WE'VE GOT YOUR APP COVERED.
www.greenflux.us
Veteran Owned & Operated - Since 2016 - Tallahassee, FL

View solution in original post

Mads_W
Excursionist
16 2 14

This is an accepted solution.

Hi,

No we needed to go GraphQL way on this.

View solution in original post

Replies 7 (7)

GreenFlux_LLC
Shopify Partner
4 1 4

This is an accepted solution.

I don't think the REST API supports bulk inventory updates, but the GraphQL API does:
https://shopify.dev/api/admin-graphql/2022-01/mutations/inventoryBulkAdjustQuantityAtLocation

 

Bulk inventory updates can also be done with a CSV import:
https://help.shopify.com/en//manual/locations/changing-quantities/exporting-or-importing-inventory

 

 

WE'VE GOT YOUR APP COVERED.
www.greenflux.us
Veteran Owned & Operated - Since 2016 - Tallahassee, FL
RogerF
Shopify Partner
2 0 1

GraphQL supports DELTAs only. It’s not a way of setting a new value. For that you have to do one by one using REST or manually via CSV. We have a custom inventory management app and I’ve tried every which way to get a sync to work but the only way of doing it is to go through all published items one by one and update if they’re different. 

Watch out for rate limits if you do this too. 

Notified
Shopify Partner
11 1 0

Is there a solution available in new GraphQL API version 2024-01 ?

abad
Tourist
5 0 1

Hi mate,

 

Have you sorted out what you were looking to achieve? Please let me know as I am in the same situation. 

 

Thanks and looking forward

 

Abad

Mads_W
Excursionist
16 2 14

This is an accepted solution.

Hi,

No we needed to go GraphQL way on this.

abad
Tourist
5 0 1

Thanks for your response. I am having the same problem. Have you come up with any solution? I mean did you build any application? I am looking to update in bulk pricing and inventory but don't want to pay for apps like stock sync etc. happy to purchase any software that can do the job. Please advise. Thanks

GreenFlux_LLC
Shopify Partner
4 1 4

Hey @abad , I've built a few apps to do similar things with other APIs but I haven't tried with Shopify's GraphQL API yet. It does look possible though, based on their API docs.

GraphQL itself has a bit of a learning curve, but this should be easy for any dev that's already familiar with it. You might be able to hire someone to build a web app that parses a CSV into a GraphQL mutation for bulk upload. Once you have the endpoint and query format figured out, the rest would only take a few hours to build in something like Appsmith, or any other app builder that supports GraphQL. 

WE'VE GOT YOUR APP COVERED.
www.greenflux.us
Veteran Owned & Operated - Since 2016 - Tallahassee, FL