Register
A register API is an endpoint that allows users to create an account in a system by submitting their personal details, such as phone, email, and password. This API typically validates the input data, checks if the phone or email already exists in the system, and creates a new user account if all the requirements are met.
Endpoint:
api/customer/auth/signup
Http Method:
POST
The API response typically includes a success message or an error message if the registration fails. The register API is commonly used in web applications to allow users to create an account and access restricted features or content.
- Request Body:
Here is an example request body for registering a new user:
Key | Type | Required | Description |
---|---|---|---|
name | string | Yes | The first name of the customer. |
last_name | string | Yes | The last name of the customer. |
email | string | Yes | The email address of the customer. |
phone | string | Yes | The phone number of the customer. |
password | string | Yes | The password of the customer. |
birthdate | string | Yes | The birthdays of the customer. |
refered | string | No | The referral information of the customer. This parameter is not required and can be omitted if the customer does not have a referral. |
{
"name": "Test",
"last_name": "Documentation",
"email": "doc@supercommerce.io",
"phone": "01111111111",
"password": "12345678",
"birthdate": "2000-02-01",
"refered": ""
}
After successful register, the API will respond with the user's authentication token in the 'data' field.
- Success Response:
You can check more details about Customer Resource.
{
"code": 200,
"data": {
"id": 1153383,
"name": "Test",
"last_name": "Documentation",
"email": "doc2@supercommerce.io",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..",
//...
}
}
Check the following section to learn more about the Register API Reference