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.
Anchor to Use casesUse cases
- 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.
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Anchor to PropertiesProperties
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.
- Anchor to shopshopshopShopShoprequiredrequired
The shop where the order was placed. Includes the shop ID, name, primary storefront URL, and myshopify.com domain.
Shop
Metadata about the merchant's store, including its name, storefront URL, `.myshopify.com` subdomain, and a globally-unique ID.
- id
A globally-unique identifier for the shop in the format `gid://shopify/Shop/<id>`.
string - myshopifyDomain
The shop's unique `.myshopify.com` subdomain, such as `'example.myshopify.com'`. This domain is permanent and doesn't change even if the merchant adds a custom domain.
string - name
The display name of the shop as configured by the merchant in Shopify admin.
string - storefrontUrl
The primary storefront URL for the shop, such as `'https://example.myshopify.com'`. Use this to build links back to the merchant's online store.
string
Anchor to Best practicesBest practices
- Use
myshopifyDomainfor reliable identification: ThemyshopifyDomainis a stable identifier for the shop, while thestorefrontUrlcan change if the merchant updates their custom domain. - Use
storefrontUrlfor customer-facing links: When linking to the storefront from your extension, use thestorefrontUrlproperty to ensure links point to the merchant's primary domain.
Anchor to LimitationsLimitations
- 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.