You are on page 1of 45

Web Application

-Waset -
APIs

Date: 7/11/2021

Prepare by Omar Tarek


‫ليس للمشروع كامال‬
%50 ‫المنجز فقط‬
Abstract:
This document introduces the APIs in simple way with Their methods, parameters,
description. Everything to make it very clear to use.

The structure for this document is:


Api Title
Api Link
Api Description
Method: (GET, POST)
Parms: which contains parameters the api use.

Let us start…
Login API:
Link: /api/login .
This Api to verify the user and make him login. This function takes an email,
password and remember me as parameter and try to log the user in.
If the data is right this api would return the all user’s information with the
addition of `access_token` which is very important to authenticate the user in
other APIs, If the data not right the API will return Unauthorized.

Method: POST
Params: email, password, remember (true or false).
Request:

Response:
Logout API:
Link: /api/logout .
API to logout
Take in the header `auth-token` which contain the access token returned from
login apis to log the user out.
If it false will return unauthorized user. Else will return Logged out Successfully.
Method: POST
Request:

Response:
Username and suit API:
Link: /api/usernameAndSuit .
Api to return username and suit
(make sure to add auth-token in the header).
Method: POST

Request:

Response:
Update Name API:
Link: /api/updateName .
Api to update the name of the user.
(make sure to add auth-token in the header).
Method:POST
Params: name, name2
Request:

Response:
Update Email API:
Link: /api/updateEmail .
Api to update the email of the user.
(make sure to add auth-token in the header).
Params: email, confirmEmail
Method: POST
Request:
Response:

Update Phone API:


Link: /api/updatePhone .
Api to update the phone of the user.
(make sure to add auth-token in the header).
Params: phone
Request:

Response:
Add Phone API:
Link: /api/AddPhone .
Api to add phone of the user.
(make sure to add auth-token in the header).
Params: phone1, phone2
Method:POST
Request:
Response:

Get unread notifications API:


Link: /api/ getNumberOfNotifications.
Api to retrieve the number of unreaded notifications.
(make sure to add auth-token in the header).
Method:POST

Request:
Response:

Mark Notification as readed API:


Link: /api/readNote.
Api to mark notification as readed.
(make sure to add auth-token in the header).
Method:POST
Params: noteId
Request:
Response:

All Notifications API:


Link: /api/AllNotes.
Api to retrieve all notifications.
(make sure to add auth-token in the header).
Method:POST
Params: noteId
Request:
Response:

All Packages for specific user API


Link: /api/allPackages.
Api to retrieve all packages.
(make sure to add auth-token in the header).
Method:GET
Request:

Response:
Number of Packages for each package status API
Link: /api/ Packages_status_numbers.
Api to retrieve Number of Packages for each package status.
(make sure to add auth-token in the header).
Method:GET
Param: to
Request:
Response:

Packages Products for each package status API


Link: /api/ Packages_products.
Api to retrieve Package products for each package.
(make sure to add auth-token in the header).
Method: POST
Param: package_id
Request:
Response:

Packages for specific country API


Link: /api/ allPackagesUSA
Api to retrieve Package for country specified In `to` parameter.
(make sure to add auth-token in the header).
Method: POST
Param: to
Request:
Response:

Add notes for specific package API


Link: /api/ AddNotesPackage
Api to add notes for specific Package.
(make sure to add auth-token in the header).
Method: POST
Param: package_id, notes
Request:
Response:

Add check package API


Link: /api/ AddCheckPackage
Api to add check package.
(make sure to add auth-token in the header).
Method: POST
Param: package_id, notes
Request:
Response:

Add Turning On to package API


Link: /api/ AddTurnOnToPackage
Api to Add Turning On to package.
(make sure to add auth-token in the header).
Method: POST
Param: package_id, notes
Request:
Response:

Return Photo Range API


Link: /api/ returnPhotoRange
Api to return Photo Range.
(make sure to add auth-token in the header).
Method: GET
Request:
Response:

Return Video Range API


Link: /api/ returnVideoRange
Api to Return Video Range.
(make sure to add auth-token in the header).
Method: GET
Request:
Response:

Send Contact Us API


