Skip to Content

CustomerCreateInput

Input for creating a new customer account

Input Definition

input CustomerCreateInput { email: String! password: String! passwordConfirm: String firstName: String lastName: String phone: String address1: String address2: String city: String zipcode: String country: String region: String company: String vatNumber: String companyId: String acceptsMarketing: Boolean }

Fields

FieldTypeRequiredDescription
emailString!YesThe customer’s email address
passwordString!YesThe customer’s password (minimum 6 characters)
passwordConfirmStringNoPassword confirmation (must match password if provided)
firstNameStringNoThe customer’s first name
lastNameStringNoThe customer’s last name
phoneStringNoThe customer’s phone number
address1StringNoThe first line of the customer’s address
address2StringNoThe second line of the customer’s address
cityStringNoThe customer’s city
zipcodeStringNoThe customer’s postal/zip code
countryStringNoThe customer’s country code (ISO 3166-1 alpha-2)
regionStringNoThe customer’s state/province/region
companyStringNoThe customer’s company name
vatNumberStringNoThe customer’s VAT number
companyIdStringNoThe customer’s company/business ID
acceptsMarketingBooleanNoWhether the customer accepts marketing communications

Example

mutation CreateCustomer { createCustomer(input: { email: "john.doe@example.com" password: "SecurePassword123" passwordConfirm: "SecurePassword123" firstName: "John" lastName: "Doe" phone: "+1-555-0123" address1: "123 Main Street" address2: "Suite 100" city: "New York" zipcode: "10001" country: "US" region: "NY" company: "Acme Corporation" vatNumber: "US123456789" companyId: "ACME-12345" acceptsMarketing: true }) { customer { id email firstName lastName } } }

No related types specified.