Get an access token
To get an access token
1. Log in to the Attnd with your Attnd admin account
2. After successfull login select Access Token menu from Left menu bar
3. For Generate Token Please provide token name click CREATE TOKEN Button
4. After successfully generating token you can see like below screen

5. Now you can use this token by copy
Make REST API calls
In REST API calls, include the URL to the API service for the environment:
- Live: https://attndapi.trillionbitsportal.com/api/Attnd/
Also, include your access token to prove your identity and access protected resources.
This sample call, includes a bearer token in the Authorization request header. This type of token lets you complete an action on behalf of a resource owner.
To get Today Attendance Feed
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd/AttendanceApi/GetAttendanceFeed
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
{
"EmployeeList":
[
{
"Id": 1,
"UserId": "082b078b-13c2-4g54-ad28-b3abfad59416",
"AttendanceDate": "2021-01-30T16:38:28.33",
"CheckInTime": null,
"CheckOutTime": null,
"IsLeave": null,
"DesignationName": "Team leader",
"LessTimeReason": "",
"DailyWorkingTimeInMin": null,
"AllowOfficeLessTimeInMin": null,
"CompanyId": 21,
"EmployeeId": 8106,
"EmployeeName": "tyr",
"PhoneNumber": "528741305688",
"Designation": null,
"DepartmentName": "Sugary",
"IsAutoCheckPoint": null,
"AutoCheckPointTime": "",
"NowTime": "2021-01-30T09:38:28.3805707Z",
"TimeZoneName": "SE Asia Standard Time",
"AttendanceDateVw": "30-Jan-2021",
"AttendancceDayName": "Sat",
"AttendancceDayNumber": "30",
"CheckInTimeVw": "",
"CheckOutTimeVw": "",
"OfficeStayHour": "",
"IsCheckedIn": false,
"IsPresent": false,
"IsCheckedOut": false,
"NotCheckedOut": false,
"NotAttend": true,
"ImageFileName": "",
"Status": "Absent",
"TotalStayTimeInMinute": 0,
"GeoLatitude": 0.0000000000,
"GeoLongitude": 0.0000000000,
"GeoRadious": 0,
"IsGeoFencing": false,
"OfficeStartTime": "23:05",
"OfficeEndTime": "20:30",
"OfficeLateInTime": "",
"CheckinEnableTime": "",
"CheckinDisableTime": "",
"IsEarly": null,
"IsLate": null,
"LateComment": "",
"EarlyComment": ""
},
{
"Id": 2,
"UserId": "81fcc2d6-a30f-4b56-a3ty-7dc7af95bafc",
"AttendanceDate": "2021-01-30T16:38:28.33",
"CheckInTime": null,
"CheckOutTime": null,
"IsLeave": null,
"DesignationName": "Team lead1",
"LessTimeReason": "",
"DailyWorkingTimeInMin": null,
"AllowOfficeLessTimeInMin": null,
"CompanyId": 21,
"EmployeeId": 8114,
"EmployeeName": "udgh",
"PhoneNumber": "01713421086",
"Designation": null,
"DepartmentName": "Management",
"IsAutoCheckPoint": null,
"AutoCheckPointTime": "",
"NowTime": "2021-01-30T09:38:28.3805707Z",
"TimeZoneName": "SE Asia Standard Time",
"AttendanceDateVw": "30-Jan-2021",
"AttendancceDayName": "Sat",
"AttendancceDayNumber": "30",
"CheckInTimeVw": "",
"CheckOutTimeVw": "",
"OfficeStayHour": "",
"IsCheckedIn": false,
"IsPresent": false,
"IsCheckedOut": false,
"NotCheckedOut": false,
"NotAttend": true,
"ImageFileName": "",
"Status": "Absent",
"TotalStayTimeInMinute": 0,
"GeoLatitude": 0.0000000000,
"GeoLongitude": 0.0000000000,
"GeoRadious": 0,
"IsGeoFencing": false,
"OfficeStartTime": "23:05",
"OfficeEndTime": "20:30",
"OfficeLateInTime": "",
"CheckinEnableTime": "",
"CheckinDisableTime": "",
"IsEarly": null,
"IsLate": null,
"LateComment": "",
"EarlyComment": ""
},
],
"StatusCount": {
"TotalEmployee": 33,
"TotalCheckIn": 0,
"TotalCheckOut": 0,
"TotalNotAttend": 33
}
}
To Create Department
curl -v -X POST https://attndapi.trillionbitsportal.com/api/Attnd/DepartmentApi/Save
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d
{
"DepartmentName":"Test"
}
The response shows the status and other details:
{
"Id": 30,
"CompanyId": 3,
"DepartmentName": "Test",
"UserId": null
}
To get Department
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd/DepartmentApi/GetDepartment
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
[
{
"Id": 1,
"CompanyId": 1,
"DepartmentName": "",
"UserId": null
},
{
"Id": 2,
"CompanyId": 2,
"DepartmentName": "",
"UserId": null
},
]
To Create Designation
curl -v -X POST https://attndapi.trillionbitsportal.com/api/Attnd/DesignationApi/Save
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d
{
"DesignationName":"Test Designation"
}
The response shows the status and other details:
{
"Id": 13,
"CompanyId": 3,
"DesignationName": "Test Designation",
"UserId": null
}
To get Designation
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd/DesignationApi/GetDesignationByCompanyId
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
[
{
"Id": 1,
"CompanyId": 1,
"DesignationName": "",
"UserId": null
},
{
"Id": 2,
"CompanyId": 2,
"DesignationName": "",
"UserId": null
},
]
To Create Employee
curl -v -X POST https://attndapi.trillionbitsportal.com/api/Attnd/EmployeeApi/CreateEmployee
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d
{
"UserFullName": "Rajib Ahmed",
"PhoneNumber": "01760024544",
"UserType": 7,
"DepartmentId": 2,
"DesignationId": 5,
"Gender": "male",
"Email": "Rajb394@gmail.com",
"IsAutoCheckPoint": false,
"AutoCheckPointTime": false,
"MaximumOfficeHours": "8.00",
"OfficeEarlyOutTime": "5.00",
"IsActive": true,
"IsGeoFencing":false,
"GeoLongitude": "0.00000000",
"GeoLatitude": "0.0000000",
"GeoRadious": "0",
"Nickname": "Saboj",
"DateOfBirth": "31/01/2000",
"DateOfJoin": "31/01/2021",
"SquadNumber": null,
"IDNo": "1234566746",
"TeamName": "Green",
"Title": "Mr",
"UserPassword":"123456"
}
The response shows the status and other details:
{
"Success": true,
"Message": "123456"
}
To get Employee
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd/EmployeeApi/GetEmployee
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
[
{
"Id": 1,
"UserId": "ada63fa1-1d99-ab3i-beb8-b43a2619ee3a",
"Title": "Mr",
"Nickname": "Amin",
"DateOfBirth": null,
"DateOfJoin": "2021-01-05T00:00:00",
"SquadNumber": "1992-01-05T00:00:00",
"DesignationName": "Team leader",
"IDNo": "em-2365",
"TeamName": "",
"UserName": "abc",
"PhoneNumber": "016758426788",
"MaximumOfficeHours": null,
"CompanyId": 21,
"DesignationId": 10,
"DepartmentId": 39,
"DepartmentName": "Management",
"IsAutoCheckPoint": true,
"AutoCheckPointTime": "1:00:00",
"ImageFileId": "",
"ImageFileName": "",
"IsActive": true,
"Email": "Sharifmia236@gmail.com ",
"IsGeoFencing": false,
"GeoLatitude": 0.0000000000,
"GeoLongitude": 0.0000000000,
"GeoRadious": 0,
"Gender": "male"
},
]
To get Leave
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd/LeaveApi/GetLeave
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
[
{
"Id": 1,
"CompanyId": 1,
"EmployeeId": 49,
"EmployeeName": "Abul Hasan",
"FromDate": "2021-01-12T18:58:08",
"ToDate": "2021-01-12T18:58:08",
"IsHalfDay": false,
"LeaveTypeId": 1,
"AllocatedLeave": 19,
"LeaveReason": "Dud6",
"CreatedAt": "12/01/2021 6:58:18 PM",
"IsApproved": false,
"IsRejected": false,
"RejectReason": null,
"ApprovedById": "",
"ApprovedAt": null,
"ApprovedBy": "",
"LeaveApplyFrom": null,
"LeaveApplyTo": null,
"UserId": "dd49edb6-52e5-4e40-a0b9-d4f9e73cf846",
"LeaveType": "Casual Leave",
"LeaveInDays": 1,
"FromDateVw": "12-Jan-2021",
"ApprovedAtVw": "",
"ToDateVw": "12-Jan-2021"
},
]
To get Attendance Month wise
curl -v -X GET https://attndapi.trillionbitsportal.com/api/Attnd//AttendanceApi/GetAllEmployeeAttendanceWithMonth?month=January&year=2021
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
The response shows the status and other details:
[
{
"UserId": "dd49edb6-52e5-4r40-a0b9-d4f9e73cf846",
"EmployeeName": "Abul Hasan",
"DesignationName": "Team Lead",
"DepartmentName": "Development",
"ImageFileName": "10376e9e-4855-ba6a-6b08274bbeda.jpg",
"TotalPresent": 22,
"TotalCheckedOutMissing": 5,
"TotalStayTime": "166:15",
"TotalOfficeHour": "176:0",
"OvertimeOrDueHour": "-9:-45",
"TotalLate": 21,
"TotalEarly": 17,
"TotalLeave": 0,
"TotalScore": 0.0,
"IsEarly": null,
"IsLate": null,
"LateComment": null,
"EarlyComment": null
},
{
"UserId": "675d79db-39bf-8af8-171d6b694a4d",
"EmployeeName": "Amin Sharif",
"DesignationName": "Sr. Software Eng",
"DepartmentName": "Development",
"ImageFileName": "0d60b1b1-e5e0-463f-d477a8f8bdd4.jpg",
"TotalPresent": 25,
"TotalCheckedOutMissing": 2,
"TotalStayTime": "220:18",
"TotalOfficeHour": "200:0",
"OvertimeOrDueHour": "20:18",
"TotalLate": 3,
"TotalEarly": 23,
"TotalLeave": 0,
"TotalScore": 0.0,
"IsEarly": null,
"IsLate": null,
"LateComment": null,
"EarlyComment": null
},
]