Skip to main content
object

Requires read_customers access scope.

Represents information about a customer of the shop, such as the customer's contact details, their order history, and whether they've agreed to receive marketing material by email.

Caution: Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.

Anchor to Fields and connectionsFields and connections

•

A list of addresses associated with the customer.

•

The addresses associated with the customer.

•
MoneyV2!non-null

The total amount that the customer has spent on orders in their lifetime.

•
Boolean!non-null

Whether the merchant can delete the customer from their store.

A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an order, they can't be deleted from a store.

Anchor to companyContactProfilescompanyContactProfiles
•

A list of the customer's company contact profiles.

•
DateTime!non-null

The date and time when the customer was added to the store.

•
Boolean!non-null

Whether the customer has opted out of having their data sold.

•

The default address associated with the customer.

•

The customer's default email address.

•

The customer's default phone number.

•
String!non-null

The full name of the customer, based on the values for first_name and last_name. If the first_name and last_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number.

•

A list of events associated with the customer.

•

The customer's first name.

•
ID!non-null

A globally-unique ID.

•
Image!non-null

The image associated with the customer.

•

The customer's last name.

•

The customer's last order.

•

The ID of the corresponding resource in the REST Admin API.

•
String!non-null

The amount of time since the customer was first added to the store.

Example: 'about 12 years'.

•
String!non-null

The customer's locale.

•

Whether the customer can be merged with another customer.

•

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

•

A list of custom fields that a merchant associates with a Shopify resource.

Anchor to metafieldsByIdentifiersmetafieldsByIdentifiers
•
[Metafield]!non-null

The metafields associated with the resource matching the supplied list of namespaces and keys.

•

A unique identifier for the customer that's used with Multipass login.

•

A note about the customer.

•

The number of orders that the customer has made at the store in their lifetime.

•

A list of the customer's orders.

•

A list of the customer's payment methods.

Anchor to productSubscriberStatusproductSubscriberStatus
•

Possible subscriber states of a customer defined by their subscription contracts.

•

The state of the customer's account with the shop.

Please note that this only meaningful when Classic Customer Accounts is active.

•

The statistics for a given customer.

•

Returns a list of store credit accounts that belong to the owner resource. A store credit account owner can hold multiple accounts each with a different currency.

Anchor to subscriptionContractssubscriptionContracts
•

A list of the customer's subscription contracts.

•
[String!]!non-null

A comma separated list of tags that have been added to the customer.

•
Boolean!non-null

Whether the customer is exempt from being charged taxes on their orders.

•

The list of tax exemptions applied to the customer.

•
DateTime!non-null

The date and time when the customer was last updated.

•
Boolean!non-null

Whether the customer has verified their email address. Defaults to true if the customer is created through the Shopify admin or API.

Deprecated fields and connections

•
String

The customer's email address.

Anchor to emailMarketingConsentemailMarketingConsent
•

The current email marketing state for the customer. If the customer doesn't have an email address, then this property is null.

•
Boolean!non-null

Whether the merchant has added timeline comments about the customer on the customer's page.

•
Market

The market that includes the customer’s default address.

Anchor to metafieldDefinitionsmetafieldDefinitions
•

List of metafield definitions.

•
String

The customer's phone number.

•

The current SMS marketing state for the customer's phone number.

If the customer does not have a phone number, then this property is null.

•
URL!non-null

The URL to unsubscribe the customer from the mailing list.

•
Boolean!non-null

Whether the email address is formatted correctly.

Returns true when the email is formatted correctly and belongs to an existing domain. This doesn't guarantee that the email address actually exists.


Was this section helpful?

•
query

Returns a Customer resource by ID.

•
query

Return a customer by an identifier.

•
query

Returns a list of customers in your Shopify store, including key information such as name, email, location, and purchase history. Use this query to segment your audience, personalize marketing campaigns, or analyze customer behavior by applying filters based on location, order history, marketing preferences and tags. The customers query supports pagination and sorting.


Was this section helpful?

•
mutation

Add tax exemptions for the customer.

Arguments

•
ID!required

The ID of the customer to update.

•

The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values: ["CA_BC_RESELLER_EXEMPTION", "CA_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Create a new customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

Arguments

•

The input fields to create a customer.


Fields

•

The created customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Update a customer's email marketing information information.

Arguments

•

Specifies the input fields to update a customer's email marketing consent information.


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Sends a link to the customer so they can update a specific payment method.

Arguments

Anchor to customerPaymentMethodIdcustomerPaymentMethodId
•
ID!required

The payment method to be updated.

•

Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input.


Fields

•

The customer to whom an update payment method email was sent.

•

The list of errors that occurred from executing the mutation.

•
mutation

Remove tax exemptions from a customer.

Arguments

•
ID!required

The ID of the customer to update.

•

The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values: ["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Replace tax exemptions for a customer.

Arguments

•
ID!required

The ID of the customer to update.

•

The list of tax exemptions that will replace the current exemptions for a customer. Can be an array or a comma-separated list. Example values: ["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Sends the customer an account invite email.

Arguments

•
ID!required

The ID of the customer to whom an account invite email is to be sent.

•

Specifies the account invite email fields.


Fields

•

The customer to whom an account invite email was sent.

•

The list of errors that occurred from executing the mutation.

•
mutation

Creates or updates a customer in a single mutation.

Use this mutation when syncing information from an external data source into Shopify.

This mutation can be used to create a new customer, update an existing customer by id, or upsert a customer by a unique key (email or phone).

To create a new customer omit the identifier argument. To update an existing customer, include the identifier with the id of the customer to update.

To perform an 'upsert' by unique key (email or phone) use the identifier argument to upsert a customer by a unique key (email or phone). If a customer with the specified unique key exists, it will be updated. If not, a new customer will be created with that unique key.

As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements

Any list field (e.g. addresses, will be updated so that all included entries are either created or updated, and all existing entries not included will be deleted.

All other fields will be updated to the value passed. Omitted fields will not be updated.

Arguments

•

Specifies the identifier that will be used to lookup the resource.

•

The properties of the customer.


Fields

•

The created or updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Update a customer's SMS marketing consent information.

Arguments

•

Specifies the input fields to update a customer's SMS marketing consent information.


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Update a customer's attributes. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

Arguments

•

Provides updated fields for the customer. To set marketing consent, use the customerEmailMarketingConsentUpdate or customerSmsMarketingConsentUpdate mutations instead.


Fields

•

The updated customer.

•

The list of errors that occurred from executing the mutation.

•
mutation

Updates a customer's default address.

Arguments

•
ID!required

The ID of the customer's new default address.

•
ID!required

The ID of the customer whose default address is being updated.


Fields

•

The customer whose address was updated.

•

The list of errors that occurred from executing the mutation.


Was this section helpful?

OSZAR »