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
| Field | Type | Required | Description |
|---|---|---|---|
| String! | Yes | The customer’s email address | |
| password | String! | Yes | The customer’s password (minimum 6 characters) |
| passwordConfirm | String | No | Password confirmation (must match password if provided) |
| firstName | String | No | The customer’s first name |
| lastName | String | No | The customer’s last name |
| phone | String | No | The customer’s phone number |
| address1 | String | No | The first line of the customer’s address |
| address2 | String | No | The second line of the customer’s address |
| city | String | No | The customer’s city |
| zipcode | String | No | The customer’s postal/zip code |
| country | String | No | The customer’s country code (ISO 3166-1 alpha-2) |
| region | String | No | The customer’s state/province/region |
| company | String | No | The customer’s company name |
| vatNumber | String | No | The customer’s VAT number |
| companyId | String | No | The customer’s company/business ID |
| acceptsMarketing | Boolean | No | Whether 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
}
}
}Related Types
No related types specified.