Customer User Error
Represents an error that happens during execution of a customer mutation.
Anchor to FieldsFields
- code (CustomerErrorCode)
- field ([String!])
- message (String!)
- Anchor to codecode•Customer
Error Code The error code.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- customerAccessTokenCreate (CustomerAccessTokenCreatePayload)
- customerAccessTokenCreateWithMultipass (CustomerAccessTokenCreateWithMultipassPayload)
- customerActivate (CustomerActivatePayload)
- customerActivateByUrl (CustomerActivateByUrlPayload)
- customerAddressCreate (CustomerAddressCreatePayload)
- customerAddressDelete (CustomerAddressDeletePayload)
- customerAddressUpdate (CustomerAddressUpdatePayload)
- customerCreate (CustomerCreatePayload)
- customerDefaultAddressUpdate (CustomerDefaultAddressUpdatePayload)
- customerEmailMarketingSubscribe (CustomerEmailMarketingSubscribePayload)
- customerRecover (CustomerRecoverPayload)
- customerReset (CustomerResetPayload)
- customerResetByUrl (CustomerResetByUrlPayload)
- customerSmsMarketingSubscribe (CustomerSmsMarketingSubscribePayload)
- customerUpdate (CustomerUpdatePayload)
- •mutation
For legacy customer accounts only.
Creates a
using the customer's email and password. The access token is required to read or modify theCustomerobject, such as updating account information or managing addresses.The token has an expiration time. Use
to extend the token before it expires, or create a new token if it's already expired.CautionThis mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
Caution:This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
Caution: This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
- Anchor to inputinput•Customer
Access Token Create Input! required The fields used to create a customer access token.
Arguments
- •mutation
Creates a
using a multipass token instead of email and password. This enables single sign-on for customers who authenticate through an external system.If the customer doesn't exist in Shopify, then a new customer record is created automatically. If the customer exists but the record is disabled, then the customer record is re-enabled.
CautionMultipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
Caution:Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
Caution: Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
- Anchor to multipassTokenmultipass•String!
Token required A valid multipass token to be authenticated.
Arguments
- •mutation
Activates a customer account using an activation token received from the
mutation. The customer sets their password during activation and receives afor authenticated access.For a simpler approach that doesn't require parsing the activation URL, use
instead.CautionThis mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
Caution:This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
Caution: This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
- •ID!required
Specifies the customer to activate.
- Anchor to inputinput•Customer
Activate Input! required The fields used to activate a customer.
Arguments
- •ID!
- •mutation
Activates a customer account using the full activation URL from the
mutation. This approach simplifies activation by accepting the complete URL directly, eliminating the need to parse it for the customer ID and activation token. Returns afor authenticating subsequent requests.CautionStore the returned access token securely. It grants access to the customer's account data.
Caution:Store the returned access token securely. It grants access to the customer's account data.
Caution: Store the returned access token securely. It grants access to the customer's account data.
- Anchor to activationUrlactivation•URL!
Url required The customer activation URL.
- Anchor to passwordpassword•String!required
A new password set during activation.
Arguments
- •mutation
Creates a new
for aCustomer. Use the customer's access token to identify them. Successful creation returns the new address.Each customer can have multiple addresses.
- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
- Anchor to addressaddress•Mailing
Address Input! required The customer mailing address to create.
Arguments
- •mutation
Permanently deletes a specific
for aCustomer. Requires a valid customer access token to authenticate the request.CautionThis action is irreversible. You can't recover the deleted address.
Caution:This action is irreversible. You can't recover the deleted address.
Caution: This action is irreversible. You can't recover the deleted address.
- •ID!required
Specifies the address to delete.
- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
Arguments
- •ID!
- •mutation
Updates an existing
for aCustomer. Requires a customer access token to identify the customer, an ID to specify which address to modify, and anaddresswith the updated fields.- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
- •ID!required
Specifies the customer address to update.
- Anchor to addressaddress•Mailing
Address Input! required The customer’s mailing address.
Arguments
- •mutation
Creates a new
Customeraccount with the provided contact information and login credentials. The customer can then sign in for things such as accessing their account, viewing order history, and managing saved addresses.CautionThis mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code.
Caution:This mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code.
Caution: This mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code.
- Anchor to inputinput•Customer
Create Input! required The fields used to create a new customer.
Arguments
- •mutation
Updates the default address of an existing
Customer. Requires a customer access token to identify the customer and an address ID to specify which address to set as the new default.- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
- Anchor to addressIdaddress•ID!
Id required ID of the address to set as the new default for the customer.
Arguments
- •mutation
Subscribes a customer to the newsletter with an email address.
- Anchor to emailemail•String!required
The customer's email address.
Arguments
- •mutation
Sends a reset password email to the customer. The email contains a reset password URL and token that you can pass to the
ormutation to reset the customer's password.This mutation is throttled by IP. With private access, you can provide a
header instead of the request IP. The header is case-sensitive.CautionEnsure the value provided to
is trusted. Unthrottled access to this mutation presents a security risk.Caution:Ensure the value provided to
is trusted. Unthrottled access to this mutation presents a security risk.Caution: Ensure the value provided to <code><span class="PreventFireFoxApplyingGapToWBR">Shopify-Storefront-Buyer-I<wbr/>P</span></code> is trusted. Unthrottled access to this mutation presents a security risk.
- Anchor to emailemail•String!required
The email address of the customer to recover.
Arguments
- •mutation
Resets a customer's password using the reset token from a password recovery email. On success, returns the updated
Customerand a newfor immediate authentication.Use the
mutation to send the password recovery email that provides the reset token. Alternatively, useif you have the full reset URL instead of the customer ID and token.CautionThis mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
Caution:This mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
Caution: This mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
- •ID!required
Specifies the customer to reset.
- Anchor to inputinput•Customer
Reset Input! required The fields used to reset a customer’s password.
Arguments
- •ID!
- •mutation
Resets a customer's password using the reset URL from a password recovery email. The reset URL is generated by the
mutation.On success, returns the updated
Customerand a newfor immediate authentication.CautionThis mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
Caution:This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
Caution: This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
- Anchor to resetUrlreset•URL!
Url required The customer's reset password url.
- Anchor to passwordpassword•String!required
New password that will be set as part of the reset password process.
Arguments
- •mutation
Subscribes a customer to the newsletter with a phone number.
- Anchor to phoneNumberphone•String!
Number required The customer's phone number.
Arguments
- •mutation
Updates a customer's personal information such as name, password, and marketing preferences. Requires a valid
to authenticate the customer making the update.If the customer's password is updated, then all previous access tokens become invalid. The mutation returns a new access token in the payload to maintain the customer's session.
CautionPassword changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
Caution:Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
Caution: Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
- Anchor to customercustomer•Customer
Update Input! required The customer object input.
Arguments