Customer Signup
This API allows to sign up for a new account.
- application/json
Request Body required
- email string
The email address of the customer.
mobile object
code string requiredUnique numeric country code
number string requiredThe valid phone number of the customer.
- password string required
Possible values:
>= 6 characters
and<= 24 characters
The password of the customer, should be greater than or equal to 8 characters and less than or equal to 32 characters.
- referralCode string
The referral code received from the other user.
- referredBy string
The unique id of the referrer.
Responses
- 201
- 400
- 422
Success response
- application/json
- Example
{
"statusCode": 201,
"data": {
"email": {
"id": "harish@bytize.in",
"token": "e9b346d5610346249444f0dad8ff6212ec105e6881675885b2736ecd9d89243b",
"verified": false
},
"mobile": {
"code": "+91",
"number": "9962794005",
"verified": false
},
"createdAt": "2022-09-22T10:09:14.205Z",
"deletedAt": null,
"_id": "632c34752269f12c57952275",
"addresses": []
}
}
Validation error response
- application/json
- Example
{
"statusCode": 400,
"errors": {
"email": [
"email must be an email"
],
"mobile": {
"number": [
"number must be a valid phone number"
]
},
"password": [
"password must be longer than or equal to 8 characters"
]
},
"message": "Bad Request"
}
Validation error response
- application/json
- Example
{
"statusCode": 422,
"errors": {
"email": [
"Email already exists"
]
}
}