Focusing on managing products, variants, and collections through the API.
Hello!
Straight up, I don't have a lot of experience working with APIs. I'm mostly a front-end developer.
I'd like to send out an API call from Zapier to return a product based on the UPC.
I'm definitely doing this wrong but here's what I set up:
Any help is appreciated! Thanks in advance!
If the service allows GraphQL api access then use that instead to query variant by barcode.
For REST refer to the reference
https://shopify.dev/docs/api/admin-rest/2023-04/resources/product-variant
There is no barcode parameter to query in a productVariant in the REST api
So using the REST api you need to just get all the variants, using pagination, then filter down to the barcode after you have them all in the automation service.
Alternatively use that automation tool, or yet another automation tool like mechanic , to premake a data structure or an endpoint that uses the barcode as a key for the variants data.
https://learn.mechanic.dev/platform/cache/endpoints#configuration
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org