Account Registration -Internal
Endpoint
| Endpoint | Method |
Authentication |
|
/internal/register
|
POST | Yes |
Authentication
| Type |
Token source |
Server |
| Basic | Internal | USAPI |
Header
| Parameter |
Value |
| authorization | Basic <auth key> |
Body request
{
"username": "test regis 3",
"password": "test regis 3",
"first_name": "second",
"last_name": "test account",
"phone_number": "621234567891",
"email": "test@abc.com"
}
| Properties |
Properties of | Data type | Required | Description |
| username | string | yes | Username must be unique | |
| password | string | yes |
|
|
| first_name | string | yes |
|
|
| last_name | string | yes |
|
|
| phone_number | string | yes |
|
|
| string | yes |
Email must be unique |
Result example
200 Ok
{
"status": true,
"message": "Account has been created"
}
Error example
400 Bad request
Phone number is invalid
{
"message": "Invalid phone number format"
}
400 Bad request
Duplicate phone number
{
"message": "Phone number already exist"
}
400 Bad request
Duplicate username
{
"message": "Username already exist"
}
400 Bad request
Duplicate email
{
"message": "Email already exist"
}
500 Internal server error
{
"message": "Internal error"
}
No Comments