Customers > Customers > storefrontCustomersCreate
Storefront APICustomersCustomersstorefrontCustomersCreate
storefrontCustomersCreate
POST:storefront/customers.json

Description

Register a new customer.

Topic: Customers

Arguments

data: [StorefrontCustomerCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

accepts_marketing: Boolean

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

Example: false


addresses: [AddressCreate!]


default_billing_address_id: String

Default billing address identifier

Example: "ad_EQzGqWoY"


default_shipping_address_id: String

Default shipping address identifier

Example: "ad_EQzGqWoY"


display_name: String

The name to display for other customers (under product reviews and such)

Example: "John S."

Valid when: display_name's length doesn't exceed 250 characters


email: String!

The email address of the customer

Example: "bob.norman@hostmail.com"

Valid when: email is not empty

Valid when: email's length doesn't exceed 250 characters


language: String

Preferred language of the customer


mobile: String

The mobile phone number of the customer (used for notifications)

Example: "45634634562"


mobile_notifications: Boolean

Whether to notify customer via mobile phone or not

Example: false


name: String

Name of the customer

Example: "John Smith"

Valid when: name's length doesn't exceed 250 characters


password: String

The customer's password

Example: "34hb5kj3h45k3"

Valid when: password is not empty


preferred_currency: String

Currency customer prefers

Example: "USD"


reminder_messages: Boolean

Indicates whether the customer desires to get reminder emails

Example: false


timezone: String

Name of the time zone the customer is in

Example: "(GMT-05:00) Eastern Time"

Valid when: timezone's length doesn't exceed 50 characters


timezone_hint: String

Timezone hint. When provided it overrides timezone field, but only if it's correct. If it's incorrect, the value is ignored.

Example: "(GMT-05:00) Eastern Time"

Valid when: timezone_hint's length doesn't exceed 50 characters


Result

[StorefrontCustomer!]

Preview (typescript)

Loading module