API version: unstable
API version: 2021-01 Release candidate
API version: 2020-10 Latest
API version: 2020-07
API version: 2020-04
API version: 2020-01
API version: 2019-10 Unsupported
API version: 2019-07 Unsupported

customerUpdate mutation

Version unstable

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2021-01 (Release candidate)

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-10 (Latest)

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-07

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-04

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2020-01

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2019-10 (Unsupported)

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2019-07 (Unsupported)

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

Version 2019-04 (Unsupported)

Updates a customer's attributes.

Required access

write_customers access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

input ( CustomerInput! ) required

Provides updated fields for the customer.

CustomerInput fields

acceptsMarketing (Boolean)

Whether the customer has consented to receive marketing material via email.

acceptsMarketingUpdatedAt (DateTime)

The date and time when the customer consented or objected to receiving marketing material by email. Set whenever the customer consents or objects to marketing material.

addresses ([MailingAddressInput!])

An input that specifies addresses for a customer.

email (String)

The unique email address of the customer.

firstName (String)

The customer's first name.

id (ID)

Specifies the customer to update, or creates a new customer if one doesn't exist.

lastName (String)

The customer's last name.

locale (String)

The customer's locale.

marketingOptInLevel (CustomerMarketingOptInLevel)

The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was enabled when the customer consented to receiving marketing material by email.

metafields ([MetafieldInput!])

Attaches additional metadata to the customer.

note (String)

A note about the customer.

phone (String)

The unique phone number for the customer.

privateMetafields ([PrivateMetafieldInput!])

The private metafields to associated with this product.

tags ([String!])

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

taxExempt (Boolean)

Whether the customer is exempt from paying taxes on their order.

taxExemptions ([TaxExemption!])

The list of tax exemptions to apply to the customer.

Return fields

customer (Customer)

The updated customer.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.