Skip to main content

Shop API

The Shop API provides read-only access to the merchant's shop identity, including the shop ID, display name, primary storefront URL, and permanent myshopify.com domain. Use this API to link back to the storefront, identify the shop in backend requests, or display the shop name alongside order information.

  • Link to the storefront: Create links back to the merchant's online store from your extension.
  • Identify the shop: Use the shop's permanent domain as a stable identifier when communicating with your backend service.
  • Display the shop name: Show the shop name in your extension's UI for context.

The shopify global object provides information about the shop where the order was placed. Access the following properties on shopify to read the shop's identity, name, storefront URL, and myshopify.com domain.

required

The shop where the order was placed. Includes the shop ID, name, primary storefront URL, and myshopify.com domain.


  • Use myshopifyDomain for reliable identification: The myshopifyDomain is a stable identifier for the shop, while the storefrontUrl can change if the merchant updates their custom domain.
  • Use storefrontUrl for customer-facing links: When linking to the storefront from your extension, use the storefrontUrl property to ensure links point to the merchant's primary domain.

  • The Shop API provides only basic shop identification. For detailed shop settings such as currency, timezone, or plan information, use the GraphQL Admin API through a backend service.

Was this page helpful?