Customer
Requires 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
- Anchor to acceptsMarketingaccepts•Boolean!non-null
Marketing Indicates whether the customer has consented to be sent marketing material via email.
- Anchor to addressesaddresses•Mailing
Address Connection!non-null A list of addresses for the customer.
- Anchor to createdAtcreated•Date
At Time!non-null The date and time when the customer was created.
- Anchor to defaultAddressdefault•Mailing
Address Address The customer’s default address.
- Anchor to displayNamedisplay•String!non-null
Name The customer’s name, email or phone number.
- Anchor to emailemail•String
The customer’s email address.
- Anchor to firstNamefirst•String
Name The customer’s first name.
- •ID!non-null
A unique ID for the customer.
- Anchor to lastNamelast•String
Name The customer’s last name.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•[Metafield]!non-null
A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to numberOfOrdersnumber•Unsigned
Of Orders Int64!non-null The number of orders that the customer has made at the store in their lifetime.
- Anchor to ordersorders•Order
Connection!non-null The orders associated with the customer.
- Anchor to phonephone•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.
- Anchor to updatedAtupdated•Date
At Time!non-null The date and time when the customer information was updated.
Anchor to QueriesQueries
- •query
The customer associated with the given access token. Tokens are obtained by using the
mutation.
Anchor to MutationsMutations
- •mutation
Activates a customer.
- •ID!required
Specifies the customer to activate.
- Anchor to inputinput•Customer
Activate Input!required The fields used to activate a customer.
Arguments
- Anchor to customercustomer•Customer
The customer object.
- Anchor to customerAccessTokencustomer•Customer
Access Token Access Token A newly created customer access token object for the customer.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •mutation
Activates a customer with the activation url received from
.
- Anchor to activationUrlactivation•URL!required
Url The customer activation URL.
- Anchor to passwordpassword•String!required
A new password set during activation.
Arguments
- Anchor to customercustomer•Customer
The customer that was activated.
- Anchor to customerAccessTokencustomer•Customer
Access Token Access Token A new customer access token for the customer.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a new customer.
- Anchor to inputinput•Customer
Create Input!required The fields used to create a new customer.
Arguments
- Anchor to customercustomer•Customer
The created customer object.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •mutation
Updates the default address of an existing customer.
- Anchor to addressIdaddress•ID!required
Id ID of the address to set as the new default for the customer.
- Anchor to customerAccessTokencustomer•String!required
Access Token The access token used to identify the customer.
Arguments
- Anchor to customercustomer•Customer
The updated customer object.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •mutation
"Resets a customer’s password with the token received from a reset password email. You can send a reset password email with the
mutation."
- •ID!required
Specifies the customer to reset.
- Anchor to inputinput•Customer
Reset Input!required The fields used to reset a customer’s password.
Arguments
- Anchor to customercustomer•Customer
The customer object which was reset.
- Anchor to customerAccessTokencustomer•Customer
Access Token Access Token A newly created customer access token object for the customer.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •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
mutation."
- Anchor to passwordpassword•String!required
New password that will be set as part of the reset password process.
- Anchor to resetUrlreset•URL!required
Url The customer's reset password url.
Arguments
- Anchor to customercustomer•Customer
The customer object which was reset.
- Anchor to customerAccessTokencustomer•Customer
Access Token Access Token A newly created customer access token object for the customer.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •mutation
Updates an existing customer.
- Anchor to customercustomer•Customer
Update Input!required The customer object input.
- Anchor to customerAccessTokencustomer•String!required
Access Token The access token used to identify the customer.
Arguments
- Anchor to customercustomer•Customer
The updated customer object.
- Anchor to customerAccessTokencustomer•Customer
Access Token Access Token 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.
- Anchor to customerUserErrorscustomer•[Customer
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields