Skip to main content
object

Requires unauthenticated_read_customers access scope.

A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout.

Anchor to Fields and connectionsFields and connections

•Boolean!non-null

Indicates whether the customer has consented to be sent marketing material via email.

•MailingAddressConnection!non-null

A list of addresses for the customer.

•DateTime!non-null

The date and time when the customer was created.

•MailingAddress

The customer’s default address.

•String!non-null

The customer’s name, email or phone number.

•String

The customer’s email address.

•String

The customer’s first name.

•ID!non-null

A unique ID for the customer.

•String

The customer’s last name.

•Metafield

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

•[Metafield]!non-null

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

•UnsignedInt64!non-null

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

•OrderConnection!non-null

The orders associated with the customer.

•String

The customer’s phone number.

•[String!]!non-null

A comma separated list of tags that have been added to the customer. Additional access scope required: unauthenticated_read_customer_tags.

•DateTime!non-null

The date and time when the customer information was updated.


Was this section helpful?

•query

The customer associated with the given access token. Tokens are obtained by using the customerAccessTokenCreate mutation.


Was this section helpful?

•mutation

Activates a customer.

Arguments

•ID!required

Specifies the customer to activate.

•CustomerActivateInput!required

The fields used to activate a customer.


Fields

•Customer

The customer object.

•CustomerAccessToken

A newly created customer access token object for the customer.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

Activates a customer with the activation url received from customerCreate.

Arguments

•URL!required

The customer activation URL.

•String!required

A new password set during activation.


Fields

•Customer

The customer that was activated.

•CustomerAccessToken

A new customer access token for the customer.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a new customer.

Arguments

•CustomerCreateInput!required

The fields used to create a new customer.


Fields

•Customer

The created customer object.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

Updates the default address of an existing customer.

Arguments

•ID!required

ID of the address to set as the new default for the customer.

•String!required

The access token used to identify the customer.


Fields

•Customer

The updated customer object.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

"Resets a customer’s password with the token received from a reset password email. You can send a reset password email with the customerRecover mutation."

Arguments

•ID!required

Specifies the customer to reset.

•CustomerResetInput!required

The fields used to reset a customer’s password.


Fields

•Customer

The customer object which was reset.

•CustomerAccessToken

A newly created customer access token object for the customer.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

"Resets a customer’s password with the reset password URL received from a reset password email. You can send a reset password email with the customerRecover mutation."

Arguments

•String!required

New password that will be set as part of the reset password process.

•URL!required

The customer's reset password url.


Fields

•Customer

The customer object which was reset.

•CustomerAccessToken

A newly created customer access token object for the customer.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

Updates an existing customer.

Arguments

•CustomerUpdateInput!required

The customer object input.

•String!required

The access token used to identify the customer.


Fields

•Customer

The updated customer object.

•CustomerAccessToken

The newly created customer access token. If the customer's password is updated, all previous access tokens (including the one used to perform this mutation) become invalid, and a new token is generated.

•[CustomerUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated

Was this section helpful?


Was this section helpful?