Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Customer Account API

The Customer Account API lets your extension query the Customer Account GraphQL API using the global fetch(). Use it to fetch customer data like order history, addresses, and profile information from the Order status page.

Unlike other target APIs that expose typed properties on the shopify global object, this API provides direct access to the full GraphQL schema through fetch('shopify://customer-account/api/2025-07/graphql.json'). Authentication is handled automatically, so you don't need a session token.

  • Fetch order history: Query the customer's past orders to display a purchase history or recommend related products.
  • Access customer profile: Retrieve the customer's name, email, and saved addresses for a personalized experience.
  • Write customer data: Update customer records, create metafields, or modify order information directly through GraphQL mutations.
Support
Targets (25)

  • Use the shopify:// protocol: Always use shopify://customer-account/api/ as the base URL for Customer Account API requests. Don't use absolute URLs.
  • Handle GraphQL errors: The API returns errors in the errors array of the response. Always check for errors before using the data field.

  • The Customer Account API is a GraphQL API accessed using fetch(). It doesn't expose typed properties like other Account APIs.
  • The data available depends on the buyer's authentication state and the app's access scopes.

Was this page helpful?