Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Is it possible to upload Product with Images and assign those images to Variants in just one REST API request, please?
At this moment, the fastest way we know is this:
POST /admin/api/2021-07/products.json
PUT /admin/api/2021-07/products/632910392/images/850703190.json
We have several thousand of products on Shopify. Because of Shopify API Rate limits ( https://shopify.dev/api/usage/rate-limits ), we can have two REST API calls / second. Accomplishing the above in only one call, would help us reduce processing time by 50%, which would be significant.
Thank you.
Solved! Go to the solution
This is an accepted solution.
For REST with existing variants
Each product_image should have a variants_ids
Otherwise look into doing this with GraphQL as REST is inherently not designed for a situation of creation>creation>creation<reference<reference<reference.
This is an accepted solution.
For REST with existing variants
Each product_image should have a variants_ids
Otherwise look into doing this with GraphQL as REST is inherently not designed for a situation of creation>creation>creation<reference<reference<reference.
Thank you Paul. I will check GraphQL. I am closing this question now.
Hi @PaulNewton
How could one do this with GraphQL?
https://shopify.dev/api/admin-graphql/2022-01/mutations/productImageUpdate doesn't have variant id
https://shopify.dev/api/admin-graphql/2022-04/mutations/productappendimages has no variant ids
https://shopify.dev/api/admin-graphql/2022-04/mutations/productVariantUpdate doesn't work: errors with `Field 'imageId' doesn't exist on type 'ProductVariant'`
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By