Arguments
An object containing the product’s URL.
Returns
The canonical domain of the store that sells the requested product.
The
productId
is the unique identifier for the requested product, which can be used in subsequent queries to fetch product information, e.g. with productByID
.The
variantId
is the unique identifier for the requested product’s variant. Unless specified in the product’s URL, Rye returns the first variant of the product by default.Example
Errors
Invalid URL
If the provided URL is not a valid Shopify product URL then the following error is returnedJSON
Product data not found
If the product data can’t be found, aPRODUCT_NOT_FOUND_ERROR
is returned. This can happen for a variety of reasons:
- The URL doesn’t point to a valid product page (for example, the provided URL returns a 404 status code)
- The URL points to a valid product page, but the Shopify store has custom configuration that makes it so the product metadata can’t be found in the expected way
JSON