Skip to content

Register Customer

Create a new customer account with email, password, and optional profile information.

Endpoint

POST /api/shop/customers

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key

Request Body

json
{
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "password": "Password123!",
  "confirmPassword": "Password123!",
  "phone": "1234567890",
  "gender": "Male",
  "dateOfBirth": "1990-01-15",
  "subscribedToNewsLetter": true
}
FieldTypeRequiredDescription
firstNamestringYesCustomer first name
lastNamestringYesCustomer last name
emailstringYesUnique email address
passwordstringYesPassword (min 8 chars, mixed case, numbers, special)
confirmPasswordstringYesPassword confirmation (must match)
phonestringNoPhone number
genderstringNoCustomer gender (Male/Female)
dateOfBirthstringNoDate of birth (YYYY-MM-DD)
subscribedToNewsLetterbooleanNoNewsletter subscription (default: false)

Response Fields (201 Created)

FieldTypeDescription
idintegerCustomer ID
firstNamestringCustomer first name
lastNamestringCustomer last name
emailstringCustomer email
phonestringCustomer phone
genderstringCustomer gender
dateOfBirthstringCustomer date of birth
apiTokenstringAPI authentication token
tokenstringSession token
statusintegerAccount status (1=active, 0=inactive)
subscribedToNewsLetterbooleanNewsletter subscription status
isVerifiedintegerEmail verification status (0=not verified)
isSuspendedintegerSuspension status (0=active)
namestringFull customer name
customerGroupIdmixedCustomer group ID
channelIdmixedChannel ID
rememberTokenmixedRemember token

Password Requirements

Passwords must contain:

  • Minimum 8 characters
  • At least one uppercase letter (A-Z)
  • At least one lowercase letter (a-z)
  • At least one number (0-9)
  • At least one special character (!@#$%^&*)

Released under the MIT License.