Skip to main content

Customer API
APIs

The customer API provides an extension with data about the current customer.

Supporting targets

number
required

The unique identifier for the customer

Was this section helpful?

Examples of using the Customer API.

Was this section helpful?

Retrieve the ID of the customer.

jsx

import {render} from 'preact';

export default async () => {
render(<Extension />, document.body);
};

const Extension = () => {
return (
<s-navigator initial-screen-name="CustomerApi">
<s-screen name="CustomerApi" title="Customer Api">
<s-scroll-box>
<s-text>Customer ID: {shopify.customer.id}</s-text>
</s-scroll-box>
</s-screen>
</s-navigator>
);
};