App
The App API provides information about the app and the status of its extensions.
At this time, the App API only supports returning the activations on checkout and customer account UI extensions.
Anchor to extensions methodExtensions method
The app.extensions()
method asynchronously retrieves detailed information about the app's checkout and customer account extensions, including which targets they are activated on.
It returns a Promise that resolves to an array of objects. Each object contains the extension's handle and its activation targets. The array may be empty if the app has no extensions.
- Anchor to activationsactivations[]required
List of activation records for the extension. Contains information about where the extension is currently activated.
- Anchor to handlehandlestringrequired
The unique identifier for the extension.
ExtensionInfo
Contains the status information for the app's extension. This includes the extension's handle, and activation targets.
- activations
List of activation records for the extension. Contains information about where the extension is currently activated.
ExtensionActivation[]
- handle
The unique identifier for the extension.
string
export interface ExtensionInfo {
/**
* The unique identifier for the extension.
*/
handle: string;
/**
* List of activation records for the extension.
* Contains information about where the extension is currently activated.
*/
activations: ExtensionActivation[];
}
ExtensionActivation
Represents an activation record for an extension. Contains information about where an extension is activated.
- target
The target identifier for the extension activation.
string
export interface ExtensionActivation {
/**
* The target identifier for the extension activation.
*/
target: string;
}
Get Extensions Status
examples
Get Extensions Status
const extensions = await shopify.app.extensions();