Link: /api/ SendContactUS
Api to send a message to contact us.
(make sure to add auth-token in the header).
Method: POST
Params: file[], subject, desc
Request:

Response:

Send Conflict API


Link: /api/ SendConflict
Api to send new conflict.
(make sure to add auth-token in the header).
Method: POST
Params: subject, desc, solution, suit
Request:

Response:

End Conflict API


Link: /api/ EndConflict
Api to end conflict.
(make sure to add auth-token in the header).
Method: POST
Params: id (conflict id)
Request:

Response:

Send Response on conflict API


Link: /api/ sendResponse
Api to send response on conflict.
(make sure to add auth-token in the header).
Method: POST
Params: id (conflict id), response
Request:

Response:

Retrieve all Responses on conflict API


Link: /api/ retrieveResponse
Api to Retrieve all Responses on conflict API.
(make sure to add auth-token in the header).
Method: POST
Request:
Response:

Retrieve all conflicts for specific user API


Link: /api/ AllUserConflicts
Api to Retrieve all conflicts for specific user API.
(make sure to add auth-token in the header).
Method: GET
Params: id (conflict id)
Request:

Response:

Retrieve cashback API


Link: /api/ returnCashBack
Api to Retrieve CashBack.
(make sure to add auth-token in the header).
Method: GET
Params: amount, method
Request:

Response:

Check Card API


Link: /api/ checkCard
Api to check Card.
(make sure to add auth-token in the header).
Method: POST
Params: card, password
Request:

Response:

Add Balance API


Link: /api/ AddBalance
Api to Add Balance Card.
(make sure to add auth-token in the header).
Method: POST
Params: amount, cashback, allBalance, card, password
Request:

Response:

Add Review API


Link: /api/ AddReview
Api to Add Review.
(make sure to add auth-token in the header).
Method: POST
Params: bill_number, ontime(1-5), recommend(1-5), title(1-5), content, covered,
identical, share.
Request:

Response:

Send Manual Transfer API


Link: /api/ SendManualTransfer
Api to send manual transfer.
(make sure to add auth-token in the header).
Method: POST
Params: account_owner_name, bank_name, account_number, amount,
confirmAmount, purpose, date
Request:

Response:

Send Transfer with photo API


Link: /api/ sendTransferWithPhoto
Api to send transfer with photo.
(make sure to add auth-token in the header).
Method: POST
Params: purpose, photo
Request:

Response:

Return Afflitate Data API


Link: /api/ returnAfflitateData
Api to Return Afflitate Data API.
(make sure to add auth-token in the header).
Method: GET
Request:

Response:

Search With identity num API


Link: /api/ Search
Api to search with identity number API.
(make sure to add auth-token in the header).
Method: POST
Parms: identity_num
Request:

Response:

Transfer Recievable Balance API


Link: /api/ TransferRecievableBalance
Api Transfer Recievable Balance API.
(make sure to add auth-token in the header).
Method: POST
Parms: amount
Request:

Response:

Bank Transfer Withdraw API


Link: /api/ BankTransferWithdraw
Api Bank Transfer Withdraw API
(make sure to add auth-token in the header).
Method: POST
Parms: BankName, accountName, iban, amount, relationship
Request:

Response:

Request Debt API


Link: /api/ RequestDebt
Api to Request Debt.
(make sure to add auth-token in the header).
Method: POST
Parms: amount
Request:

Repsonse:
Pay Debt API
Link: /api/ PayRequired
Api to Pay Debt.
(make sure to add auth-token in the header).
Method: POST
Request:
Response:

Retrieve all Balances API


Link: /api/ returnAllBalance
Api to Retrieve all Balances API
(make sure to add auth-token in the header).
Method: GET
Request:
Response:

Retrieve all Group Balances API


Link: /api/ allGroupBalances
Api To Retrieve all Group Balances.
(make sure to add auth-token in the header).
Method: GET
Request:

Response:

User Participation API


Link: /api/ AddNewPart
Api for user to join from Home interface.
Method: POST
Parms: name(First Name), name2(Last Name), email, mem_package, password,
ship_add_1, ship_add_2, ship_city, ship_postal_code, phone1 , phone2
Request:

Response:

Raghed Kahil new API Routes:

POST: /api/register

You might also like