customerCreate Mutation
Creates a new customer.
Arguments
#
Response
#
Returns CustomerCreate .
Example
#
mutation ($input: UserCreateInput!) {
customerCreate(input: $input) {
accountErrors {
field
message
code
}
user {
id
lastLogin
externalId
externalSource
externalPayoutAccountId
externalPayoutSource
externalPayoutOnboardingUrl
companyName
email
firstName
lastName
isStaff
isActive
note
dateJoined
lastStatusChangedAt
personalPhone
taxExemptCode
vatIdentificationNumber
numOrders
isAssignable
dashboardEmbeddingToken
}
}
}
3
{
"input": {
"defaultBillingAddress": {
"firstName": "John",
"lastName": "Smith",
"companyName": "Acme Inc.",
"streetAddress1": "123 Maple Street",
"streetAddress2": "Suite 101",
"city": "Toronto",
"cityArea": "Downtown",
"postalCode": "M5H 2N2",
"country": "AF",
"countryArea": "ON",
"phone": "+1-555-123-4567"
},
"defaultShippingAddress": {
"firstName": "John",
"lastName": "Smith",
"companyName": "Acme Inc.",
"streetAddress1": "123 Maple Street",
"streetAddress2": "Suite 101",
"city": "Toronto",
"cityArea": "Downtown",
"postalCode": "M5H 2N2",
"country": "AF",
"countryArea": "ON",
"phone": "+1-555-123-4567"
},
"firstName": "John",
"lastName": "Smith",
"email": "user@example.com",
"isActive": true,
"isStaff": true,
"note": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dictum, risus vel suscipit rhoncus, felis turpis tristique arcu, sit amet lobortis nulla neque at mi.",
"companyName": "Acme Inc.",
"personalPhone": "+1-555-123-4567",
"passwordUrl": "passwordUrl",
"taxExemptCode": "E",
"customFields": [
{
"id": "aWQ6MjM=",
"values": [
"values"
],
"value": "value",
"dateTime": "2022-03-06T08:23:45.000Z",
"plainText": "plainText",
"richText": "richText",
"amount": 10.23,
"currency": "currency",
"reference": "reference",
"boolean": true,
"file": "Upload",
"fileUrl": "fileUrl"
}
],
"vatIdentificationNumber": "vatIdentificationNumber",
"sendCustomerSetPasswordEmail": true,
"redirectUrl": "https://dashboard-example.mpconsole.com"
}
}
3
{
"customerCreate": {
"accountErrors": [
{
"field": "string",
"message": "string",
"code": "ACTIVATE_OWN_ACCOUNT"
}
],
"user": {
"id": "aWQ6MjA=",
"lastLogin": "2022-03-06T08:23:45.000Z",
"externalId": "string",
"externalSource": "string",
"externalPayoutAccountId": "acct_1OKOMlCr0GpVz8ls",
"externalPayoutSource": "NAUTICAL_PAYMENTS_STRIPE",
"externalPayoutOnboardingUrl": "https://connect.stripe.com/setup/e/acct_1OKOMlCr0GpVz8ls/gDWmFe2IFpXC",
"companyName": "Acme Inc.",
"email": "user@example.com",
"firstName": "John",
"lastName": "Smith",
"isStaff": true,
"isActive": true,
"note": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dictum, risus vel suscipit rhoncus, felis turpis tristique arcu, sit amet lobortis nulla neque at mi.",
"dateJoined": "2022-03-06T08:23:45.000Z",
"lastStatusChangedAt": "2022-03-06T08:23:45.000Z",
"personalPhone": "+1-555-123-4567",
"taxExemptCode": "E",
"vatIdentificationNumber": "string",
"numOrders": 42,
"isAssignable": true,
"dashboardEmbeddingToken": "string"
}
}
}
3