OrderAPI
The API for interacting with the order, available on the Order Status Page.
Anchor to orderstatusapiOrderStatusApi
The API object provided to customer-account.order-status
extension targets.
- Anchor to orderorderStatefulRemoteSubscribable< | undefined>required
Order information that's available post-checkout.
Docs_OrderStatus_OrderApi
- order
Order information that's available post-checkout.
StatefulRemoteSubscribable<Order | undefined>
export interface Docs_OrderStatus_OrderApi
extends Pick<OrderStatusApi, 'order'> {}
Order
Information about an order that was placed.
- id
A globally-unique identifier.
string
- name
Unique identifier for the order that appears on the order.
string
- cancelledAt
If cancelled, the time at which the order was cancelled.
string
export interface Order {
/**
* A globally-unique identifier.
* @example 'gid://shopify/Order/1'
*/
id: string;
/**
* Unique identifier for the order that appears on the order.
* @example '#1000'
*/
name: string;
/**
* If cancelled, the time at which the order was cancelled.
*/
cancelledAt?: string;
}
Anchor to useOrderuse Order()
Returns the order information that's available on the Order Status Page.
Anchor to useOrder-returnsReturns
UseOrderGeneratedType
Returns the order information that's available post-checkout.
Order | undefined
export function useOrder<
Target extends RenderExtensionTarget = RenderExtensionTarget,
>(): Order | undefined {
const api = useApi<Target>();
if ('order' in api) {
return useSubscription(api.order);
}
throw new ExtensionHasNoMethodError('order', api.extension.target);
}
Order
Information about an order that was placed.
- id
A globally-unique identifier.
string
- name
Unique identifier for the order that appears on the order.
string
- cancelledAt
If cancelled, the time at which the order was cancelled.
string
export interface Order {
/**
* A globally-unique identifier.
* @example 'gid://shopify/Order/1'
*/
id: string;
/**
* Unique identifier for the order that appears on the order.
* @example '#1000'
*/
name: string;
/**
* If cancelled, the time at which the order was cancelled.
*/
cancelledAt?: string;
}