The Rye API uses the canonical domain to identify unique Shopify stores. This article explains the difference between the storefront domain and the canonical domain, and how to use them in the API.
my-cool-store.com
.myshopify.com
subdomain. Example: e8548f-63.myshopify.com
.ShopifyApp.installationLink
resolver is set up to work with either a canonical or storefront domain:
gymshark.com
, for instance, is not gymshark.myshopify.com
like you might assume! The correct canonical domain is gymsharkusa.myshopify.com
; gymshark.myshopify.com
is the canonical domain for their UK store.
Because it can be difficult to accurately determine the canonical domain upfront, the following operations accept either one of the two domains and will attempt to resolve the correct canonical domain for you:
All of these operations return a canonicalDomain
field on their payload which you can save and use for subsequent requests.
Request a Shopify product
requestShopifyProductByURL
. The Sell Anything API will resolve the correct canonical domain while processing this requestAnimationFrame.Receive canonical domain
canonicalDomain
field contains a different domain from the one provided to requestShopifyProductByURL
.Save the canonical domain
Use the canonical domain