ShopAPI
The API for interacting with shop.
Anchor to orderstatusapiOrderStatusApi
The API object provided to this and other customer-account.order-status
extension targets.
- Anchor to shopshoprequired
Shop where the purchase took place.
Docs_OrderStatus_ShopApi
- shop
Shop where the purchase took place.
Shop
export interface Docs_OrderStatus_ShopApi
extends Pick<OrderStatusApi<any>, '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-10` 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-10` 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.
CautionAs of version
2024-10
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 RenderOrderStatusExtensionTarget = RenderOrderStatusExtensionTarget,
>(): Shop {
const api = useApi<Target>();
const extensionTarget = api.extension.target;
if (!('shop' in api)) {
throw new ExtensionHasNoFieldError('shop', extensionTarget);
}
return api.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-10` 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-10` this value will no longer have a trailing slash.
*/
storefrontUrl?: string;
/**
* The shop's myshopify.com domain.
*/
myshopifyDomain: string;
}