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
- 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"
]
}
}
POST /ecommerce/v1/auth/signup
Authorization
type: oauth2flow: clientCredentialsscopes: user:read,user:write
Request
Request
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'
curl -L -X POST 'https://posbytz.github.io/ecommerce/v1/auth/signup' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"email": "string",
"mobile": {
"code": "string",
"number": "string"
},
"password": "string",
"referralCode": "string",
"referredBy": "string"
}'