I currently store references to SKUs in my own db so I can track my inventory across multiple sales channels, Shopify included.
When I want to update inventory via the Shopify JSON API, I have to pass in a Shopify product ID (rather than my SKU value).
Consequently, I can't seem to find a way to search for a product by its variants' SKU value, and update the stock accordingly. This is supported everywhere else in eBay/ Magento/ Amazon and so forth; Is this functionality supported in the Shopify API (bearing in mind I can search from the product screen by SKU), and what does the API call look like?
In Shopify skus aren't forced to be unique so searching for a single product based on sku wouldn't work in the same way it would at the other providers.
That being said, it appears that the search API that is used by the admin is open and you can leverage that to find the products you are looking for:
curl -H "Content-Type: application/json" \ https://user:firstname.lastname@example.org/admin/products/search.json?query=sku:abracadabra
Appreciate the response Chris, will check it out. I think it's a bit strange that this isn't inherently supported in the API as it would make sense for a lot of sellers, and returning a list of matched variants would be fine. I think it's down to the seller to make a good choice in SKU naming rather than the marketplace, so not enforcing 'uniqueness' makes sense to me anyway.