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

customerCreate mutation

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead

Creates a new customer.

Required access

unauthenticated_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 ( CustomerCreateInput! ) required

The fields used to create a new customer.

CustomerCreateInput fields

acceptsMarketing (Boolean)

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

email (String!) Required

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!) Required

The login password used by the customer.

phone (String)

A unique phone number for the customer.

Formatted using E.164 standard. For example, +16135551111.

Return fields

customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

Deprecated return fields

userErrors ([UserError!]!) deprecated

List of errors that occurred executing the mutation.

Deprecation warning

Use customerUserErrors instead