0% found this document useful (0 votes)
8 views9 pages

Quick Send App Authentication API Guide

Quick send app documented

Uploaded by

imtiajulislammd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views9 pages

Quick Send App Authentication API Guide

Quick send app documented

Uploaded by

imtiajulislammd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Quick Send App – Authentication API Documentation

Version: 1.0
Base URL: {{BASE_URL}}/api
Last Updated: November 2025

1. Send OTP (Create Temporary User)

Endpoint

Method URL

POST /auth/phone

Headers

Header Value

Content-Type application/json

Request Body

Field Type Required Description

phone string Yes Phone number with country code

deviceId string Yes Unique device identifier

status integer Yes Status flag (e.g., 1)

Success Response

{ "code": 200, "message": "OTP sent. Please enter OTP for verification.", "token": null }

Error Responses

Code Message

400 Phone already in use

500 Failed to send OTP


2. Verify OTP

Endpoint

Method URL

POST /auth/phone/verify

Request Body

Field Type Required

phone string Yes

otp string Yes (6-digit)

deviceId string Yes

Success Response

{ "code": 200, "message": "User phone verified successfully.", "token": null }

Error Responses

Code Message

400 Phone not found

400 Invalid device

400 Invalid OTP

3. Check Username Availability

Endpoint

Method URL

POST /auth/check-username
Headers

Header Value

Content-Type application/json

Request Body

Field Type Required

username string Yes

Responses

Code Description Example

200 Username available { "code": 200, "message": "Username is available" }

409 Username exists { "code": 409, "message": "Username already exists" }

4. Register (Complete User Profile)

Endpoint

Method URL

POST /auth/register

Headers

Header Value

Content-Type application/json

Request Body

Field Type Required

phone string Yes

username string Yes

email string Yes


Field Type Required

password string Yes

securityAnswer string Yes

Success Response

{ "code": 200, "message": "User registered successfully.", "token": "JWT_TOKEN" }

Error Responses

Code Message

400 Passwords do not match

400 Phone not verified

400 Username already exists

5. Login

Endpoint

Method URL

POST /auth/login

Request Body

Field Type Required

username string Yes

password string Yes

Success Response

{ "code": 200, "message": "Login successful", "token": "JWT_TOKEN" }

Error Responses
Code Message

401 Invalid username or password

6. Update Profile

Endpoint

Method URL

PATCH /auth/profile

Headers

Header Value

Content-Type multipart/form-data

Authorization Bearer <JWT_TOKEN>

Request Body Fields

Field Required Type Description

name Yes text Full name

dob Yes text YYYY-MM-DD

gender Yes text Male / Female / Other

passportNo Yes text Passport number

passportExpiry Yes text YYYY-MM-DD

visaNo Yes text Visa number

visaExpiry Yes text YYYY-MM-DD

occupation Yes text Job title

sourceOfIncome Yes text Salary / Business / Other


Field Required Type Description

presentAddress Yes text Current address

permanentAddress Yes text Permanent address

zipCode No text Postal code

fatherName No text -

motherName No text -

companyName No text -

companyAddress No text -

workPermitNo No text -

workPermitExpiry No text YYYY-MM-DD

password No text New password

profilePicture No file JPG/PNG, max 5MB

passportFile No file PDF/JPG, max 10MB

workPermitFile No file PDF/JPG, max 10MB

visaFile No file PDF/JPG, max 10MB

Success Response

"message": "Profile updated successfully",

"files": {

"profile_picture": "...",

"passport_file": "...",

"work_permit_file": "...",

"visa_file": "..."

}
}

Error Responses

Code Message

400 Name is required

400 Gender must be Male, Female, or Other

400 File too large

401 Unauthorized

500 Server Error

7. Get Authenticated User Profile

Endpoint

Method URL

GET /auth/profile

Headers

Header Value

Content-Type application/json

Authorization Bearer <JWT_TOKEN>

Response Example

"id": 1,

"username": "john_doe",

"phone": "+1234567890",

"email": "john@[Link]",

"profile": {
"name": "John Doe",

"dob": "1990-05-15",

"gender": "Male"

8. GET /api/sources-of-income

Description

Retrieve the list of all active sources of income (used in registration/profile).

Requires authentication via JWT Bearer token.

Request

ItemValueMethodGETURL[Link]
Typeapplication/jsonAuthorizationBearer <your-jwt-token>

Headers

httpAuthorization: Bearer [Link]...

Accept: application/json

Success Response (200 OK)

Status: 200 OK

JSON{

"code": 200,

"message": "Sources of income retrieved successfully",

"data": [

{
"id": 1,

"name": "Salary"

},

"id": 2,

"name": "Business Income"

Common Response Codes

Code Meaning

200 Success

400 Validation / Business Error

401 Unauthorized

409 Conflict

500 Server Error

You might also like