User
User signup
POST
https://api.vendex.app/api/user/signup/
For user signup.
Headers
Api-Client-Token
string
Client token obtained from client authentication method.
Request Body
first_name
string
First name
last_name
string
Last name
string
phone_no
string
Phone number (+XXX-XXXXXXXX)
password
string
Password
{
"status": "success",
"detail": "Signup success",
}
User login
POST
https://api.vendex.app/api/user/login/
Method to obtain user token. This token is used in communication header for all API command.
Headers
Api-Client-Token
string
Client token obtained from client authentication method
Request Body
username
string
Email or phone number. Phone number format is +XXX-XXXXXXXX
password
string
Password
// If login success
{
"status": "success",
"detail": "Login successs",
"data": {
"token": "232dc3166fdcd3fab2434104e73af97dcc96e870"
}
}
// If username and password is correct but phone number is not validated
{
"status": "error",
"detail": "Verification code is expired. New verification code has been sent",
"data": {
"error_code": "phone_no_not_validated",
"phone_no": "+XXXXXXXXXXX"
}
}
User logout
GET
https://api.vendex.app/api/user/logout/
This endpoint allows to logout user from client app(s).
Headers
Api-Client-Token
string
Client token obtained from client authentication method.
Api-User-Token
string
User token obtained from user login method.
{
"status": "success",
"detail": "Logout success"
}
Get user details
GET
https://api.vendex.app/api/user/
To get user details.
Headers
Api-Client-Token
string
Client token obtained from client authentication method.
Api-User-Token
string
User token obtained from login method.
[
{
"id": 1,
"first_name": "Irsyad",
"last_name": "Saidin",
"phone_no": "+974xxxxxxxx",
"email": "[email protected]",
"profile_image_url": "https://nxpay-uploaded-media.s3.ap-south-1.amazonaws.com/upload/9c900a41-9027-4218-9737-f91db6cf4f53.png"
}
]
Validate phone number
POST
https://api.vendex.app/api/user/validate_phone_number/
To validate phone number upon sign up.
Headers
Api-Client-Token
string
Client token obtained from client authentication method.
Request Body
phone_no
string
Phone number in format of +XXXXXXXXXXX
pin
string
6 digit VendexApp verification pin received from SMS
{
"status": "success",
"detail": "Validation successs",
}
Upload profile image
POST
https://api.vendex.app/api/user/update_profile_image/
This endpoint allows to update user profile picture.
Headers
Api-Client-Token
string
Client token obtained from client authentication method.
API-User-Token
string
User token obtained from login method.
Request Body
file
object
Image should be uploaded as form data with field name as "file"
{
"status": "success",
"detail": "The profile image updated successfully"
}
Last updated
Was this helpful?