Update multiple products

New Member
5 0 0

Hello,

 

Is it possible to update multiple products with one API call ?

If yes, how can we make it ?

 

Thanks

Eric

0 Likes
Highlighted
Shopify Partner
1843 170 525

With REST API, not sure but don't think it is. I say not sure because I haven't actually tried/confirmed whether HTTP multipart batch requests work with Shopify REST Admin API. If they do, great, if not, no way then. If you try, let us know ;-)

 

With GraphQL Admin API, yes you can. For example

 

mutation {
  Product1: productCreate(input: {
    title: "Test Item 1", 
    publishOn: "2019-01-31T00:00:00-12:00"
  }) {
    product {
      id
    }
  }
  
  Product2: productCreate(input: {
    title: "Test Item 2", 
    publishOn: "2019-01-31T00:00:00-12:00"
  }) {
    product {
      id
    }
  }
}

 

And call it a day.

I turn coffee in to code - since 1998
0 Likes
New Member
5 0 0

Thank you for your reply.

 

I have to work with REST API.

For the moment, I'll continue to update products one by one.

0 Likes
New Member
5 0 0

Hello,

Finally, I have to migrate to GraphQL.
Is there an example for using GraphQL with .NET ?

Thanks
Eric

0 Likes
Shopify Partner
1843 170 525

Not that I know of though there are so many git repos out in the wild, I am sure someone would have made a demo. Either way, just pick a GraphQL client for .NET, generate the types from the schema and enjoy... no? Okay, not sure about availability of schema to types builders in .NET but you'd survive without too.

I turn coffee in to code - since 1998
0 Likes