Auth
The Auth API provides a set of endpoints for user authentication, account management, and profile updates. These endpoints allow users to register, log in, manage their accounts, and perform various authentication-related tasks.
Base URL
https://api.globalbanking.fintractglobal.com/
1. Deactivate account
This endpoint deactivates a user account, preventing the user from accessing the system or performing any actions that require authentication.
Takes bearer token to get the authenticated user and deactivates it.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to specifically login as customer to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/account-deactivate/
Request
Header Parameters
Authorization*:
string
Bearer access token for authorization
Response
200
Sample Request
Payload
No payload
Sample Response
200
application/json
{ "msg": "Account deactivate request submitted!" }
To test the API,click here to access our testing interface.
2. Register
This endpoint registers a new user account in the system. This typically involves providing basic information such as username, email, and password.
Takes user data specified in request body and registers user.
Endpoint
/auth/register/
Request
Request body schema
application/json
email*:
string
Email address
username*:
string
Username
name:
string
Name of the user
user_type:
string enum:[ CUSTOMER, BANK_ADMIN, FINTRACT_ADMIN, DEVELOPER, DEVELOPER_ADMIN ]
User type
password*:
string
Password
password2*:
string
Password 2
phone*:
string
Phone number
customer_id:
string
Customer ID
gender:
string enum:[MALE,FEMALE,]
Gender
Response
201
Response body schema
application/json
id:
integer
ID
email*:
string
Email address
username*:
string
Username
name:
string
Name of the user
user_type:
string enum:[ CUSTOMER, BANK_ADMIN, FINTRACT_ADMIN, DEVELOPER, DEVELOPER_ADMIN ]
User type
password*:
string
Password
password2*:
string
Password 2
phone*:
string
Phone number
customer_id:
string
Customer ID
gender:
string enum:[MALE,FEMALE,]
Gender
Sample Request
Payload
application/json
{ "username": "JohnDoe0303", "email": "johndoe@gmail.com", "name": "John", "user_type": "DEVELOPER", "phone": "1234567890", "gender": "MALE", "password": "johnDoe@#", "password2": "johnDoe@#" }
Sample Response
201
application/json
{ "id": 78, "username": "JohnDoe0303", "email": "johndoe@gmail.com", "name": "John", "user_type": "DEVELOPER", "phone": "1234567890", "customer_id": "7001808879932062", "gender": "MALE" }
To test the API,click here to access our testing interface.
3. Login
This endpoint allows a user to log in to the system using their credentials (e.g., username and password).
Takes email & password and sends otp to email/phone number.
Endpoint
/auth/login/
Request
Request body schema
application/json
email*:
string
Email address
otpType*:
string enum:[Email, Phone]
place where OTP will be sent
userType:
string enum:[ CUSTOMER, BANK_ADMIN, FINTRACT_ADMIN, DEVELOPER, DEVELOPER_ADMIN ]
User type
password*:
string
Password
Response
200
Response body schema
application/json
data:
object
object containing ID value
id:
integer
Sample Request
Payload
application/json
{ "email": "johndoe@gmail.com", "otpType":"Email", "userType":"Developer", "password": "johnDoe@#" }
Sample Response
200
application/json
{ "data": { "id": 93 } }
To test the API,click here to access our testing interface.
4. Verify OTP
This endpoint facilitates user authentication by verifying the OTP provided after login for a specific user identified by the id parameter.
Upon receiving the OTP the admin approves the OTP to determine its authenticity and validity.
Endpoint
/auth/login/{id}/
Request
Path Parameters
id*:
string
User ID after login
Request body schema
application/json
otp*:
string
Email address
Response
200
Response body schema
application/json
message:
string
successfully Logged In
id:
integer
ID
customer_id:
string
Customer ID
email*:
string
Email address
username*:
string
Username
verification_status:
boolean
true if verified else false
tokens:
object
refresh and access tokens
refresh:
<refresh token>
access:
<access token>
user_type:
string enum:[ CUSTOMER, BANK_ADMIN, FINTRACT_ADMIN, DEVELOPER, DEVELOPER_ADMIN ]
User type
Sample Request
Payload
application/json
{ "otp": "123456" }
Sample Response
200
application/json
{ "message": "Successfully Logged In", "id": 93, "customer_id": "7001808879932062", "email": "johndoe@gmail.com", "username": "JohnDoe0303", "verification_status": true, "tokens": { "refresh": "kjdbgkjsbgkgyftfghfkyfkukguyg", "access": "jhkgjgkjvhgfuftfjhguytguygkjgh" }, "user_type": "DEVELOPER" }
To test the API,click here to access our testing interface.
5. Admin Approval
This endpoint facilitates the approval process for granting access to customer accounts by administrators.
This endpoint can only be accessed by users with administrative privileges (e.g., FINTRACT_ADMIN). Users without sufficient permissions will receive this error response.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to specifically login as FINTRACT_ADMIN to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/admin_approval/
Request
Header Parameters
Authorization*:
string
Bearer access token for authorization
Request body schema
application/json
customer_id*:
string
Customer ID
Response
200
Response body schema
application/json
msg:
string
User admin approved
Sample Request
Payload
application/json
{ "customer_id": "34712234559419273" }
Sample Response
200
application/json
{ "msg": "User admin approved" }
To test the API,click here to access our testing interface.
6. Upload User Avatar
Allows a user to upload or update their avatar image. The id parameter specifies the user whose avatar is being updated.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to specifically login as CUSTOMER to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/avatar/{id}/
Request
Path Parameters
id*:
string
User ID after login
Header Parameters
Authorization*:
string
Bearer access token for authorization
Request body schema
multipart/form-data
file*:
file
File containing user profile photo
Response
201
Response body schema
application/json
user:
object
Object conatining user account details
Sample Request
Payload
multipart/form-data
{ file: "profile.png" }
Sample Response
201
application/json
{ "user": { "id": 93, "password": "hdbkjhhgfhtgmhkjgukyfm", "last_login": null, "is_superuser": false, "user_type": "CUSTOMER", "gender": "FEMALE", "username": "Johndoe34", "email": "", "phone": "", "avatar": "https://openbankingapp.s3.amazonaws.com/b906a186.jpg", "customer_id": "865565869898", "name": "John Doe", "country": "USA", "citizenship": "", "national_id": "", "address": "", "is_staff": false, "is_active": true, "is_deactivate": false, "is_verified": true, "admin_approved": true, "bank": "", "otp": "0", "groups": [], "user_permissions": [] } }
To test the API,click here to access our testing interface.
7. Delete User
Deletes a user account from the system permanently. This action is irreversible and removes all associated user data.
Takes bearer access token and deletes the account.
Endpoint
/auth/delete/
Request
Header Parameters
Authorization*:
string
Bearer access token for authorization
Response
200
Response body schema
application/json
msg:
string
Account Successfully deleted
Sample Request
Payload
No payload
Sample Response
200
application/json
{ "msg": "Account Successfully deleted" }
To test the API,click here to access our testing interface.
8. Resend Verification Mail
Initiates the process to re-verify a user's email address. This is typically used when an email address needs to be re-confirmed for security reasons.
Takes email and resends verification mail with token.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to login as CUSTOMER or BANK_ADMIN to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/re-verify-email/
Request
Request body schema
application/json
email*:
string
User's email ID
Response
201
Response body schema
application/json
message:
string
New token sent
Sample Request
Payload
application/json
{ "email": "johndoe@gmail.com" }
Sample Response
201
application/json
{ "message": "New token sent" }
To test the API,click here to access our testing interface.
9. Get User Info
Retrieves detailed information about a specific user account identified by the id parameter.
Takes user id and returns user email, phone & other details.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to login as CUSTOMER to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/info/{id}/
Request
Path Parameters
id*:
string
User ID after login
Header Parameters
Authorization*:
string
Bearer access token for authorization
Response
200
Response body schema
application/json
id:
integer
ID
email:
string
Email address
avatar:
string
Profile photo
username:
string
Username
name:
string
Name of the user
net_balance:
integer
Net balance of the account
verification_status:
boolean
true is user is verified else false
phone:
string
Phone number
customer-id:
string
Customer ID
country:
string
Country
citizenship:
string
Citizenship
national_id:
string
National ID
address:
string
User address
bank_name:
string
Bank Name
gender:
string enum:[MALE,FEMALE,]
Gender
Sample Request
Payload
No payload
Sample Response
200
application/json
{ "id": 93, "email": "email": "johndoe@gmail.com", "avatar": "", "gender": "MALE", "username": "JohnDoe0303", "name": "John", "net balance": 0, "customer-id": "2160658639884", "verification_status": true, "phone": "1234567890", "country": "", "citizenship": "", "national_id": "", "address": "", "bank_name": "" }
To test the API,click here to access our testing interface.
10. Update User Info
Updates user information for the user identified by the id parameter. This allows for updating specific fields without requiring all user information to be provided.
Takes user data and updates citizenship, national_id, name and others.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to login as CUSTOMER to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/update/usr/{id}/
Request
Path Parameters
id*:
string
User ID after login
Header Parameters
Authorization*:
string
Bearer access token for authorization
Request body schema
application/json
email:
string
Email address
username:
string
Username
name:
string
Name of the user
phone:
string
Phone number
country:
string
Country
citizenship:
string
Citizenship
national_id:
string
National ID
address:
string
User address
Response
200
Response body schema
application/json
message:
string
Updated successfully
Sample Request
Payload
application/json
{ "username": "JohnDoe123", "email": "", "name": "", "phone": "", "country": "USA", "citizenship": "", "national_id": "", "address": "" }
Sample Response
200
application/json
{ "message": "Updated Successfully" }
To test the API,click here to access our testing interface.
11. Update Username & name
Updates user name and name only for the user identified by the access token
Takes only username & name and updates them.
Refer to the Authentication Guide for details on obtaining and using API keys. You need to login as CUSTOMER to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/user-update/
Request
Header Parameters
Authorization*:
string
Bearer access token for authorization
Request body schema
application/json
username*:
string
Username
name*:
string
Name of the user
Response
200
Response body schema
application/json
message:
string
Account Successfully Updated
Sample Request
Payload
application/json
{ "username": "Johndoe109", "name": "John B Doe" }
Sample Response
200
application/json
{ "msg": "Account Successfully Updated" }
To test the API,click here to access our testing interface.
12. Upload file
This endpoint takes file and uploads it & returns file url
Refer to the Authentication Guide for details on obtaining and using API keys. You need to login as CUSTOMER to access this API. When you make calls to the tokenization API, include the API key as bearer access token in the authorization header.
Endpoint
/auth/upload/
Request
Header Parameters
Authorization*:
string
Bearer access token for authorization
Request body schema
multipart/form-data
file*:
file
file to be uploaded
Response
201
Response body schema
application/json
url:
string
URL of the uploaded file
Sample Request
Payload
multipart/form-data
passport.pdf
Sample Response
201
application/json
{ "url": "https://openbankingapp.s3.amazonaws.com/c3510aee.csv" }
To test the API,click here to access our testing interface.