ShopAPI
The API for interacting with shop.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
- Anchor to shopshoprequired
The shop where the checkout is taking place.
Docs_Standard_ShopApi
- shop
The shop where the checkout is taking place.
Shop
export interface Docs_Standard_ShopApi extends Pick<StandardApi, 'shop'> {}
Shop
- id
The shop ID.
string
- myshopifyDomain
The shop's myshopify.com domain.
string
- name
The name of the shop.
string
- storefrontUrl
The primary storefront URL. > Caution: > As of version `2024-04` this value will no longer have a trailing slash.
string
export interface Shop {
/**
* The shop ID.
* @example 'gid://shopify/Shop/123'
*/
id: string;
/**
* The name of the shop.
*/
name: string;
/**
* The primary storefront URL.
*
* > Caution:
* > As of version `2024-04` this value will no longer have a trailing slash.
*/
storefrontUrl?: string;
/**
* The shop's myshopify.com domain.
*/
myshopifyDomain: string;
}
Anchor to useShopuse Shop()
Returns the shop
where the checkout is taking place.
Anchor to useShop-returnsReturns
- idstring
The shop ID.
- myshopifyDomainstring
The shop's myshopify.com domain.
- namestring
The name of the shop.
- storefrontUrlstring
The primary storefront URL.
Caution> As of version
2024-04
this value will no longer have a trailing slash.
Shop
UseShopGeneratedType
Returns the `Shop` where the checkout is taking place.
Shop
export function useShop<
Target extends RenderExtensionTarget = RenderExtensionTarget,
>(): Shop {
return useApi<Target>().shop;
}
Shop
- id
The shop ID.
string
- myshopifyDomain
The shop's myshopify.com domain.
string
- name
The name of the shop.
string
- storefrontUrl
The primary storefront URL. > Caution: > As of version `2024-04` this value will no longer have a trailing slash.
string
export interface Shop {
/**
* The shop ID.
* @example 'gid://shopify/Shop/123'
*/
id: string;
/**
* The name of the shop.
*/
name: string;
/**
* The primary storefront URL.
*
* > Caution:
* > As of version `2024-04` this value will no longer have a trailing slash.
*/
storefrontUrl?: string;
/**
* The shop's myshopify.com domain.
*/
myshopifyDomain: string;
}