Hi, I am using shopify product POST api to upload multiple products to my shopify store . But sometimes for some products single API create two products with same data. This is causing duplicacy of products on store.
Any solution to this ?
Looks problem is related to hardcoded/constent request payload.
Cross check your API code.
It means code in your file is repeated.
Hardcoded means static code or it will not change when your API request.
You could provide more details. An aspect of this you have not made clear:
Are you sure your code is not sending more than one request with the same payload? In other words, is your test of product creation a one and done thing, or is it part of a bigger production process in a loop?
So many things to rule out. I have created hundreds of thousands of products in hundreds of shops using API calls, and have yet to see duplicate products show up because of Shopify. Not that that can't happen, of course it could, but still, most of the time it is API consumer code at fault, not the API itself. Anyway, tick off more boxes for us in the community, and maybe we could help you.