# customer-account.page.render

This [full-page extension](https://shopify.dev/docs/api/customer-account-ui-extensions/unstable/extension-targets-overview#full-page-extension-full-page-extension) allows you to create a new page in customer accounts. It renders in the main content area—below the header, and above the footer.


If the page you're building is tied to a specific order, use [customer-account.order.page.render](https://shopify.dev/docs/api/customer-account-ui-extensions/targets/full-page/customer-account-order-page-render) instead.

For example:
- A Return Request page that requires the context of a specific order should use `customer-account.order.page.render`
- A Wishlist page that does **not** require the context of a specific order should use `customer-account.page.render`

A full-page extension target cannot coexist with any other targets in the same extension.


```jsx
import {
  reactExtension,
  Text,
  BlockStack,
  ResourceItem,
  Image,
  Heading,
  Page,
  Grid,
  GridItem,
} from '@shopify/ui-extensions-react/customer-account';
import React from 'react';
import { useEffect, useState } from 'react';

export default reactExtension(
  'customer-account.page.render',
  () => <Wishlists />,
);

interface Wishlist {
  id: string;
  items: {
    productId: string;
    productLink: string;
    productImage: string;
    label: string;
  }[];
}

function Wishlists() {
  const [wishlists, setWishlists] = useState<
    Wishlist[]
  >();

  const [loading, setLoading] = useState(true);

  useEffect(() => {
    async function fetchWishlists() {
      setLoading(true);
      const response = await fetch(
        `https://your-backend.com/api/wishlists`,
      );
      const wishlists = await response.json();
      setLoading(false);
      setWishlists(wishlists);
    }

    void fetchWishlists();
  }, []);

  if (loading) {
    return <Text>Loading...</Text>;
  }

  if (!wishlists) {
    return <NotFound />;
  }

  return (
    <Page title='Wishlists'>
      <Grid columns={250} rows="auto" spacing="base" blockAlignment="center">
        {wishlists.map((item) => {
          return (
            <GridItem columnSpan={1}>
              <ResourceItem
                to={`/wishlist/${item.id}`}
                key={item.id}
              >
                <BlockStack>
                  <Image
                    source={
                      item.items[0].productImage
                    }
                  />
                  <Text>{item.items[0].label}</Text>
                </BlockStack>
              </ResourceItem>
            </GridItem>
          );
        })}
      </Grid>
    </Page>
  );
}

function NotFound() {
  return (
    <BlockStack>
      <Heading>Resource Not found</Heading>
    </BlockStack>
  );
}

```

```js
import {BlockStack, ResourceItem, extension, Image, Page, Card, Grid, GridItem} from '@shopify/ui-extensions/customer-account';

export default extension(
  'customer-account.page.render',
  async (root) => {
    const response = await fetch(
      `https://your-backend.com/api/wishlists`,
    );
    const wishlists = await response.json();

    const app = root.createComponent(
      Grid,
      {
          columns: 250,
          rows: 'auto',
          spacing: 'base',
          blockAlignment: 'center'
      }
    );

    wishlists.forEach((wishlist) => {
      const gridItem = root.createComponent(GridItem, {
          columnSpan: 1,
      });
      const wishlistItem = root.createComponent(ResourceItem, {
        to: `/wishlist/${wishlist.id}`,
      })

      const image = root.createComponent(Image, {
        source: wishlist.items[0].productImage
      })

      const text = root.createText(wishlist.items[0].label)

      const contentWrapper = root.createComponent(BlockStack)

      contentWrapper.append(image);
      contentWrapper.append(text);
      wishlistItem.append(contentWrapper);

      gridItem.append(wishlistItem);
      app.append(gridItem);
    })

    const page = root.createComponent(Page, {
      title: 'Wishlists',
    })

    page.append(app);
    root.append(page);
  },
);

