Skip to main content

Target APIs

When you build a customer account UI extension, Shopify automatically provides you with specific APIs based on where your extension runs within customer accounts. This ensures extensions receive exactly the data and functionality they need for their particular use case, while maintaining security and performance.

Your target determines which APIs you receive because different locations in customer accounts require different capabilities.

Account APIs provide access to customer identity, authentication, and account-level data for extensions running in customer accounts. These APIs let you personalize experiences based on who the customer is, manage privacy consent, and query the full Customer Account API for orders, profiles, and more.

NameDescription
Authenticated Account API

Access information about the authenticated customer, including customer details and B2B purchasing company data.

Authentication State API

Determine the customer's current authentication state to conditionally render content based on sign-in status.

Checkout Settings API

Access checkout configuration settings that affect the customer account experience.

Customer Account API

Query the Customer Account API using fetch() to read and write customer data, orders, metafields, and more.

Customer Privacy API

Manage customer privacy consent, including marketing and analytics opt-in preferences.

Require Login API

Control authentication requirements for order status page extensions.

Order APIs provide access to order-specific data for extensions that render on order status pages. These APIs let you display order details, pricing breakdowns, and fulfillment information that customers need when checking their order status.

NameDescription
Addresses API

Access shipping and billing address information associated with an order.

Attributes API

Read custom key-value attributes attached to an order.

Buyer Identity API

Retrieve the buyer's identity information, including customer and purchasing company context.

Cart Lines API

Access line item data, including product details, quantities, and pricing for items in an order.

Cost API

Retrieve order cost breakdowns, including subtotals, taxes, shipping, and total amounts.

Discounts API

Access discount information applied to an order, including discount codes and automatic discounts.

Gift Cards API

Retrieve gift card payment information applied to an order.

Metafields API

Read metafield data attached to orders for use in order status page extensions.

Note API

Access the note attached to an order at checkout.

Order API

Retrieve order details, including order name, ID, and status information on the Order status page.

Order Status Localization API

Localize order status page extensions with currency, language, country, market, and timezone data.

Shop API

Access shop information like the store name, domain, and other store-level details.

Platform APIs provide cross-cutting functionality available to all customer account UI extensions regardless of their target. These APIs let you localize content, track analytics, navigate between pages, authenticate requests to your backend, and query the Storefront API.

NameDescription
Analytics API

Emit analytics events to web pixels for tracking customer interactions.

Extension API

Access extension metadata, including the extension's handle, capabilities, and editor settings.

Intents API

Invoke existing customer account workflows for managing customer information, such as editing addresses or payment methods.

Localization API

Localize your extension with translation utilities, currency formatting, and customer language and country context.

Navigation API

Navigate between customer account pages and extensions using custom protocols and URLs.

Session Token API

Retrieve session tokens for authenticating requests to your app's backend server.

Settings API

Access merchant-configured settings defined in your extension's configuration file.

Storage API

Persist key-value data locally within the customer's browser for your extension.

Storefront API

Query the Storefront API for product, collection, and metaobject data.

Toast API

Display brief, non-disruptive confirmation messages to customers after completing an action.

Version API

Check the current API version your extension is running against.


Was this page helpful?