VendexApp Docs
  • Overview
  • DEVELOPER
    • Cloud API for App
      • Client authentication
      • User
      • Account
      • Transaction
      • Vending machine
      • Payment gateway
    • Cloud API for Sale Point
      • Client authentication
      • Account
      • Transaction
      • Sale point
    • QR Code format
    • Real Time Communication (RTC) API
      • Transaction
Powered by GitBook
On this page
  • User signup
  • User login
  • User logout
  • Get user details
  • Validate phone number
  • Upload profile image

Was this helpful?

  1. DEVELOPER
  2. Cloud API for App

User

User signup

POST https://api.vendex.app/api/user/signup/

For user signup.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Request Body

Name
Type
Description

first_name

string

First name

last_name

string

Last name

email

string

Email

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

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method

Request Body

Name
Type
Description

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

Name
Type
Description

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

Name
Type
Description

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": "xxx@nuvapay.com",
        "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

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Request Body

Name
Type
Description

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

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

API-User-Token

string

User token obtained from login method.

Request Body

Name
Type
Description

file

object

Image should be uploaded as form data with field name as "file"

{
    "status": "success",
    "detail": "The profile image updated successfully"
}
PreviousClient authenticationNextAccount

Last updated 4 years ago

Was this helpful?