```

## FullPageApi

The api for full-page extension targets

### Docs_FullPageApi

### navigation

value: `FullExtensionNavigation`


### FullExtensionNavigation

### addEventListener

value: `(type: "currententrychange", cb: (event: NavigationCurrentEntryChangeEvent) => void) => void`


### currentEntry

value: `NavigationHistoryEntry`

The currentEntry read-only property of the Navigation interface returns a NavigationHistoryEntry object representing the location the user is currently navigated to right now.

### navigate

value: `NavigateFunction`

The navigate() method navigates to a specific URL, updating any provided state in the history entries list.

### removeEventListener

value: `(type: "currententrychange", cb: (event: NavigationCurrentEntryChangeEvent) => void) => void`


### updateCurrentEntry

value: `(options: { state: Record<string, any>; }) => void`

The updateCurrentEntry() method of the Navigation interface updates the state of the currentEntry; used in cases where the state change will be independent of a navigation or reload.

### NavigationCurrentEntryChangeEvent

The NavigationCurrentEntryChangeEvent interface of the Navigation API is the event object for the currententrychange event, which fires when the Navigation.currentEntry has changed.

### from

value: `NavigationHistoryEntry`

Returns the NavigationHistoryEntry that was navigated from.

### navigationType

value: `NavigationType`

Returns the type of the navigation that resulted in the change.

### NavigationHistoryEntry

The NavigationHistoryEntry interface of the Navigation API represents a single navigation history entry.

### getState

value: `() => Record<string, any>`

Returns a clone of the available state associated with this history entry.

### key

value: `string`

Returns the key of the history entry. This is a unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself.

### url

value: `string`

Returns the URL of this history entry.

## StandardApi

The base API object provided to this and other `customer-account` extension targets.

### Docs_StandardApi

### applyTrackingConsentChange

value: `ApplyTrackingConsentChangeType`

Allows setting and updating customer privacy consent settings and tracking consent metafields.

> Note: Requires the [`customer_privacy` capability](https://shopify.dev/docs/api/checkout-ui-extensions/unstable/configuration#collect-buyer-consent) to be set to `true`.

{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### authenticatedAccount

value: `AuthenticatedAccount`

Information about the authenticated account.

### customerPrivacy

value: `StatefulRemoteSubscribable<CustomerPrivacy>`

Customer privacy consent settings and a flag denoting if consent has previously been collected.

### extension

value: `Extension`

Meta information about the extension.

### extensionPoint

value: `Target`

The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file.

### i18n

value: `I18n`

Utilities for translating content and formatting values according to the current `localization` of the user.

### localization

value: `Localization`

Details about the language of the buyer.

### navigation

value: `StandardExtensionNavigation`


### query

value: `<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: StorefrontApiVersion; }) => Promise<{ data?: Data; errors?: GraphQLError[]; }>`

Used to query the Storefront GraphQL API with a prefetched token.

See [storefront api access examples](https://shopify.dev/docs/api/customer-account-ui-extensions/apis/storefront-api#examples) for more information.

### sessionToken

value: `SessionToken`

Provides access to session tokens, which can be used to verify token claims on your app's server.

See [session token examples](https://shopify.dev/docs/api/customer-account-ui-extensions/apis/session-token#examples) for more information.

### settings

value: `StatefulRemoteSubscribable<ExtensionSettings>`

The settings matching the settings definition written in the [`shopify.ui.extension.toml`](https://shopify.dev/docs/api/customer-account-ui-extensions/configuration) file.

 See [settings examples](https://shopify.dev/docs/api/customer-account-ui-extensions/apis/order-status-api/settings#examples) for more information.

> Note: When an extension is being installed in the editor, the settings will be empty until a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.

### storage

value: `Storage`

Key-value storage for the extension target.

### ui

value: `Ui`

Methods to interact with the extension's UI.

### version

value: `Version`

The renderer version being used for the extension.

### ApplyTrackingConsentChangeType

#### Returns: Promise<TrackingConsentChangeResult>

#### Params:

- visitorConsent: VisitorConsentChange
export type ApplyTrackingConsentChangeType = (
  visitorConsent: VisitorConsentChange,
) => Promise<TrackingConsentChangeResult>;


### VisitorConsentChange

### analytics

value: `boolean`

Visitor consents to recording data to understand how customers interact with the site.

### marketing

value: `boolean`

Visitor consents to ads and marketing communications based on customer interests.

### metafields

value: `TrackingConsentMetafieldChange[]`

Tracking consent metafield data to be saved.

If the value is `null`, the metafield will be deleted.

### preferences

value: `boolean`

Visitor consent to remembering customer preferences, such as country or language, to personalize visits to the website.

### saleOfData

value: `boolean`

Opts the visitor out of data sharing / sales.

### type

value: `"changeVisitorConsent"`


### TrackingConsentMetafieldChange

### key

value: `string`

The name of the metafield. It must be between 3 and 30 characters in length (inclusive).

### value

value: `string | null`

The information to be stored as metadata. If the value is `null`, the metafield will be deleted.

### VisitorConsent

### analytics

value: `boolean`

Visitor consents to recording data to understand how customers interact with the site.

### marketing

value: `boolean`

Visitor consents to ads and marketing communications based on customer interests.

### preferences

value: `boolean`

Visitor consent to remembering customer preferences, such as country or language, to personalize visits to the website.

### saleOfData

value: `boolean`

Opts the visitor out of data sharing / sales.

### TrackingConsentChangeResultSuccess

The returned result of a successful tracking consent preference update.

### type

value: `"success"`

The type of the `TrackingConsentChangeResultSuccess` API.

### TrackingConsentChangeResultError

The returned result of an unsuccessful tracking consent preference update with a message detailing the type of error that occurred.

### message

value: `string`

A message that explains the error. This message is useful for debugging. It is **not** localized, and therefore should not be presented directly to the buyer.

### type

value: `"error"`

The type of the `TrackingConsentChangeResultError` API.

### AuthenticatedAccount

### customer

value: `StatefulRemoteSubscribable<Customer | undefined>`

Provides the customer information of the authenticated customer.

### purchasingCompany

value: `StatefulRemoteSubscribable<PurchasingCompany | undefined>`

Provides the company info of the authenticated business customer. If the customer is not authenticated or is not a business customer, this value is `undefined`.

### Customer

Information about the authenticated customer.

{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### id

value: `string`

Customer ID.

### PurchasingCompany

### company

value: `Company`

Include information of the company of the logged in business customer.

### Company

### id

value: `string`

Company ID.

### CustomerPrivacy

### allowedProcessing

value: `AllowedProcessing`

An object containing flags for each consent property denoting whether they can be processed based on visitor consent, merchant configuration, and user location.

### metafields

value: `TrackingConsentMetafield[]`

Stored tracking consent metafield data.

### region

value: `CustomerPrivacyRegion`

Details about the visitor's current location for use in evaluating if more granular consent controls should render.

### saleOfDataRegion

value: `boolean`

Whether the visitor is in a region requiring data sale opt-outs.

### shouldShowBanner

value: `boolean`

Whether a consent banner should be displayed by default when the page loads. Use this as the initial open/expanded state of the consent banner.

This is determined by the visitor's current privacy consent, the shop's [region visibility configuration](https://help.shopify.com/en/manual/privacy-and-security/privacy/customer-privacy-settings/privacy-settings#add-a-cookie-banner) settings, and the region in which the visitor is located.

### visitorConsent

value: `VisitorConsent`

An object containing the customer's current privacy consent settings. *

### AllowedProcessing

### analytics

value: `boolean`

Can collect customer analytics about how the shop was used and interactions made on the shop.

### marketing

value: `boolean`

Can collect customer preference for marketing, attribution and targeted advertising from the merchant.

### preferences

value: `boolean`

Can collect customer preferences such as language, currency, size, and more.

### saleOfData

value: `boolean`

Can collect customer preference for sharing data with third parties, usually for behavioral advertising.

### TrackingConsentMetafield

### key

value: `string`

The name of the metafield. It must be between 3 and 30 characters in length (inclusive).

### value

value: `string`

The information to be stored as metadata.

### CustomerPrivacyRegion

### countryCode

value: `CountryCode`

The [ISO 3166 Alpha-2 format](https://www.iso.org/iso-3166-country-codes.html) for the buyer's country.

{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### provinceCode

value: `string`

The buyer's province code, such as state, province, prefecture, or region.

Province codes can be found by clicking on the `Subdivisions assigned codes` column for countries listed [here](https://en.wikipedia.org/wiki/ISO_3166-2).

{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### Extension

Meta information about an extension target.

### apiVersion

value: `ApiVersion`

The API version that was set in the extension config file.

### capabilities

value: `StatefulRemoteSubscribable<Capability[]>`

The allowed capabilities of the extension, defined in your [shopify.ui.extension.toml](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file.

* [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API.

* [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls.

* [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.

### editor

value: `Editor`

Information about the editor where the extension is being rendered.

The value is undefined if the extension is not rendering in an editor.

### rendered

value: `StatefulRemoteSubscribable<boolean>`

Whether your extension is currently rendered to the screen.

Shopify might render your extension before it's visible in the UI, typically to pre-render extensions that will appear on a later step of the checkout.

Your extension might also continue to run after the buyer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the buyer navigates back.

### scriptUrl

value: `string`

The URL to the script that started the extension target.

### target

value: `Target`

The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file.

### version

value: `string`

The published version of the running extension target.

For unpublished extensions, the value is `undefined`.

### Editor

### type

value: `"checkout"`

Indicates whether the extension is rendering in the checkout editor.

### I18n

### formatCurrency

value: `(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string`

Returns a localized currency value.

This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. It uses the buyer's locale by default.

### formatDate

value: `(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string`

Returns a localized date value.

This function behaves like the standard `Intl.DateTimeFormatOptions()` and uses the buyer's locale by default. Formatting options can be passed in as options.

### formatNumber

value: `(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string`

Returns a localized number.

This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. It uses the buyer's locale by default.

### translate

value: `I18nTranslate`

Returns translated content in the buyer's locale, as supported by the extension.

- `options.count` is a special numeric value used in pluralization.
- The other option keys and values are treated as replacements for interpolation.
- If the replacements are all primitives, then `translate()` returns a single string.
- If replacements contain UI components, then `translate()` returns an array of elements.

### Localization

### extensionLanguage

value: `StatefulRemoteSubscribable<Language>`

This is the buyer's language, as supported by the extension. If the buyer's actual language is not supported by the extension, this is the fallback locale used for translations.

For example, if the buyer's language is 'fr-CA' but your extension only supports translations for 'fr', then the `isoCode` for this language is 'fr'. If your extension does not provide french translations at all, this value is the default locale for your extension (that is, the one matching your .default.json file).

### language

value: `StatefulRemoteSubscribable<Language>`

The language the buyer sees in the customer account hub.

### Language

### isoCode

value: `string`

The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code.

### StandardExtensionNavigation

### navigate

value: `NavigateFunction`

The navigate() method navigates to a specific URL, updating any provided state in the history entries list.

### GraphQLError

GraphQL error returned by the Shopify Storefront APIs.

### extensions

value: `{ requestId: string; code: string; }`


### message

value: `string`


### SessionToken

### get

value: `() => Promise<string>`

Requests a session token that hasn't expired. You should call this method every time you need to make a request to your backend in order to get a valid token. This method will return cached tokens when possible, so you don’t need to worry about storing these tokens yourself.

### ExtensionSettings

The merchant-defined setting values for the extension.

### [key: string]

value: `string | number | boolean | undefined`


### Storage

A key-value storage object for extension targets.

Stored data is only available to this specific app but can be shared across multiple extension targets.

The storage backend is implemented with `localStorage` and should persist for ... days However, data persistence isn't guaranteed.

### delete

value: `(key: string) => Promise<void>`

Delete stored data by key.

### read

value: `<T = unknown>(key: string) => Promise<T>`

Read and return a stored value by key.

The stored data is deserialized from JSON and returned as its original primitive.

Returns `null` if no stored data exists.

### write

value: `(key: string, data: any) => Promise<void>`

Write stored data for this key.

The data must be serializable to JSON.

### Ui

### forceDataRefresh

value: `(content: string) => Promise<void>`

Refresh data so the surrounding information on the page is updated. The `content` string will appear in a toast message after refresh, to confirm the action was successful.

To request access to this API:

1. Go to your partner dashboard and click **Apps**.
2. Select the app you need to request access for.
3. Click **API access**.
4. Under **Access force data refresh**, click **Request access**.

### overlay

value: `{ close(overlayId: string): void; }`

An overlay is a contextual element on top of the main interface that provides additional information or functionality.

### toast

value: `{ show(content: string): void; }`

The Toast API displays a non-disruptive message that displays at the bottom of the interface to provide quick, at-a-glance feedback on the outcome of an action.

How to use:

- Use toasts to confirm successful actions.

- Aim for two words.

- Use noun + past tense verb format. For example, \`Changes saved\`.

For errors, or information that needs to persist on the page, use a [banner](https://shopify.dev/docs/api/checkout-ui-extensions/unstable/components/feedback/banner) component.