registerCustomer
Public: no authentication required.
Portal self-registration — CREATES the account, gated on the OTP code the caller already verified (re-checked here, never consumed: the sign-in that follows spends it). Honoured only when allowSelfRegistration is on; the response previews whether the new account needs seller approval, and is uniform whether or not the email exists.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RegisterCustomer($input: RegisterCustomerInput!) {
registerCustomer(input: $input) {
message
pendingApproval
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RegisterCustomer($input: RegisterCustomerInput!) {\n registerCustomer(input: $input) {\n message\n pendingApproval\n }\n}",
"variables": {
"input": {
"code": "string",
"companyName": "string",
"contactName": "string",
"email": "string"
}
}
}
EOF
Variables:
{
"input": {
"code": "string",
"companyName": "string",
"contactName": "string",
"email": "string"
}
}
Response:
{
"data": {
"registerCustomer": {
"message": "string",
"pendingApproval": true
}
}
}
registerCustomer(
input: RegisterCustomerInput!
): PortalRegisterAccountResult!
Arguments
registerCustomer.input ● RegisterCustomerInput! non-null input
The details of the customer to register.
Type
PortalRegisterAccountResult object
self-registration result. Uniform whether or not the email already exists (no account enumeration).