Skip to main content

App

The App API provides information about the app and the status of its extensions.

The API returns information about two types of extensions:

  • UI extensions (ui_extension): Admin, Checkout, Customer Account and Point of Sale extensions
  • Theme app extensions (theme_app_extension): Theme app blocks and embeds

The app.extensions() method asynchronously retrieves detailed information about the app's extensions, including which targets they are activated on.

It returns a Promise that resolves to an array of ExtensionInfo objects. Each object contains:

  • handle: The unique identifier for the extension
  • type: Either 'ui_extension' or 'theme_app_extension'
  • activations: Activation records (shape varies by extension type)

UI Extensions have activations with a target field indicating the admin, checkout, customer account or point of sale target.

Theme App Extensions have activations representing individual blocks/embeds, each with:

  • handle: Block/embed filename
  • name: Display name from block schema
  • target: Location type ('section', 'head', 'body', or 'compliance_head')
  • status: Availability status ('active', 'available', or 'unavailable')
  • activations: Array of theme-specific placements with target and themeId

The array may be empty if the app has no extensions.

Anchor to activations
activations
Type extends "ui_extension" ? [] : Type extends "theme_app_extension" ? [] : never
required

List of activation records for the extension. The shape depends on the extension type:

  • UI extensions have activations with only target
  • Theme app extensions have nested activations representing blocks/embeds
Anchor to handle
handle
string
required

The unique identifier for the extension.

Type
required

The type of the extension.

Examples
const extensions = await shopify.app.extensions();

// Example response:
// [
// // UI extension
// {
// handle: 'checkout-extension-1',
// type: 'ui_extension',
// activations: [
// {target: 'purchase.thank-you.block.render'},
// {target: 'customer-account.order-status.block.render'},
// ],
// },
// // Theme app extension with nested blocks/embeds
// {
// handle: 'my-theme-app-extension',
// type: 'theme_app_extension',
// activations: [
// {
// target: 'section',
// handle: 'product-rating',
// name: 'Product Rating',
// status: 'active',
// activations: [
// {
// target: 'template--product.custom/main/my_app_product_rating_GPzUYy',
// themeId: 'gid://shopify/OnlineStoreTheme/123',
// },
// ],
// },
// {
// target: 'head',
// handle: 'analytics-widget',
// name: 'Analytics Widget',
// status: 'active',
// activations: [
// {target: 'theme', themeId: 'gid://shopify/OnlineStoreTheme/123'},
// ],
// },
// ],
// },
// ];
Was this page helpful?