> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "requestShopifyProductByURL"
description: "Requests a Shopify product to be tracked by Rye's API. Products will be refreshed on some interval. A product must be requested before it can be queried."
---

## Arguments

<ParamField path="input" type="RequestShopifyProductByURLInput!" required>
  An object containing the product's URL.

  <Expandable title="properties">
    <ParamField path="url" type={<a href="/api-reference/url">URL!</a>} required>
      The URL of the product to be requested. It is recommended to use the [storefront URL](/sync-api/shopify-merchant-onboarding/shopify-store-domains) of the product, as Rye will infer the correct canonical domain automatically.
    </ParamField>
  </Expandable>
</ParamField>

## Returns

<ResponseField name="canonicalDomain" type="String!">
  The [canonical domain](/sync-api/shopify-merchant-onboarding/shopify-store-domains) of the store that sells the requested product.
</ResponseField>

<ResponseField name="productId" type="ID!">
  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`](/api-reference/productbyid).
</ResponseField>

<ResponseField name="variantId" type="ID!">
  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.
</ResponseField>

## Example

<Tabs items={["Request", "Response"]}>
  <Tab title="Request">
    ```graphql
    mutation RequestShopifyProductByURL {
      requestShopifyProductByURL(
        input: {
          url: "https://kyliecosmetics.com/products/lip-butter-precision-pout-lip-liner-duo"
        }
      ) {
        canonicalDomain
        productId
      }
    }
    ```
  </Tab>

  <Tab title="Response">
    ```json
    {
      "data": {
        "requestShopifyProductByURL": {
          "canonicalDomain": "kylie-jenner-us.myshopify.com",
          "productId": "8113424269554"
        }
      }
    }
    ```
  </Tab>
</Tabs>

***

## Errors

### Invalid URL

If the provided URL is not a valid Shopify product URL then the following error is returned

```JSON JSON
{
  "errors": [
    {
      "message": "The provided `url` input (\"www.google.com\") is not a valid Shopify product URL.",
      "path": [
        "requestProductByURL"
      ]
    }
  ],
  "data": null
}
```

### Product data not found

If the product data can't be found, a `PRODUCT_NOT_FOUND_ERROR` is returned. This can happen for a variety of reasons:

1. The URL doesn't point to a valid product page (for example, the provided URL returns a 404 status code)
2. 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

If the store can't be supported, then the store's products can only be made available in Rye by integrating the store with Rye via the [Rye Shopify app](/sync-api/shopify-merchant-onboarding/shopify-app-installation).

```json JSON
{
  "errors": [
    {
      "message": "Product data not found - if the URL is valid, then the store may not be supported. See docs for more details",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "requestShopifyProductByURL"
      ],
      "extensions": {
        "code": "PRODUCT_NOT_FOUND_ERROR"
      }
    }
  ],
  "data": null
}
```

## Webhooks

Calling this mutation will subscribe your developer account to [product webhooks](/webhooks/events#product-related-webhooks) for the requested product.

***

## Related mutations

* [`requestAmazonProductByURL`](/api-reference/requestamazonproductbyurl)
* [`requestStoreByURL`](/api-reference/requeststorebyurl)


---

*Powered by [holocron.so](https://holocron.so)*
