Abhi Open API
Introduction
Abhi offers a set of APIs to 3rd parties for the purpose of integration to render EWA services to the external platform.
3rd parties system shall integrate Abhi API(s) in its platform to offer the frontend application to its end users. The users will essentially log in to the 3rd party system & the 3rd party system in turn will call Abhi API(s) to render its services.
As part of the one-time onboarding, Abhi team set up the root organization for 3rd parties. This will allow the 3rd party system to create employees under the root organization. Moreover, additional organizations can be created under the root organizations, allowing 3rd party system to create employees under each orgnaization seperately. Users or employees of one organization can not access detail of other organization, however admin shall be able to access all child organizaiton details.
Authentication
Upon successful login, Abhi authenciation system shall generate a JWT token with 24 hours validity. All subsequent API calls must include the provided JWT token in the header to prove the identity and Abhi shall provide the relevant data in response to the APIs.
NOTES:
- By default, multi login is not allowed, therefore in case if a user is already logged in with a valid JWT token, the next successful attempt will invalid earlier token.
- Five consective wrong attempts will lock the user login.
{{token}}
Employee
API reference for Employee endpoints
GET Get All Employees
This is a sample HTTP request along with the response from the API. This request is for the
GET
method on the endpoint
/connect/employees
, with query parameters
page=1
and
limit=10
. The response returned by the API contains information about a single employee, including
- ID: This is a UUID.
- Creation date
- Joining date
- Salary, and personal information like name, CNIC, date of birth, etc.
The response also includes some metadata like the total number of results and the status of the request (
status
,
code
, and
message
).
2010-01-10T10:10:59.409Z
2015-12-31T10:10:59.409Z
johndoe@hotmail.com
846-779-0237
1
John
Doe
10
4220187683175
curl --location 'https://api-dev11.abhi.com.pk/connect/employees?page=1&limit=10'
{
"data": {
"total": 1,
"results": [
{
"id": "39e542ee-ae52-4a57-af31-d97b4b02178c",
"createdAt": "2023-03-08T11:46:03.196Z",
"deletedDate": null,
"employeeCode": null,
"dateOfJoining": "2023-03-06T00:00:00.000Z",
"organizationId": "df35ced3-42a8-4e29-9f03-998772892dff",
"netSalary": "500000",
"updatedAt": "2023-03-08T11:51:37.339Z",
"person": {
"firstName": "John",
"lastName": "Doe",
"cnic": "4210187123176",
"dob": "1970-01-01",
"user": {
"enabled": true,
"username": "john.doe@gmail.com"
}
},
"selectedBankAccount": {
"accountTitle": "John Doe",
"accountNumber": "1231221312312",
"bank": {
"bankName": "Silk Bank"
}
},
"officialEmail": {
"email": "john.doe@gmail.com"
},
"organization": {
"name": "Acme"
},
"limit": 50
}
]
},
"message": "Success",
"status": "success",
"code": 200
}