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 consents: [ConsentInput!] }

Fields

FieldTypeRequiredDescription
emailStringYesThe customer’s email address
passwordStringYesThe 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
consents[ConsentInput!]NoConsents to record for the new customer (privacy, marketing, cookie policy, or custom types)

Example

mutation { createCustomer(input: { email: "john.doe@example.com" password: "securePassword123" passwordConfirm: "securePassword123" firstName: "John" lastName: "Doe" phone: "+1234567890" address1: "123 Main Street" address2: "Suite 100" city: "San Francisco" zipcode: "94102" country: "US" region: "CA" company: "Acme Corp" acceptsMarketing: true consents: [ { type: "MARKETING" status: "ACCEPTED" } ] }) { customer { id email firstName lastName } } }
  • ConsentInput