Skip to main content

customerSignUp

Overview

Create a customer profile using CustomerSignupInput. Provide identifier (email/phone), name, country, and type to align with your market’s requirements. The response returns token for authenticated calls.

  • Type: GraphQL Mutation
  • Endpoint: https://subdomain.com
  • Authentication: Typically public (no token) since this is signup

Mutation

mutation CustomerSignup($input: CustomerSignupInput!) {
customerSignup(input: $input) {
success
message
token
}
}

Variables

{
"input": {
"fullname": "John Doe",
"identifier": "user@example.com",
"type": "email",
"country": "SA"
}
}

Examples

curl -X POST \
https://subdomain.com\
-H "Content-Type": "application/json" \
--data-binary @- << 'EOF'
{
"query": "mutation CustomerSignup($input: CustomerSignupInput!) { customerSignup(input: $input) { success message token } }",
"variables": {
"input": {
"fullname": "John Doe",
"identifier": "user@example.com",
"type": "email",
"country": "SA"
}
}
}
EOF

Notes

  • Some stores require additional fields (password, OTP, marketing consent). Extend CustomerSignupInput to match your backend.
  • Store the returned token securely (e.g., HTTP-only cookie) for subsequent authenticated GraphQL calls.
  • Combine with customerLogin if your flow first creates an account then logs in automatically.