Get Access Token
• Request URL :
https://api.truein.com/connect/token
• Note :
| Content-Type required | string application/json |
Get Access Token
| access_key_id | string ACCESS KEY ID |
| secret_access_key | string SECRET ACCESS KEY |
| grant_type | string Access Token Grant Type |
{- "access_key_id": "XXXXXXXXXXX",
- "secret_access_key": "XXXXXXXXXXXXXXXXXXXXXX",
- "grant_type": "client_credentials"
}{- "response": "Success",
- "code": "200",
- "message": "Success",
- "data": [
- {
- "access_token": "",
- "token_type": "Bearer",
- "expires_in": "3600"
}
]
}Returns Clock In / Clock Out punches for all staff — one record per punch pair (an In punch and, once completed, its matching Out punch). Paginated at 1000 records per call.
• How to use :
-For the first API call send 0 in lastUid parameter then you will get the first 1000 records.
-For next API call send uid of last record of previous call in lastUid parameter and so on, until an empty data array is returned.
-lastUid and the date filters apply together, not either/or. To page through a date range, send from_date/to_date on every call and advance lastUid each time.
• Note :
Sending lastUid=0 with no from_date/to_date returns today's punches only, not the full history. Send an explicit date range to backfill.
The date filters match the punch's Clock In time, so a punch belongs to the day it started — an overnight shift clocking in 01-Jan 22:00 and out 02-Jan 06:00 is returned for 01-Jan. For the same reason, a punch edited or regularized later is not re-sent by a date-range query.
uid follows creation order, not punch time — a backdated punch created today gets a high uid and appears last despite an old inTime.
Rate limit - 1 request per 40 seconds for the same endpoint and key.
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/inOutDtls?lastUid=0
-Sub-Status description - PND - Pending Approval, AUTO - Auto Attendance, MIO - Multiple In-Out, REG - Regularized attendance, LATE - Late Arrival, HPR - Half Present, HLV(leave code) - Half Day Leave (e.g. HLV(CL) = Half-day Casual Leave), HRLV(leave code) - Half Day Restricted Leave, POW - Present On Weekly Off, POH - Present On Public Holiday, FO - Forgot Out, GEO-OUT - Auto Clock-Out via Geofence, ERL - Early Leave, ODV - On Duty Visit.
| lastUid required | string Pagination cursor. Send 0 on the first call, then the |
| from_date | string Start of the punch window, format YYYY-MM-DD (inclusive). This filters on the Clock In time of the punch — not the attendance date. A punch therefore belongs to the day it STARTED: an overnight shift beginning 01-Jan 22:00 is returned for 01-Jan even though it ends on 02-Jan. Because the filter is the punch time, a punch that is edited or regularized later will NOT reappear in a date-range query. Must not be older than 2 years. When empty, records will be fetched based on lastUid When populated, records will be fetched from the date set in from_date. |
| to_date | string End of the punch window, format YYYY-MM-DD (inclusive). Like |
| emp_id | string Employee ID. Accepts multiple values, comma-separated, to fetch several employees in one call.
Do not put spaces after the commas — values are matched exactly, so |
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
{- "response": "Success",
- "code": "200",
- "message": "Success",
- "data": [
- {
- "uid": "2",
- "name": "Santos Sherman",
- "empId": "3",
- "mobile": "6544145263",
- "email": "Santos@truein.com",
- "inTime": "2018-06-23 11:58:22",
- "inPicUrl": "In Photo URL",
- "outTime": "0000-00-00 00:00:00",
- "outPicUrl": "Out Photo URL",
- "inLocation": "Wakad, Pune, Maharashtra 411057, India",
- "outLocation": "HQ Geofence - Pune Office",
- "timespent": "180",
- "status": "In",
- "subStatus": "HPR",
- "in_device": "Main Gate Device",
- "out_device": "Main Gate Device",
- "site_name": "Truein Test",
- "timezone": "Asia/Kolkata",
- "timezone_hrs": "+05:30",
- "siteCode": "ST1188",
- "attndSiteCode": "ST1188",
- "jobCode": "JOB01",
- "jobName": "JOB01"
}
]
}Returns the full daily attendance log for staff — one record per employee per day, including multiple in-outs, total time, OT, half day and late mark. Covers a single date only; there is no date-range option, so call once per day you need.
• How to use :
-Send the date you need. All matching records are returned in one response — no pagination loop is required.
-lastUid and moreRows are retained for backward compatibility only. Send lastUid=0, and do not use moreRows to decide whether to make another call.
• Note :
For most accounts date matches a record if any of these fall on that date - the attendance date, the Clock In time, or the date the record was created, last modified, or approved/rejected. The response therefore behaves partly like a "changed on this date" feed - a query for 12-Aug can also return an older attendance day that was regularized on 12-Aug. Always read attendanceDate from each record rather than assuming it matches your input. Contact Truein support if you need strict attendance-date matching enabled for your account; it cannot be switched on from the request.
All duration fields (workedHrs, regularHrs, breakHrs, paidBreakHrs, payableHrs, ot, timeSpent, lateBy) are returned in minutes despite the Hrs naming — "workedHrs": "480" means 8 hours.
If the In/Out punch is inside a configured geolocation in Truein, inLocation/outLocation returns the geofence location name (Example: HQ Geofence - Pune Office). If it is not inside a configured geolocation, the captured location address is sent in response (Example: Wakad, Pune, Maharashtra 411057, India). If no location was captured, - is sent.
Attendance Status description - PR - Present, PL - Present Late, AB - Absent, AL - Approved Leave, LWP - Leave Without Pay, FO - Forgot to Punch Out, HD - Half Day, PH - Public Holiday, POH - Present on Public Holiday, WO - Weekly Off, POW - Present on Weekly Off, PND - Pending Attendance, RJT - Rejected Attendance
Sub-Status description - PND - Pending Approval, AUTO - Auto Attendance, MIO - Multiple In-Out, REG - Regularized attendance, LATE - Late Arrival, HPR - Half Present, HLV(leave code) - Half Day Leave (e.g. HLV(CL) = Half-day Casual Leave), HRLV(leave code) - Half Day Restricted Leave, POW - Present On Weekly Off, POH - Present On Public Holiday, FO - Forgot Out, GEO-OUT - Auto Clock-Out via Geofence, ERL - Early Leave, ODV - On Duty Visit.
newAttendanceStatus description - PR - Present, AB - Absent, LV - Approved Leave, WO - Weekly Off, PH - Public Holiday.
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/dailyAttendanceLog?date=2020-07-31&lastUid=0
| date required | string The single date to fetch, format YYYY-MM-DD. Only one date is supported — a comma-separated list is not accepted and returns no records. Defaults to today when empty, but always send it explicitly. See Note 1 above for what this value matches. |
| lastUid required | string Retained for backward compatibility. Send 0 — all records for the date are returned in a single response, so no pagination loop is needed. |
| emp_id | string Employee ID. Restricts the response to a single employee. (Optional) |
| include_absent | string Send 1 to include absent staff details, otherwise send 0. Defaults to 1 when omitted. (Optional) |
| site_name | string In case of multiple sites under one account, if you require site specific attendance logs then provide specific site names. Note - This field is case-sensitive, provide exact site name. In case of single site accounts or if you require account level attendance log, keep this field as empty |
| show_attnd_before_transfer | integer When site_name is passed, the API returns attendance data only for that site. If show_attnd_before_transfer is set to 1, the API also includes attendance records from other sites where the staff had attendance before being transferred to the specified site_name. This will work only if the site name is passed in the site_name. |
| category | string Filter by staff category. Accepts multiple values, comma-separated. (Optional) |
| site_group_name | string Filter by site group name. Accepts multiple values, comma-separated. Returns only employees whose site belongs to these groups. Names must match exactly; if none of the supplied names resolve to a site group, the call fails with "Invalid Site Group Name". (Optional) |
| attendanceStatus | string Filter by attendance status. Accepts multiple values, comma-separated. Allowed values - AB, WO, PH, LV, PR. Each value also covers its related statuses (for example WO also returns POW, PH also returns POH, PR also returns HD). Note that using this filter excludes absent staff unless AB is one of the values. (Optional) |
| staffType | string Filter by employee type, for example Permanent or Contract. Accepts multiple values, comma-separated. (Optional) |
| has_jobcode | string Send 1 to return only records that have a job assigned. Absent staff are excluded when this is set. Defaults to 0. (Optional) |
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
{- "response": "Success",
- "code": "200",
- "message": "Success",
- "moreRows": 0,
- "lastUid": "0",
- "data": [
- {
- "name": "Santos Sherman",
- "emp_id": "TR0003",
- "empBaseSite": "Demo Company",
- "siteCode": "ST4157",
- "department": "Technology",
- "designation": "Module Lead",
- "lastWorkingDay": "",
- "joiningDate": "2018-06-01",
- "category": "Worker",
- "costCenter": "ABC",
- "attendanceDate": "2018-06-22",
- "firstInTime": "2018-06-22 09:50:22",
- "firstInTimePic": "First In Photo URL",
- "lastOutTime": "2018-06-22 20:56:57",
- "lastOutTimePic": "Last In Photo URL",
- "timeSpent": "520",
- "workedHrs": "520",
- "regularHrs": "480",
- "breakHrs": "30",
- "paidBreakHrs": "15",
- "payableHrs": "505",
- "status": "Out",
- "attendanceStatus": "PR",
- "newAttendanceStatus": "PR",
- "subStatus": "AUTO,MIO",
- "isLate": "1",
- "lateBy": "10",
- "ot": "120",
- "halfDay": "0",
- "company": "",
- "jobCodes": "YO234",
- "shiftCodes": "FIR",
- "approvalStatus": "Rejected",
- "contractorName": "ABC Company",
- "inOuts": [
- {
- "inTime": "2018-06-22 09:50:22",
- "inPic": "In Photo URL",
- "inLocation": "Wakad, Pune, Maharashtra 411057, India",
- "outTime": "2018-06-22 20:56:57",
- "outPic": "In Photo URL",
- "outLocation": "HQ Geofence - Pune Office",
- "jobCode": "YO234",
- "jobType": "G",
- "jobDescription": "DSP/PRJ/230067\\n\\n",
- "costCenter": "",
- "timeSpent": "240",
- "companyCode": "AEO24",
- "attendanceSite": "Demo Company",
- "attendanceSiteCode": "ST4157"
}
], - "attendanceSite": "Demo Company",
- "attendanceSiteCode": "ST4157",
- "inDevice": "Main Gate Device",
- "outDevice": "Main Gate Device",
- "payrate_details": {
- "total_earning": "100.0",
- "total_deduction": "10.0",
- "net_pay": "90.0"
}
}
]
}Returns a per-employee attendance summary for a date range — worked hours, overtime, and day counts such as present, leave, weekly off and absent days. One record per employee.
• Note :
Always send siteCode on a multi-site account. Omitting it is not an "all sites" mode - attendance for every site is returned, but the site-level settings used to calculate the figures (hours-per-man-day threshold, overtime configuration) are taken from one arbitrary site. That produces incorrect man_days, can omit the overtime breakdown fields entirely, and may exclude some employees. Fetch your site codes from getClientSites and call this endpoint once per site. Single-site accounts are unaffected.
No parameter is rejected as missing, but fromDate and toDate both default to today, so a call with no parameters returns a single day. The range must not exceed 31 days (inclusive of both dates), and fromDate must not be later than toDate.
All *_hours fields are returned as H:mm strings, not decimals - "7:30" means 7 hours 30 minutes, not 7.5. Do not parse them as numbers. man_days is the only decimal value.
• Request URL :
| siteCode | string Example: siteCode=ABC1234 Site code of the site whose timesheet data you need. Optional, but treat it as required if your account has more than one site (see Note 1 above).
Fetch valid site codes from |
| empId | string Employee ID. Restricts the response to a single employee; only one value is supported. (Optional) |
| includeAbsent | string Send 1 to return a complete roster. This does two things - it includes employees who have no attendance records at all in the range, and it stops employees with zero payable days from being dropped from the response.
Defaults to 0, which omits both groups. Note that employees with no attendance are still excluded when |
| fromDate | string Start date of the range, format YYYY-MM-DD (inclusive). Defaults to today. Filters on the attendance date — the date the work belongs to — not the date the record was created or last modified. There is no "modified since" option on this endpoint, so incremental syncing is not supported; re-request the date range instead. (Optional) |
| toDate | string End date of the range, format YYYY-MM-DD (inclusive). Defaults to today. The range must not exceed 31 days counting both endpoints, otherwise the call fails with "invalid input, date range should not be more than 31 days". (Optional) |
| category | string Filter by staff category. Accepts multiple values, comma-separated. (Optional) |
| includeLeaveBifurcation | string Send flag as 1 to include leave-type-wise counts along with the total leave count. Default is 0. When flag is set to 1, the response will also contain leave-type-wise fields named as leave code without spaces followed by "_leave" (for example, a leave code "CL" will appear as "CL_leave") |
| includeJobWiseSummary | string Send flag as 1 to include a "job_wise_summary" array in each employee object with per-job attendance breakup. Default is 0. |
| jobCode | string Filter the "job_wise_summary" array to one or more job codes (comma-separated, e.g. "JOB-A,JOB-B").
Only takes effect when |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "message": "Success",
- "data": [
- {
- "name": "Jack Jones",
- "emp_id": "ABD2349",
- "worked_hours": "7:30",
- "regular_hours": "7:00",
- "overtime_hours": "0:30",
- "paid_hours": "7:30",
- "present_days": 0,
- "leave_days": 0,
- "weekly_off_days": 0,
- "holiday_days": 0,
- "weekly_off_holiday_overlap": 0,
- "absent_days": 0,
- "short_hours": "0:45",
- "payable_days": 0,
- "man_days": 0,
- "company": 0,
- "staff_unique_id": 0,
- "effectiveStartDate": "2025-05-22",
- "effectiveEndDate": "2025-05-22",
- "sub_division": "",
- "category": "",
- "department": "",
- "designation": "",
- "emp_type": "Permanent",
- "last_working_day": "2025-05-22",
- "contractor": "HRX Welders",
- "worked_on_weekly_off": 0,
- "worked_on_holiday": 0,
- "overtime_on_reg_days": "5:00",
- "overtime_on_weekly_off": "0",
- "overtime_on_holiday": "0",
- "worked_hours_on_reg_days": "8:00",
- "worked_hours_on_weekly_off": "0",
- "worked_hours_on_holiday": "0",
- "job_wise_summary": [
- {
- "job_name": "Welding",
- "job_code": "WLD-001",
- "worked_hours": "40:00",
- "regular_hours": "36:00",
- "overtime_hours": "4:00",
- "paid_hours": "40:00",
- "present_days": 5,
- "leave_days": 0,
- "weekly_off_days": 1,
- "holiday_days": 0,
- "weekly_off_holiday_overlap": 0,
- "absent_days": 0,
- "payable_days": 6,
- "man_days": 5.33,
- "worked_on_weekly_off": 0,
- "worked_on_holiday": 0,
- "overtime_on_reg_days": "5:00",
- "overtime_on_weekly_off": "0",
- "overtime_on_holiday": "0",
- "worked_hours_on_reg_days": "8:00",
- "worked_hours_on_weekly_off": "0",
- "worked_hours_on_holiday": "0",
- "total_od_days": 2,
- "CL_leave": 1
}
]
}
]
}Returns one record per punch — a Clock In and its matching Clock Out arrive as two separate records, unlike inOutDtls which returns one record per punch pair. Use this endpoint when your system needs punch-level events rather than consolidated pairs. Paginated at 500 punch pairs per call, so a single response can contain up to 1000 punch records.
• How to use :
-For the first API call send 0 in lastUid parameter, then you will get the first page.
-For the next API call send the uid of the last record from the previous response in lastUid, and so on, until an empty punches array is returned.
-lastUid and the time filters apply together, not either/or. To page through a time window, send from_time/to_time on every call and advance lastUid each time.
-Sending from_time/to_time without lastUid re-reads the whole window from the start and returns the latest stored values for every punch in it. This is the way to pick up corrections — see Note 4.
• Note :
Each punch carries a uid that is unique to that punch and never changes, including after the punch is edited. Store it against the punch in your own database and match on it when saving, so a punch you receive again updates the existing row instead of creating a duplicate.
A Clock In is delivered as soon as it happens, without waiting for the matching Clock Out. Once the employee clocks out, the next call returns only the new Clock Out record — the Clock In you already received is never repeated.
Each punch is filtered on its own timestamp. An overnight shift clocking in 01-Jan 22:00 and out 02-Jan 06:00 therefore returns the Clock In when you query 01-Jan and the Clock Out when you query 02-Jan. The two halves of one pair can arrive in different calls — this is expected.
Corrections are not pushed. If a punch time is regularized after you have already received that punch, a cursor-based call will not re-send it. To pick up corrections, periodically re-request a recent window without lastUid; that returns the latest stored values for every punch in the window.
from_time and to_time require a full timestamp including the time component. A bare date such as 2026-08-01 is rejected — send 2026-08-01 00:00:00.
The window must not exceed 31 days. If only one of from_time/to_time is sent, the other is derived automatically to keep the window at 31 days. Sending neither returns punches by cursor alone, unbounded by time.
from_time must not be older than 2 years.
On a Break record the direction is reported from the employee's point of view: leaving for the break is returned with status = Out, and returning from it with status = In.
• Request URL :
https://api.truein.com/ext/v1/time-tracking/getPunchLog?lastUid=0
-Punch Type description - Regular - a normal Clock In / Clock Out punch, Break - a break punch (see Note 8), Auto Out - the punch pair was closed automatically by the system rather than by the employee.
| lastUid | string Pagination cursor. Send 0 on the first call, then the |
| from_time | string Example: from_time=2026-08-01 00:00:00 Start of the punch window, format YYYY-MM-DD HH:mm:ss (inclusive). A bare date without a time is rejected with "invalid input, valid date not found."
Each punch is matched on its own timestamp, so the Clock In and Clock Out of one pair can fall into different windows (see Note 2).
Must not be older than 2 years. When sent without |
| to_time | string Example: to_time=2026-08-31 23:59:59 End of the punch window, format YYYY-MM-DD HH:mm:ss (inclusive). A bare date without a time is rejected.
To cover a whole day send |
| emp_id | string Employee ID. Restricts the response to a single employee; only one value is supported. The Employee ID must exist for your account, otherwise the call fails with "invalid input, Employee ID not found". Deactivated and departed employees are accepted and still return their historical punches. (Optional) |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Success",
- "data": {
- "punches": [
- {
- "uid": "2000",
- "name": "Santos Sherman",
- "empId": "3",
- "mobile": "6544145263",
- "email": "Santos@truein.com",
- "punchType": "Regular",
- "punchTime": "2026-08-25 09:00:00",
- "status": "In",
- "picUrl": "Punch Photo URL",
- "device": "Kiosk A",
- "site_name": "Truein Lab India",
- "timezone": "Asia/Kolkata",
- "timezone_hrs": "05:30",
- "siteCode": "ST009",
- "attndSiteCode": "ST010"
}
], - "lastUid": "2001",
- "moreRows": false
}
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Mark Clock In
| siteCode | string Enter Site Code of the site where you want to Mark Clock In punch. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. | ||||
| empId | string Employee Id. | ||||
| inTime | string Clock In Time, Format(YYYY-MM-DD HH:mm:ss) | ||||
| staffPic | string Base64 String of the employee photo. (Optional) | ||||
object | |||||
| |||||
| jobCode | string Job Code. (Optional) | ||||
{- "siteCode": "ABC1234",
- "empId": "1234",
- "inTime": "2024-01-01 10:00:00",
- "staffPic": "",
- "coordinates": {
- "latitude": "49.123456",
- "longitude": "49.123456"
}, - "jobCode": "JOB123"
}{- "response": "Success",
- "code": "200",
- "message": "Success",
- "data": [ ]
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Mark Clock Out
| siteCode | string Enter Site Code of the site where you want to Mark Clock Out punch. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. | ||||
| empId | string Employee Id. | ||||
| outTime | string Clock Out Time, Format(YYYY-MM-DD HH:mm:ss) | ||||
| staffPic | string Base64 String of the employee photo. (Optional) | ||||
object | |||||
| |||||
| jobCode | string Job Code. (Optional) | ||||
{- "siteCode": "ABC1234",
- "empId": "1234",
- "outTime": "2024-01-01 10:00:00",
- "staffPic": "",
- "coordinates": {
- "latitude": "49.123456",
- "longitude": "49.123456"
}, - "jobCode": "JOB123"
}{- "response": "Success",
- "code": "200",
- "message": "Success",
- "data": [ ]
}Regularize Attendance Data
• Request URL :
https://api.truein.com/ext/v1/time-tracking/updateAttendance
• Partial time updates :
You can update In Time and Out Time independently. Populate only inTime (leave outTime empty) to update the In Time alone; populate only outTime (leave inTime empty) to update the Out Time alone. Populate both to update both.
An In-only update creates a new attendance record if none exists for the date. An Out-only update requires an existing open (not yet clocked out) record for the date; otherwise it fails."
• Attendance photo :
Send inTimePic on an In-only update or outTimePic on an Out-only update to attach an attendance photo (base64, max 5 MB decoded). Photos are honored only on a partial (In-only or Out-only) non-timeSplit request and are ignored on a both-times or timeSplit request.
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Regularize Attendance
| siteCode | string Enter Site Code of the site where you want to Mark Clock Out punch. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. | ||||||||||
| empId | string Employee Id. | ||||||||||
| attendanceDate | string Date of the attendance which needs to be regularized - Format(YYYY-MM-DD). | ||||||||||
| inTime | string Clock In Time, Format(YYYY-MM-DD HH:mm:ss), populate this field to update In Time. Populate inTime only (leave outTime empty) to update the In Time alone. | ||||||||||
| outTime | string Clock Out Time, Format(YYYY-MM-DD HH:mm:ss), populate this field to update Out Time. Populate outTime only (leave inTime empty) to update the Out Time alone. | ||||||||||
| comment | string Admins Remark on the regularization (Optional) | ||||||||||
| workedHrs | string Worked Hrs in Minutes, populate this field to update worked hours | ||||||||||
| overtime | string Overtime in Minutes, populate this field to update overtime | ||||||||||
| breakTime | string Unpaid Break in Minutes, populate this field to update Unpaid Break Time | ||||||||||
| paidBreakTime | string Paid Break in Minutes, populate this field to update Paid Break Time | ||||||||||
| inTimePic | string Base64 attendance photo for an In Time only update (populate inTime, leave outTime empty). | ||||||||||
| outTimePic | string Base64 attendance photo for an Out Time only update (populate outTime, leave inTime empty). | ||||||||||
Array of objects Populate this only if you need to create multiple punches | |||||||||||
Array
| |||||||||||
{- "siteCode": "ABC1234",
- "empId": "1234",
- "attendanceDate": "2024-06-01",
- "inTime": "2024-01-01 10:00:00",
- "outTime": "2024-01-01 10:00:00",
- "comment": "",
- "workedHrs": "230",
- "overtime": "60",
- "breakTime": "10",
- "paidBreakTime": "15",
- "inTimePic": "iVBORw0KGgoAAAANSUhEUgAA...",
- "outTimePic": "iVBORw0KGgoAAAANSUhEUgAA...",
- "timeSplit": [
- {
- "start_time": "2024-06-01 09:03:00",
- "end_time": "2024-06-01 17:23:00",
- "punch_type": "work",
- "job_code": "JCD0034",
- "break_time_type": "Snacks"
}
]
}{- "code": 200,
- "message": "Successfully Regularized!",
- "data": [ ]
}Add new staff in Truein
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/addEmployeeDtls
• Note :
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
Add new staff
| empId | string Employee Id. If empty, system will generate a numeric employee id. |
| emp_type | string Permanent/Contract |
| name | string Employee name |
| first_name | string Employee first name |
| last_name | string Employee last name |
| gender | string M/F |
| mobile | string If Truein User app access is required then Mobile is Mandatory. |
string Employee email id | |
| baseline_pic | string Base64 encoded binary data of the image. |
| dob | string Employees date of birth. Format (YYYY-MM-DD). |
| blood_group | string Employees Blood Group |
| id_type | string Driving License/Other |
| id_number | string ID number |
| middle_name | string Middle name |
| address | string Current Address |
| joining_date | string Joining Date. Format (YYYY-MM-DD). |
| valid_until_date | string Contract valid until date. Format (YYYY-MM-DD). |
| designation | string Designation |
| category | string Category |
| department | string Department |
| is_manager | string 0 - Employee is not a Manager. 1 - Employee can be added as a Manager. |
| siteName | string Employees Base Site Name. Note - This field will be case-sensitive. |
| contractor | string Employees Contractor. Note - Provide any one contractor name from the list defined on your site. |
| staffFunction | string Staff Function. Note - Provide any one staff function from the list defined on your site. |
| siteCode | string Enter Site Code of the site where you want to transfer the employee otherwise keep it blank. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. |
| geofencingLocation | string Geofencing Location. Note - Provide one or multiple comma separated geofencing locations from the list defined on your site,Leave this value blank to allow staff to mark attendance from any location. |
| userAppAccess | string Grant Truein User App Access. 0 -> No, 1 -> Yes. |
| userAppAttendance | string Grant Truein User App Attendance Access. 0 -> No, 1 -> Yes. |
| disableFaceRecognition | string Disable face recognition at the time of attendance. 0 -> No, 1 -> Yes. |
| division | string Division Field |
| marital_status | string Marital Status of the Employee |
| country | string Country Field |
| state | string State Field |
| city | string City Field |
| qualification | string Highest level of qualification of the employee |
| last_working_day | string Last working day of the employee |
| status | string Accepted value (active or deactive) |
| manager_emp_id | string If the manager's employee ID does not have access to the client, it will be granted as additional site access. |
| payrateName | string Payrate Name |
| allowActivityPunch | string Allow Activity Punch. 0 -> No, 1 -> Yes. |
| sitePoint | string Site Point |
| additionalSites | string Additional sites |
| attendance_exception | string Auto attendance setting. 0 - Off. 1 - Both auto clock in and out. 2 - Auto clock in only. 3 - Auto clock out only. |
| nationality | string Nationality of the employee |
| l1_manager_emp_id | string If the L1 manager's employee ID does not have access to the site, it will be granted as additional site access. |
| l2_manager_emp_id | string L2 Manager's Employee Id |
| role | string Staff Role |
| extra_hours_type | string Extra hours type can be ot, comp_off or na |
| extra_hours_approval | string Extra hours approval can be pre or post |
| staff_function | string staff function of the employee. |
| title | string Title of the employee |
| regional_name | string Regional name of the employee. |
| probation_end_date | string Probation end date of the employee. |
| staff_unique_id | string Unique staff id for the employee. |
| grade | string Grade of the employee. |
| sector | string Sector of the employee. |
| company | string company of the employee. |
| skipValidation | string 0 - does not skips validations for invalid fields set to default. 1 - skips the validations for invalid fields while creating staff. |
| is_allot_leave | string 0 - does not allot any leaves based on the leave category. 1 - by default, allot the leaves based on the leave category. |
| allow_apply_leave | string 0 - does not allow employee to apply for leaves. 1 - by default, allows the employee to apply for leaves. |
| web_dashb_access | string 0 - by default does not allow user to access web-dashboard. 1 - allows user to access the web-dashboard |
| sub_division | string hierarchy-based classification of employee. |
| publish_to_payroll | string 0 - by default. 1 - on notice period. |
| resignation_date | string Resignation Date. Format (YYYY-MM-DD). |
| dept_code | string Department Code. |
| allow_activity_timesheet | string 1 - by default allows employee to fill activity timesheet. 0 - does not allow employee to fill activity timesheet. |
| work_hour_config | string Worked hours calculation method for the employee. 0 - by default uses the organization's configured method for the site. 1 - overrides it with the other method (if the site is set to First In - Last Out, the employee uses Multi Punch, and vice versa). |
| shift_code | string Shift code assigned to the employee. |
{- "empId": "TR001",
- "emp_type": "Permanent",
- "name": "James Anderson",
- "first_name": "James",
- "last_name": "Anderson",
- "gender": "M",
- "mobile": "6524152365",
- "email": "jamesanderson@truein.com",
- "baseline_pic": "",
- "dob": "1996-07-31",
- "blood_group": "B+",
- "id_type": "Driving License",
- "id_number": "USDR11455E",
- "middle_name": "David",
- "address": "Charlotte, NC 28208",
- "joining_date": "2023-01-01",
- "valid_until_date": "2024-01-01",
- "designation": "Helper",
- "category": "Other",
- "department": "",
- "is_manager": 0,
- "siteName": "Charlotte center",
- "contractor": "Turner Construction",
- "staffFunction": "",
- "siteCode": "ST0022",
- "geofencingLocation": "Head Office",
- "userAppAccess": 1,
- "userAppAttendance": 1,
- "disableFaceRecognition": 0,
- "division": "North",
- "marital_status": "Unmarried",
- "country": "India",
- "state": "Maharashtra",
- "city": "Mumbai",
- "qualification": "Post Graduate",
- "last_working_day": "2024-01-01",
- "status": "active",
- "manager_emp_id": "ABCD123",
- "payrateName": "Payrate Name",
- "allowActivityPunch": 0,
- "sitePoint": "Site Point",
- "additionalSites": "ST1070,ST1021",
- "attendance_exception": 0,
- "nationality": "IN",
- "l1_manager_emp_id": "L1454GRR",
- "l2_manager_emp_id": "L21232RTT12",
- "role": "Staff",
- "extra_hours_type": "ot/comp_off/na",
- "extra_hours_approval": "pre/post",
- "staff_function": "",
- "title": "Sr. Manager",
- "regional_name": "",
- "probation_end_date": "2024-09-20",
- "staff_unique_id": "",
- "grade": "",
- "sector": "",
- "company": "",
- "skipValidation": "1",
- "is_allot_leave": "1",
- "allow_apply_leave": "1",
- "web_dashb_access": "0",
- "sub_division": "sub division",
- "publish_to_payroll": "1",
- "resignation_date": "2027-01-01",
- "dept_code": "",
- "allow_activity_timesheet": "1",
- "work_hour_config": "0",
- "shift_code": ""
}{- "response": "Success",
- "code": "200",
- "message": "Success",
- "data": [
- {
- "empId": "TR001"
}
]
}Get Staff list
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/getEmployeeDtls?empId=
| empId | string Employee ID |
| lastUid | string last_uid value in response |
| status | string Accepted values (active,inactive) |
| managerEmpId | string Manager Employee ID |
| modifiedAfter | string Fetch the list of records that were added or updated after the provided date and time. Format - YYYY-MM-DD HH:MM:SS |
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
{- "response": "Success",
- "code": "200",
- "message": "Success",
- "moreRows": "0",
- "last_uid": "1432",
- "data": [
- {
- "empId": "TR001",
- "name": "James Anderson",
- "first_name": "James",
- "last_name": "Anderson",
- "gender": "M",
- "mobile": "6524152365",
- "email": "jamesanderson@truein.com",
- "dob": "1996-07-31",
- "blood_group": "B+",
- "id_type": "Driving License",
- "id_number": "USDR11455E",
- "father_name": "David",
- "qualification": "",
- "address": "Charlotte, NC 28208",
- "joining_date": "2023-01-01",
- "valid_until_date": "2024-01-01",
- "regular_in_time": "10:00",
- "induction_date": "2023-01-01",
- "induction_given_by": "Danie",
- "identification_marks": "Scar on left eyebrow",
- "staff_function": "",
- "nature_of_work": "",
- "designation": "Helper",
- "staff_type": "Permanent",
- "category": "Other",
- "department": "",
- "is_manager": 0,
- "manager": "Danie",
- "manager_emp_id": "ABC123",
- "contractor": "Turner Construction",
- "last_working_day": "2024-02-28",
- "marital_status": "Single",
- "division": "Sales",
- "address_line2": "Apartment 123",
- "country": "United States",
- "state": "California",
- "city": "San Francisco",
- "site_name": "Headquarters",
- "site_code": "ABC1234",
- "client_name": "ABC Corp",
- "status": "Active",
- "esic_number": "ESIC1234567890",
- "pf_number": "PF1234567890",
- "uan_number": "UAN1234567890",
- "bank_name": "ABC Bank",
- "emp_name_in_bank": "John Doe",
- "account_number": "1234567890",
- "account_type": "Savings",
- "ifsc_code": "ABCD0123456",
- "micr_code": "123456789",
- "swift_code": "SWIFT123456789",
- "communication_address": "123 Main St, Apartment 123, San Francisco, CA",
- "created_date": "2024-02-01 12:00:00",
- "integration": "",
- "no_of_children": "2",
- "line": "Line 1",
- "cost_center": "Cost Center 123",
- "is_blacklisted": "No",
- "age": "30",
- "staff_doc": [ ],
- "geofencingLocation": "Head Office",
- "userAppAccess": 1,
- "userAppAttendance": 1,
- "disableFaceRecognition": 0,
- "additionalSites": "ST1070,ST1021",
- "attendance_exception": 0,
- "nationality": "IN",
- "l1_manager_emp_id": "L1454GRR",
- "l2_manager_emp_id": "L21232RTT12",
- "role": "Staff",
- "title": "Sr. Manager",
- "regional_name": "",
- "probation_end_date": "2024-09-20",
- "staff_unique_id": "",
- "grade": "",
- "sector": "",
- "company": "",
- "extra_hours_type": "",
- "extra_hours_approval": "",
- "modified_on": "2024-09-21 13:45:42",
- "is_allot_leave": "1",
- "is_invitation_sent": "1",
- "allow_apply_leave": "1",
- "web_dashb_access": "0",
- "sub_division": "sub division",
- "publish_to_payroll": "1",
- "resignation_date": "2027-01-01",
- "staff_pic": "",
- "work_hour_config": "0"
}
]
}Update staff in Truein
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/updateEmployeeDtls
• Note :
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
Update staff
| empId | string Employee Id that needs to be updated |
| name | string Updated value of employee name |
| first_name | string Updated value of the employee first name |
| last_name | string Updated value of teh employee last name |
| mobile | string Updated value of mobile |
string Updated value of email | |
| designation | string Updated value of designation |
| department | string Updated value of department |
| category | string Updated value of category |
| gender | string Updated value of gender |
| status | string Accepted value (active or deactive) |
| idPic | string Base64 encoded binary data of the image |
| siteCode | string Enter Site Code of the site where you want to transfer the employee otherwise keep it blank. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. |
| geofencingLocation | string Geofencing Location. Note - Provide one or multiple comma separated geofencing locations from the list defined on your site. |
| last_working_day | string Last working day of the employee. |
| manager_emp_id | string If the manager's employee ID does not have access to the client, it will be granted as additional site access. |
| qualification | string Employee Qualification. |
| userAppAccess | string Grant Truein User App Access. 0 -> No, 1 -> Yes. |
| userAppAttendance | string Grant Truein User App Attendance Access. 0 -> No, 1 -> Yes. |
| disableFaceRecognition | string Disable face recognition at the time of attendance. 0 -> No, 1 -> Yes. |
| payrateName | string Payrate Name. |
| allowActivityPunch | string Allow Activity Punch. 0 -> No, 1 -> Yes. |
| sitePoint | string Site Point. |
| is_manager | string 0 - Employee is not a Manager. 1 - Employee can be added as a Manager. |
| additionalSites | string Additional sites |
| attendance_exception | string Auto attendance setting. 0 - Off. 1 - Both auto clock in and out. 2 - Auto clock in only. 3 - Auto clock out only. |
| nationality | string Nationality of the employee |
| l1_manager_emp_id | string If the L1 manager's employee ID does not have access to the site, it will be granted as additional site access. |
| l2_manager_emp_id | string L2 Manager's Employee Id |
| role | string Staff Role |
| extra_hours_type | string Extra hours type can be ot, comp_off or na |
| extra_hours_approval | string Extra hours approval can be pre or post |
| title | string Title of the employee. |
| regional_name | string Regional name of the employee. |
| probation_end_date | string Probation end date of the employee. |
| staff_function | string Staff function of the employee. |
| staff_unique_id | string Staff unique ID of the employee |
| update_emp_id | string Set to 1 to use staff_unique_id as the identifier for looking up the employee, which allows updating the empId. Default is 0, where empId is used as the identifier. |
| division | string division of the employee |
| grade | string Grade of the employee. |
| sector | string sector of the employee. |
| company | string company of the employee. |
| skipValidation | string 0 - does not skips validations for invalid fields set to default. 1 - skips the validations for invalid fields while updating staff. |
| allow_apply_leave | string 0 - does not allow employee to apply for leaves. 1 - by default, allows the employee to apply for leaves. |
| web_dashb_access | string 0 - by default does not allow user to access web-dashboard. 1 - allows user to access the web-dashboard |
| sub_division | string hierarchy-based classification of employee |
| publish_to_payroll | string 0 - by default does not on notice period . 1 - on notice period. |
| resignation_date | string Resignation Date. Format (YYYY-MM-DD). |
| dept_code | string Department Code . |
| allow_activity_timesheet | string 1 - by default allows employee to fill activity timesheet. 0 - does not allow employee to fill activity timesheet. |
| work_hour_config | string Worked hours calculation method for the employee. Leave blank or omit to keep the existing value. 0 - uses the organization's configured method for the site. 1 - overrides it with the other method (if the site is set to First In - Last Out, the employee uses Multi Punch, and vice versa). |
| shift_code | string Shift code assigned to the employee. |
| id_type | string Type of identification document of the employee |
| id_number | string Identification document number corresponding to id_type |
| dob | string Date of birth of the employee. Format (YYYY-MM-DD) |
{- "empId": "TR002",
- "name": "James Anderson",
- "first_name": "James",
- "last_name": "Anderson",
- "mobile": "5556969745",
- "email": "jamesanderson@truein.com",
- "designation": "HR",
- "department": "Admin",
- "category": "Contract Staff",
- "gender": "M",
- "status": "active",
- "idPic": "",
- "siteCode": "",
- "geofencingLocation": "Head Office",
- "last_working_day": "2024-02-28",
- "manager_emp_id": "ABC123",
- "qualification": "B.Tech",
- "userAppAccess": 1,
- "userAppAttendance": 1,
- "disableFaceRecognition": 0,
- "payrateName": "Payrate Name",
- "allowActivityPunch": 0,
- "sitePoint": "Site Point",
- "is_manager": 0,
- "additionalSites": "ST1070,ST1021",
- "attendance_exception": 0,
- "nationality": "IN",
- "l1_manager_emp_id": "L1454GRR",
- "l2_manager_emp_id": "L21232RTT12",
- "role": "Staff",
- "extra_hours_type": "ot/comp_off/na",
- "extra_hours_approval": "pre/post",
- "title": "",
- "regional_name": "",
- "probation_end_date": "2024-09-21",
- "staff_function": "",
- "staff_unique_id": "",
- "update_emp_id": "0",
- "division": "",
- "grade": "",
- "sector": "",
- "company": "",
- "skipValidation": "1",
- "allow_apply_leave": "1",
- "web_dashb_access": "0",
- "sub_division": "sub division",
- "publish_to_payroll": "1",
- "resignation_date": "2027-01-01",
- "dept_code": "",
- "allow_activity_timesheet": "1",
- "work_hour_config": "0",
- "shift_code": "",
- "id_type": "Passport",
- "id_number": "P1234567",
- "dob": "1990-01-31"
}{- "response": "Success",
- "code": "200",
- "message": "Successfully Updated!"
}Delete Staff details
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/deleteEmployeeDtls
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
Delete staff
| empId | string Employee Id that needs to be updated |
{- "empId": "TR002"
}{- "response": "Success",
- "code": "200",
- "message": "Deleted Successfully!"
}Add new or update existing geofencing location in Truein
• Request URL :
https://api.truein.com/apis/ext/attendance/v1.0/addUpdateGeofencingLocation
| Subscription-key required | string API Access Key Found in your Truein admin dashboard. |
| Content-Type required | string application/json |
Add new or update existing geofencing location
| locationName | string Geofencing Location Name |
| locationAddress | string Geofencing Location Address |
| mapUrl | string Geofencing Location Map Url |
| maxRadius | string Maximum radius allowed to mark attendance |
| latitude | string Latitude of the geofencing location. |
| longitude | string Longitude of the geofencing location. |
| siteName | string Site Name. |
| siteCode | string Enter Site Code of the site where you want to add geofencing location. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites. |
| action | string Pass action as 'add' to add new geofencing location or send 'update' to update existing geofencing location. |
{- "locationName": "Head Office",
- "locationAddress": "3rd floor, A Wing, Kings Square, Pallod Farms, Baner, Pune, Maharashtra 411045",
- "maxRadius": 100,
- "latitude": "18.5334",
- "longitude": "73.8307",
- "siteName": "Truein",
- "siteCode": "",
- "action": "add"
}{- "response": "Success",
- "code": "200",
- "message": "Geofencing Location added successfully"
}Get existing geofencing location in Truein
• Request URL :
https://api.truein.com/ext/v1/geofencing-location/getGeoFencingLocations
| siteCode | string site code for the existing client site. |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "message": "Success",
- "title": "Success",
- "data": [
- {
- "locationName": "Head Office",
- "locationAddress": "3rd floor, A Wing, Kings Square, Pallod Farms, Baner, Pune, Maharashtra 411045",
- "latitude": 18.5334,
- "longitude": 73.8307,
- "maxRadius": 100,
- "siteName": "Test Site",
- "siteCode": "ST1072"
}
], - "help": "",
- "identifier": ""
}Deactivate existing geofencing location in Truein
• Request URL :
https://api.truein.com/ext/v1/geofencing-location/deactivateGeoFencingLocation
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Deactivate Geofencing location
| siteCode | string existing site code in which the geofencing location was added, passing the site code alone will deactivate all the geofencing location under that site. |
| locationName | string location name of the geofencing location which is to be deactivated, will deactivate only the geofencing location with the given siteCode. |
{- "siteCode": "ST1071",
- "locationName": "Main Office"
}{- "code": 200,
- "title": "Geofencing location successfully deactivated",
- "message": "Success",
- "type": "Success",
- "data": {
- "count": 1
}, - "help": "",
- "identifier": ""
}This API retrieves leave details based on filter parameters like employee ID, site code, and leave dates.
• Request URL :
| siteCode | string Example: siteCode=ABC123 Filter by Site Code. |
| empId | string Example: empId=200000000005054 Filter by Employee ID. |
| leaveCodes | string Example: leaveCodes=ML Filter by Leave Code. Enter the specific leave code(s) to filter leave data. |
| fromDate | string <date> Example: fromDate=2024-08-01 Filter by start date. |
| toDate | string <date> Example: toDate=2024-08-31 Filter by end date. |
| approvalStatus | string Example: approvalStatus=Approved,Pending Filter by leave status. OPTIONS: Pending, Approved, Cancelled, Rejected, Alloted, Encashed. DEFAULT: Pending, Approved, Cancelled, Rejected. |
| searchString | string Example: searchString=employee name Filter by search keyword. Allows searching within leave data for specific terms. |
| extRefId | string Example: extRefId=LV121289736 External Reference ID to identify leave applied |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "message": "Success",
- "data": [
- {
- "siteName": "Yugstart - Test",
- "siteCode": "ST0009",
- "empId": "Poonam123",
- "empName": "Poonam Suste",
- "fromDate": "2024-08-08",
- "toDate": "2024-08-08",
- "fromDateHalfDay": "Full Day",
- "toDateHalfDay": "First Half (Half Day)",
- "applySandwichPolicy": "Yes",
- "noOfHours": "0",
- "leaveDays": "0.50",
- "compOffDate": "-",
- "leaveReason": "",
- "leaveType": "Maternity Leave",
- "leaveCode": "PTO",
- "leaveDoc": "URL of the leave document",
- "approvalStatus": "Pending",
- "approver": "approver name",
- "approverComment": "approver comment",
- "extRefId": "LV121289736"
}
]
}This API allows an employee to apply for or update a leave transaction.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| empId | string Employee ID of the staff member requesting leave. |
| siteCode | string Site Code where the employee is assigned. Used to filter and apply leave for the specific site. |
| leaveCode | string Code representing the type of leave being applied for (e.g., 'FLX' for Flexi Leave). |
| fromDate | string <date> Start date of the leave. Format (YYYY-MM-DD) |
| toDate | string <date> End date of the leave. Format (YYYY-MM-DD) |
| fromDateHalfDay | string Indicates if the leave on the start date is a half-day. OPTIONS: First Half, Second Half. DEFAULT: Full Day |
| toDateHalfDay | string Indicates if the leave on the end date is a half-day. OPTIONS: First Half, Second Half. DEFAULT: Full Day |
| noOfHours | string Number of hours taken as leave. Typically used for hourly leave scenarios. |
| compOffDate | string Date for compensatory off if applicable. Format (YYYY-MM-DD) |
| leaveReason | string Reason provided by the employee for taking leave. |
| file | string <binary> File attached as supporting document for the leave request, such as a medical certificate. |
| action | string Action to be performed: 'add' to apply for a new leave, or 'update' to modify an existing leave. |
| extRefId | string External Reference Id to uniquely identify applied leave. |
| approvalStatus | string Add leave status by default approved, OPTIONS: Pending, Approved. |
{- "empId": "200000000003633",
- "siteCode": "ST0022",
- "leaveCode": "FLX",
- "fromDate": "2024-03-08",
- "toDate": "2024-03-08",
- "fromDateHalfDay": "0",
- "toDateHalfDay": "0",
- "noOfHours": "",
- "compOffDate": "",
- "leaveReason": "",
- "file": "/path/to/file",
- "action": "add",
- "extRefId": "LV121289736",
- "approvalStatus": "Approved"
}{- "code": 200,
- "message": "Leave applied successfully!",
- "data": { }
}API to update the status of an employee's leave request.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| empId | string Employee ID of the staff member. |
| siteCode | string Site code where the employee is assigned. |
| fromDate | string <date> Start date of the leave. Format (YYYY-MM-DD) |
| toDate | string <date> End date of the leave. Format (YYYY-MM-DD) |
| leaveCode | string Leave code representing the type of leave. |
| approvalStatus | number Update leave status, OPTIONS: Reject, Approve, Cancel. |
| approverComment | string Comment by the approver. |
| extRefId | string External Reference ID of the leave added |
{- "empId": "2539",
- "siteCode": "11",
- "fromDate": "2024-03-08",
- "toDate": "2024-03-08",
- "leaveCode": "FLX",
- "approvalStatus": "Reject",
- "approverComment": "",
- "extRefId": ""
}{- "code": 200,
- "message": "Successfully Cancelled!",
- "data": { }
}This API retrieves leave lite details based on filter parameters like employee ID, site code, and leave dates.
• Request URL :
| siteCode | string Example: siteCode=ABC123 Filter by Site Code. |
| empId | string Example: empId=200000000005054 Filter by Employee ID. |
| leaveCodes | string Example: leaveCodes=PTO Filter by Leave Code. Enter the specific leave code(s) to filter leave data. |
| fromDate | string <date> Example: fromDate=2024-08-01 Filter by start date. |
| toDate | string <date> Example: toDate=2024-08-31 Filter by end date. |
| approvalStatus | string Example: approvalStatus=Approved,Cancelled Filter by leave status. OPTIONS: Approved, Cancelled. DEFAULT: Approved, Cancelled |
| searchString | string Example: searchString=employee name Filter by search keyword. Allows searching within leave data for specific terms. |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "message": "Success",
- "data": [
- {
- "siteName": "Yugstart - Test",
- "siteCode": "ST0009",
- "empId": "Poonam123",
- "empName": "Poonam Suste",
- "fromDate": "2024-08-08",
- "toDate": "2024-08-08",
- "fromDateHalfDay": "Full Day",
- "toDateHalfDay": "First Half (Half Day)",
- "applySandwichPolicy": "Yes",
- "leaveDays": "0.50",
- "leaveReason": "",
- "leaveType": "Maternity Leave",
- "leaveCode": "PTO",
- "leaveDoc": "URL of the leave document",
- "approvalStatus": "Pending",
- "approver": "approver name",
- "approverComment": "approver comment"
}
]
}This API allows an employee to apply for a leave lite transaction.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| empId | string Employee ID of the staff member requesting leave. |
| siteCode | string Site Code where the employee is assigned. Used to filter and apply leave for the specific site. |
| leaveCode | string Code representing the type of leave being applied for (e.g., 'PTO' for Paid Time Off Leave). |
| fromDate | string <date> Start date of the leave. Format (YYYY-MM-DD) |
| toDate | string <date> End date of the leave. Format (YYYY-MM-DD) |
| fromDateHalfDay | string Indicates if the leave on the start date is a half-day. OPTIONS: First Half, Second Half. DEFAULT: Full Day |
| toDateHalfDay | string Indicates if the leave on the end date is a half-day. OPTIONS: First Half, Second Half. DEFAULT: Full Day |
| leaveReason | string Reason provided by the employee for taking leave. |
| file | string <binary> File attached as supporting document for the leave request, such as a medical certificate. |
| applySandwichPolicy | integer Apply sandwich policy on the leave applied or not. OPTIONS: 'Yes' or 'No'. DEFAULT: 'No' |
{- "empId": "200000000003633",
- "siteCode": "ST0022",
- "leaveCode": "PTO",
- "fromDate": "2024-03-08",
- "toDate": "2024-03-08",
- "fromDateHalfDay": "First Half",
- "toDateHalfDay": "First Half",
- "leaveReason": "",
- "file": "/path/to/file",
- "applySandwichPolicy": 0
}{- "code": 200,
- "message": "Leave applied successfully!",
- "data": { }
}API to cancel the status of an employee's leave lite request.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| empId | string Employee ID of the staff member. |
| siteCode | string Site code where the employee is assigned. |
| fromDate | string <date> Start date of the leave. Format (YYYY-MM-DD) |
| toDate | string <date> End date of the leave. Format (YYYY-MM-DD) |
| fromDateHalfDay | string Indicates if the leave on the start date is a half-day. OPTIONS: First Half, Second Half. DEFAULT: Full Day |
| leaveCode | string Leave code representing the type of leave lite. |
| approverComment | string Comment by the approver. |
{- "empId": "2539",
- "siteCode": "11",
- "fromDate": "2024-03-08",
- "toDate": "2024-03-08",
- "fromDateHalfDay": "First Half",
- "leaveCode": "PTO",
- "approverComment": ""
}{- "code": 200,
- "message": "Successfully Cancelled!",
- "data": { }
}This API retrieves spoofed attendance records based on filter parameters like employee ID, site codes, and date range.
• Request URL :
https://api.truein.com/ext/v1/alerts/getSpoofPunches
• Note :
| fromDate required | string <date> Example: fromDate=2025-01-01 Start date for filtering attendance records. Format: YYYY-MM-DD. This is a mandatory parameter. |
| toDate required | string <date> Example: toDate=2025-01-31 End date for filtering attendance records. Format: YYYY-MM-DD. This is a mandatory parameter. Maximum date range from fromDate is 365 days. |
| siteCodes | string Example: siteCodes=SITE01,SITE02 Filter by Site Codes. Comma-separated list of site codes. If not provided, returns data for all sites. |
| empIds | string Example: empIds=EMP101,EMP202 Filter by Employee IDs. Comma-separated list of employee IDs. If not provided, returns data for all employees. |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Spoofed attendance records fetched successfully",
- "type": "info",
- "data": [
- {
- "empName": "John Doe",
- "empId": "EMP101",
- "attendanceTimestamp": "2025-01-15 09:25:32",
- "attendanceSite": "SITE_01",
- "baseSite": "SITE_01",
- "deviceName": "Truein Mobile App"
}
], - "count": 2,
- "help": ""
}Add a new kiosk device to a site
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add kiosk device
| siteCode | string Site code to register the kiosk device under |
| kioskName | string Display name for the kiosk device (max 100 chars) |
| location | string Physical location of the device (max 50 chars) (Optional) |
| description | string Device description (max 500 chars) (Optional) |
| captureMode | string Capture mode (Optional, Default: touch) |
| geofencing | string Comma-separated geofencing location names (Optional) |
{- "siteCode": "ST001",
- "kioskName": "Main Gate Kiosk",
- "location": "Warehouse A",
- "description": "Entry gate device",
- "captureMode": "touch",
- "geofencing": "Main Gate,Parking Area"
}{- "code": 200,
- "title": "Success",
- "message": "kiosk device added successfully.",
- "type": "info",
- "data": {
- "kioskId": 100294,
- "activationKey": "16368cv"
}, - "help": "",
- "identifier": ""
}Update an existing kiosk device
• Request URL :
https://api.truein.com/ext/v1/kiosk-device/updateKioskDevice
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update kiosk device
| siteCode | string Site code the kiosk device belongs to |
| kioskId | integer Kiosk device ID to update |
| kioskName | string New display name for the kiosk device (Optional) |
| location | string Physical location of the device (Optional) |
| description | string Device description (Optional) |
| geofencing | string Comma-separated geofencing location names (Optional) |
{- "siteCode": "ST001",
- "kioskId": 100294,
- "kioskName": "Updated Kiosk",
- "location": "Floor 2",
- "description": "Updated description",
- "geofencing": "Main Gate"
}{- "code": 200,
- "title": "Success",
- "message": "kiosk device updated successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| siteCode | any Example: siteCode=ST001 Filter by site code |
| kioskId | any Example: kioskId=100294 Filter by kiosk device ID |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "kiosk device list fetched successfully.",
- "type": "info",
- "data": {
- "data": [
- {
- "kioskId": 100294,
- "kioskName": "Main Gate Kiosk",
- "siteCode": "ST001",
- "location": "Warehouse A",
- "description": "Entry gate device",
- "activationKey": "16368cv",
- "geofencing": "Main Gate,Parking Area",
- "captureMode": "touch"
}
]
}, - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete kiosk device
| siteCode | string Site code the kiosk device belongs to |
| kioskId | integer Kiosk device ID to delete |
{- "siteCode": "ST001",
- "kioskId": 100294
}{- "code": 200,
- "title": "Success",
- "message": "kiosk device deleted successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}Get shift definitions for your client account — code, name, categories, start/end times, computed duration, grace time, and applicable days. All filters are optional (combined with AND).
• Request URL :
| siteCode | any Example: siteCode=ST001 Filter shifts by site code. If omitted, returns shifts from all active sites under the client account. |
| shiftCode | any Example: shiftCode=SHIFT001 Filter shifts by exact shift code (case-sensitive). |
| shiftName | any Example: shiftName=First Shift Filter shifts by exact shift name (case-sensitive). |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Shift list fetched successfully",
- "type": "info",
- "data": [
- {
- "shiftCode": "SHIFT001",
- "shiftName": "First Shift",
- "appliedToCategories": [
- "Worker",
- "Staff"
], - "startTime": "09:00",
- "endTime": "18:00",
- "duration": "09:00",
- "graceTime": "00:15",
- "shiftType": "All",
- "shiftDays": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
]
}
], - "help": "",
- "identifier": ""
}Create a new shift under your client account. All web-dashboard create validations (duplicate shift-code, mandatory fields, category/day rules, overnight handling) are enforced.
• Notes :
siteCode, shiftCode, category names). Times are 24-hour HH:mm.appliedToCategories and shiftDays are optional — omit or send [] to mean "all".• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| siteCode required | string Site code the shift belongs to. |
| shiftCode required | string Unique shift code within the site. |
| shiftName required | string Shift display name. |
| appliedToCategories | Array of strings Category names (not IDs) the shift applies to. Omit or [] = all categories. |
| startTime required | string Shift start time, 24-hour 'HH:mm'. |
| endTime required | string Shift end time, 24-hour 'HH:mm' (overnight, end < start, supported). |
| graceTime | string Grace period, 'HH:mm' (optional). |
| shiftDays | Array of strings Title-case day names the shift is active on. Omit or [] = all days. |
{- "siteCode": "ST001",
- "shiftCode": "SHIFT001",
- "shiftName": "First Shift",
- "appliedToCategories": [
- "Permanent",
- "Contract"
], - "startTime": "09:00",
- "endTime": "18:00",
- "graceTime": "00:10",
- "shiftDays": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
]
}{- "code": 200,
- "title": "Success",
- "message": "shift added successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}Update an existing shift, identified by shiftCode within the site (the code is immutable — it cannot be renamed). Send the full field set (same as addShift); all web-dashboard update validations are enforced.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| siteCode required | string Site code the shift belongs to. |
| shiftCode required | string Existing shift code — the immutable identifier used to find the shift. Cannot be renamed. |
| shiftName required | string Shift display name. |
| appliedToCategories | Array of strings Category NAMES the shift applies to. Omit or send [] to mean all categories. |
| startTime required | string Shift start time, 24-hour 'HH:mm'. |
| endTime required | string Shift end time, 24-hour 'HH:mm'. |
| graceTime | string Grace period, 'HH:mm'. Optional. |
| shiftDays | Array of strings Day NAMES (Title-case) the shift is active on. Omit or send [] to mean all days. |
{- "siteCode": "ST001",
- "shiftCode": "SHIFT001",
- "shiftName": "First Shift",
- "appliedToCategories": [
- "Permanent",
- "Contract"
], - "startTime": "09:00",
- "endTime": "18:00",
- "graceTime": "00:10",
- "shiftDays": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
]
}{- "code": 200,
- "title": "Success",
- "message": "shift updated successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}Delete a shift, identified by shiftCode within the site. A shift that is in use (assigned in schedules or referenced by active rules) cannot be deleted — the server returns the reason.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| siteCode required | string Site code the shift belongs to. |
| shiftCode required | string Shift code to delete. |
{- "siteCode": "ST001",
- "shiftCode": "SHIFT001"
}{- "code": 200,
- "title": "Success",
- "message": "shift deleted successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}Create or update the Shift or Job schedule for one or more employees on a single date. The data field maps each shift/job code to its employees, so multiple codes can be scheduled in one call. Each employee is processed independently and the response is a per-employee partial success (successCount / failureCount / failures) — some can succeed while others fail without failing the whole call.
• Notes :
date must be today or later and no more than 3 months ahead.type: shift and use the reserved key WO in data (e.g. { "SHIFT001": "EMP001,EMP002", "WO": "EMP003" }) — mixable with real shift codes. A WO-only request does not need the Shift module enabled.type: shift needs the Shift module enabled; type: job needs the Job module enabled.• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| siteCode | string Site Code where the employees are assigned (client-scoped). | ||
| date | string <date> Single date the schedule applies to. Format (YYYY-MM-DD). Must be today or future, and no more than 3 months ahead. | ||
| type | string Schedule type: 'shift' or 'job'. For Weekly-Off, keep 'shift' and use the reserved 'WO' key in data. | ||
object Map of shift/job code to its employee IDs (CSV or array). Reserved key 'WO' schedules a Weekly-Off. First code wins if an employee repeats; an empty list is a failure. | |||
| |||
{- "siteCode": "ST009",
- "date": "2026-08-01",
- "type": "shift",
- "data": {
- "MOR01": "EMP001,EMP002",
- "EVE01": "EMP003",
- "WO": "EMP004"
}
}{- "type": "info",
- "message": "schedule updated successfully.",
- "code": 200,
- "data": {
- "successCount": 2,
- "failureCount": 1,
- "failures": [
- {
- "employeeId": "EMP003",
- "code": "EVE01",
- "reason": "invalid input, employee is deactivated."
}
]
}
}Retrieve the planned Shift / Job / Weekly-Off schedule for a site on a given date, optionally filtered by employee, shift code, or job code. Results are paginated.
• Notes :
pageSize defaults to 100 and is capped at 500.weeklyOff is true only when the day is marked Weekly-Off and not since removed.siteCode only — employees belonging to other sites are never returned.• Request URL :
| siteCode required | string Example: siteCode=ST009 Site Code (client-scoped) |
| date required | string Example: date=2026-08-01 Schedule date in format 'YYYY-MM-DD' |
| employeeIds | string Example: employeeIds=EMP001,EMP002 Filter by employee IDs — comma-separated string or array. If omitted, all employees for the site+date are returned. |
| shiftCode | string Example: shiftCode=SHIFT001 Filter by shift code (exact match) |
| jobCode | string Example: jobCode=JOB001 Filter by job code (exact match) |
| page | integer Example: page=1 Page number (default 1) |
| pageSize | integer Example: pageSize=100 Rows per page (default 100, max 500) |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "type": "info",
- "message": "schedule fetched successfully.",
- "code": 200,
- "data": {
- "data": [
- {
- "employeeId": "EMP001",
- "employeeName": "John Doe",
- "shift": "MOR01",
- "shiftName": "Morning Shift",
- "job": "",
- "jobName": "",
- "weeklyOff": false,
- "scheduleDate": "2026-08-01"
}
], - "pagination": {
- "total": 150,
- "page": 1,
- "pageSize": 100,
- "totalPages": 2
}
}
}Delete existing Shift / Job / Weekly-Off schedules for one or more employees over a date range. Each employee is processed independently and the response is a per-employee partial success.
• Notes :
fromDate must be today or later; toDate must be ≥ fromDate and no more than 3 months ahead.scheduleType selects what to delete: ALL | SHIFT | JOB | SHIFT_JOB | WEEKLY_OFF.failures with reason "no schedule found for the given date range."• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
| siteCode | string Site Code (client-scoped). |
| fromDate | string <date> Range start. Format (YYYY-MM-DD). Must be today or future. |
| toDate | string <date> Range end. Format (YYYY-MM-DD). Must be greater than or equal to fromDate and no more than 3 months from today. |
| employeeIds | string Employee IDs — comma-separated string or array. |
| scheduleType | string What to delete. One of: ALL | SHIFT | JOB | SHIFT_JOB | WEEKLY_OFF. |
{- "siteCode": "ST009",
- "fromDate": "2026-08-01",
- "toDate": "2026-08-05",
- "employeeIds": "EMP001,EMP002",
- "scheduleType": "SHIFT"
}{- "type": "info",
- "message": "schedule deleted successfully.",
- "code": 200,
- "data": {
- "successCount": 1,
- "failureCount": 1,
- "failures": [
- {
- "employeeId": "EMP010",
- "reason": "no schedule found for the given date range."
}
]
}
}Get Punch Check List Answers
• Request URL :
https://api.truein.com/ext/v1/timesheet/getPunchChecklistAnswers
| date required | string Example: date=2025-06-30 Filter data by attendance date. Format(YYYY-MM-DD). |
| punchType | string Comma-separated values. Possible values - in, out, activity. If not provided, return all punch types |
| empId | string Comma-separated employee IDs. If not provided, return data for all staff |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Success",
- "type": "info",
- "data": [
- {
- "empId": "5787962072",
- "name": "Abraham Morrison",
- "designation": "",
- "department": "Admin",
- "category": "Other",
- "attendanceDate": "2025-06-30",
- "baseSite": "ABC Limited",
- "firstInTime": "2025-07-01 11:03:58",
- "lastOutTime": "2025-07-01 17:03:58",
- "responses": [
- {
- "question": "Are you on time for your shift?",
- "answer": "No",
- "punchType": "in",
- "createdTime": "2025-06-30 14:16:44"
}
]
}
], - "help": "",
- "identifier": ""
}Add a new punch checklist question.
• Request URL :
https://api.truein.com/ext/v1/punch-checklist/addPunchQuestion
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add a new punch checklist question
| questionTitle | string Question title. |
| description | string Description / hint displayed to the user. |
| isMandatory | string Enum: "Yes" "No" Indicates if the field is required (Yes/No). |
| questionType | string Enum: "List of values (Single)" "Multiple List of Values" "Smileys" "Yes/No" "Textbox" "Image" Indicates the question type. Must be one of:
|
| questionTypeValue | string Value depends on questionType:
|
| defaultAnswer | string Default answer rules based on questionType:
|
| siteCodes | string Applicable site codes must be comma separated (e.g. "ST009,ST005"). To apply for all sites, use the keyword "all". |
| punchType | string Punch Type can be blank or comma separated values: Clock-In, Clock-Out, Activity Punch. |
| categories | string Comma-separated list of categories. Use "all" for all categories. |
| cond1 | string Condition 1 based on questionType:
|
| action1 | string Enum: "Block Punch" "Notify Manager" "None" Action 1 based on questionType:
|
| cond2 | string Condition 2 based on questionType:
|
| action2 | string Enum: "Block Punch" "Notify Manager" "None" Action 2 based on questionType:
|
{- "questionTitle": "Question",
- "description": "Question Description",
- "isMandatory": "Yes",
- "questionType": "Yes/No",
- "questionTypeValue": "Option1,Option2,Option3",
- "defaultAnswer": "Yes",
- "siteCodes": "ST009,ST005",
- "punchType": "Clock-In",
- "categories": "other,tech",
- "cond1": "Yes",
- "action1": "Block Punch",
- "cond2": "No",
- "action2": "Notify Manager"
}{- "code": 200,
- "message": "Success",
- "data": { },
- "help": "",
- "identifier": ""
}Update an existing punch checklist question.
• Request URL :
https://api.truein.com/ext/v1/punch-checklist/updatePunchQuestion
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update existing punch checklist question
| punchQnId | integer Unique ID of the punch checklist question to update. |
| description | string Description / hint displayed to the user. |
| position | integer Position/order number of the question. |
| isMandatory | string Enum: "Yes" "No" Indicates if the field is required (Yes/No). |
| questionType | string Enum: "List of values (Single)" "Multiple List of Values" "Smileys" "Yes/No" "Textbox" "Image" Indicates the question type. Must be one of:
|
| questionTypeValue | string Value depends on questionType:
|
| defaultAnswer | string Default answer rules based on questionType:
|
| siteCodes | string Applicable site codes must be comma separated (e.g. "ST009,ST005"). To apply for all sites, use the keyword "all". |
| punchType | string Punch Type can be blank or comma separated values: Clock-In, Clock-Out, Activity Punch. |
| categories | string Comma-separated list of categories. Use "all" for all categories. |
| cond1 | string Condition 1 based on questionType:
|
| action1 | string Enum: "Block Punch" "Notify Manager" "None" Action 1 based on questionType:
|
| cond2 | string Condition 2 based on questionType:
|
| action2 | string Enum: "Block Punch" "Notify Manager" "None" Action 2 based on questionType:
|
{- "punchQnId": 286,
- "description": "Question Description",
- "position": 12,
- "isMandatory": "Yes",
- "questionType": "Yes/No",
- "questionTypeValue": "Option1,Option2,Option3",
- "defaultAnswer": "Yes",
- "siteCodes": "ST009,ST005",
- "punchType": "Clock-In",
- "categories": "other,tech",
- "cond1": "Yes",
- "action1": "Block Punch",
- "cond2": "No",
- "action2": "Notify Manager"
}{- "code": 200,
- "message": "Success",
- "data": { },
- "help": "",
- "identifier": ""
}Delete or mark a punch checklist question as inactive.
• Request URL :
https://api.truein.com/ext/v1/punch-checklist/deletePunchQuestion
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete existing punch checklist question
| punchQnId required | integer Unique ID of the punch checklist question to delete |
{- "punchQnId": 286
}{- "code": 200,
- "message": "Successfully deleted",
- "data": { },
- "help": "",
- "identifier": ""
}Get punch checklist questions for a given site or employee.
• Request URL :
https://api.truein.com/ext/v1/punch-checklist/getPunchQuestion
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Retrieve punch checklist question details
| siteCodes | string Applicable site codes must be comma-separated (e.g. "ST009,ST005"). |
{- "siteCodes": "ST009"
}{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": [
- {
- "punchQnId": 256,
- "punchType": "",
- "questionTitle": "Test question",
- "section": "primary_details",
- "questionType": "checkbox",
- "description": "testing",
- "questionTypeValue": "",
- "defaultAnswer": "",
- "position": 12,
- "isMandatory": 1,
- "siteCodes": "ST009",
- "categories": "",
- "cond1": "Yes",
- "cond2": "No",
- "action1": "Block Punch",
- "action2": "Notify Manager"
}
]
}Add new client site in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new client site
| siteName | string Name of the new client site |
| timezone | string Timezone in which the client site to be registered |
| siteCode | string The site code for the new client site |
| countryCode | string Country code for the new client site |
| regionName | string Site group name for the new client site |
| cloneSiteCode | string Clone Site Code for the new client site |
| isBaseSite | string Is base Site for the new client site |
| cloneFromBaseSite | string Clone FRom Base Site Code for the new client site |
| default_l1_emp_id | string default_l1_emp_id assigns a default manager when creating a new client site. If not found at the client level, access is granted to this ID, and newly added staff will have this employee as their Manager and L1 Approver. |
| default_l2_emp_id | string default_l2_emp_id assigns a default manager when creating a new client site. If not found at the client level, access is granted to this ID, and newly added staff will have L2 Approver. |
| default_l3_emp_id | string default_l3_emp_id assigns a default manager when creating a new client site. If not found at the client level, access is granted to this ID, and newly added staff will have L3 Approver. |
{- "siteName": "Test Site",
- "timezone": "Asia/Kolkata",
- "siteCode": "ST1072",
- "countryCode": "91",
- "regionName": "South Region",
- "cloneSiteCode": "ST009",
- "isBaseSite": "ST009",
- "cloneFromBaseSite": "ST009",
- "default_l1_emp_id": "CMSD07",
- "default_l2_emp_id": "CMSD07",
- "default_l3_emp_id": "CMSD07"
}{- "code": 200,
- "message": "Successfully created.",
- "title": "Success",
- "data": {
- "siteCode": "ST1072"
}, - "help": "",
- "identifier": ""
}Update existing client site in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update existing client site
| siteName | string Name of the existing client site |
| timezone | string Timezone in which the client site to be registered |
| countryCode | string Country code for the existing client site |
| siteCode | string The client site code of which the details to be updated. |
| action | string The values for action are [update,deactivate,reactivate], which allows either to update the site details, or deactivate the site or reactivate the site. |
| regionName | string The site group name of which the details to be updated. |
| default_l1_emp_id | string default_l1_emp_id assigns a l1 default manager when creating a new client site. If not found at the client level, access is granted to this ID. Newly added staff will have this employee as their Manager and L1 Approver, and old existing default manager will be replaced with the new one at both Manager and L1 levels. |
| default_l2_emp_id | string default_l2_emp_id assigns a l2 default manager when creating a new client site. If not found at the client level, access is granted to this ID, and newly added staff will have L2 Approver. |
| default_l3_emp_id | string default_l3_emp_id assigns a l3 default manager when creating a new client site. If not found at the client level, access is granted to this ID, and newly added staff will have L3 Approver. |
{- "siteName": "Test Site",
- "timezone": "Asia/Kolkata",
- "countryCode": "91",
- "siteCode": "ST1072",
- "action": "update",
- "regionName": "South Region",
- "default_l1_emp_id": "CMSD07",
- "default_l2_emp_id": "CMSD07",
- "default_l3_emp_id": "CMSD07"
}{- "code": 200,
- "title": "",
- "message": "Successfully updated.",
- "data": { },
- "help": "",
- "identifier": ""
}Get existing client site in Truein
• Request URL :
| siteCode | any Example: siteCode=ST1070 siteCode of the client site |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Client site list fetched successfully",
- "data": [
- {
- "siteName": "Test Site",
- "siteCode": "ST1070",
- "timezone": "Asia/Kolkata",
- "countryCode": 91,
- "status": "active",
- "regionName": "South Region",
- "isBaseSite": "1"
}
], - "help": "",
- "indentifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new public holiday
| holidayDate | string Holiday date in format YYYY-MM-DD |
| holidayName | string Name of the public Holiday |
| siteCode | string The client site where the holiday will be applied |
| extRefId | string External Reference ID to identify public holiday uniquely. |
{- "holidayDate": "2024-12-25",
- "holidayName": "Christmas Holiday",
- "siteCode": "ST1070",
- "extRefId": "2321IU9000TU"
}{- "code": 200,
- "title": "Success",
- "message": "Successfully added!",
- "data": { },
- "help": "",
- "identifier": ""
}Update existing public holiday in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update new public holiday
| holidayDate | string Holiday date in format YYYY-MM-DD, is a required field to update the public holiday |
| holidayName | string Name of the public Holiday |
| addSiteCode | string This takes the comma seperated sitecode values in which the public holiday will be added. |
| removeSiteCode | string This takes the comma seperated sitecode values in which the public holiday will be removed. |
| extRefId | string External Reference ID to get public holiday. |
{- "holidayDate": "2024-12-25",
- "holidayName": "Christmas Holiday",
- "addSiteCode": "ST1070",
- "removeSiteCode": "ST1020",
- "extRefId": "2321IU9000TU"
}{- "code": 200,
- "title": "Success",
- "message": "Holiday updated!",
- "data": { },
- "help": "",
- "identifier": ""
}Get public holidays in Truein
• Request URL :
| holidayDate | string existing holiday date for which the details to be obtained. |
| year | string year value in format YYYY, to retrieve the holidays saved under that year. |
| extRefId | string external reference id to get public holiday. |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "string",
- "data": [
- {
- "holidayDate": "2024-12-25",
- "holidayName": "Christmas Holiday",
- "siteCode": "ST1072",
- "siteName": "Test Site",
- "extRefId": "2321IU9000TU"
}
], - "help": "",
- "identifier": ""
}Get public holidays in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete new public holiday
| holidayDate | string public holiday date which will be removed from the public holiday list. |
| extRefId | string external reference id of the public holiday which will be removed from teh public holiday list. |
{- "holidayDate": "2024-008-15",
- "extRefId": "2321IU9000TU"
}{- "code": 200,
- "title": "Success",
- "data": { },
- "message": "Holiday deleted!",
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new region
| regionName | string Region Name |
| regionHeadEmpId | string Region Head Employee Id |
{- "regionName": "North Region",
- "regionHeadEmpId": "EMP001"
}{- "code": 200,
- "title": "Success",
- "message": "Region Successfully added.",
- "data": { },
- "help": "",
- "identifier": ""
}Get Region and Region Head in Truein
• Request URL :
| regionName | string region Name for which the details will be provided |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Success",
- "data": [
- {
- "regionName": "North Region",
- "regionHeadEmpId": "EMP001"
}
], - "help": "",
- "identifier": ""
}Update Region and Region Head in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update existing region
| regionName | string Region Name |
| regionHeadEmpId | string Region Head Employee Id |
{- "regionName": "North Region",
- "regionHeadEmpId": "EMP001"
}{- "code": 200,
- "title": "Success",
- "message": "successfully updated.",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
delete existing region
| regionName | string Region name which will be deleted. |
{- "regionName": "North Region"
}{- "code": 200,
- "title": "Success",
- "message": "successfully deleted.",
- "data": { },
- "help": "",
- "identifier": ""
}Add work from home request in Truein
• Request URL :
https://api.truein.com/ext/v1/work-from-home/addWorkFromHomeRequest
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new work from home request
| empId | string Employee Id |
| fromDate | string start date of work from home |
| toDate | string end date of work from home |
| extRefId | string External Reference ID of the work from home |
{- "empId": "EMP001",
- "fromDate": "2001-10-10",
- "toDate": "2001-10-10",
- "extRefId": "EXTWFH001"
}{- "code": 200,
- "title": "Success",
- "message": "successfully added",
- "data": { },
- "help": "",
- "identifier": ""
}Get work from home requests in Truein
• Request URL :
https://api.truein.com/ext/v1/work-from-home/getWorkFromHomeRequest
| empId | string Example: empId=EMP001 employee Id |
| fromDate | string Example: fromDate=2001-10-10 start date of work from home |
| toDate | string Example: toDate=2001-10-10 end date of work from home |
| status | string Example: status=Approved status of the applied work from home request |
| extRefId | string Example: extRefId=EXTWFH001 external reference ID |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "Success",
- "data": [
- {
- "empId": "EMP001",
- "date": "2001-10-10",
- "status": "Approved",
- "extRefId": "EXTWFH001"
}
], - "help": "",
- "identifier": ""
}Cancel work from home requests in Truein
• Request URL :
https://api.truein.com/ext/v1/work-from-home/cancelWorkFromHomeRequest
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new work from home request
| empId | string Employee Id |
| fromDate | string start date of the work from home request |
| toDate | string end date of the work from home request |
| extRefId | string External Reference ID of the request that will be cancelled |
{- "empId": "EMP001",
- "fromDate": "2001-10-10",
- "toDate": "2001-10-10",
- "extRefId": "EXTWFH001"
}{- "code": 200,
- "title": "Success",
- "message": "successfully cancelled",
- "data": { },
- "help": "",
- "identifier": ""
}Add on duty request in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add new on duty request
| empId | string ID for the employee |
| siteCode | string sitecode of the employee |
| visitType | string visit type of the employee |
| fromDate | string start date of the on duty visit |
| toDate | string end date of the on duty visit |
| dayType | string type of the on type visit, Full Day or Half Day |
| onDutyComment | string comments during adding the request |
| extRefId | string external reference ID for the on duty visit request |
{- "empId": "EMP001",
- "siteCode": "ST009",
- "visitType": "Business Trip",
- "fromDate": "2001-10-10",
- "toDate": "2001-10-10",
- "dayType": "Full Day",
- "onDutyComment": "Discussion on Foreign Policies",
- "extRefId": "EXT0D10010"
}{- "code": 200,
- "title": "Success",
- "message": "successfully added",
- "data": { },
- "help": "",
- "identifier": ""
}Get on duty request in Truein
• Request URL :
| empId | string Example: empId=EMP001 ID of the employee |
| siteCode | string Example: siteCode=ST009 site code |
| visitType | string Example: visitType=Business Trip visit type of the employee |
| approvalStatus | string Example: approvalStatus=Approved Status of the On Duty request [Approved, Cancelled] |
| fromDate | string Example: fromDate=2001-10-10 Starting Date in format 'YYYY-MM-DD' |
| toDate | string Example: toDate=2001-10-10 Ending Date in format 'YYYY-MM-DD' |
| searchString | string Example: searchString= Search string |
| extRefId | string Example: extRefId=EXTOD001 External Reference ID of the on duty visit |
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
{- "code": 200,
- "title": "Success",
- "message": "success",
- "data": [
- {
- "extRefId": "EXTOD001",
- "empId": "EMP001",
- "empName": "User 01",
- "fromDate": "2001-10-10",
- "toDate": "2001-10-10",
- "dayType": "Full Day",
- "onDutyType": "ODV",
- "visitType": "Business Trip",
- "onDutyComment": "",
- "approvalStatus": "",
- "approvalDate": "",
- "approver": "",
- "approverComment": ""
}
], - "help": "",
- "identifier": ""
}Cancel on duty request in Truein
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Cancel on duty request
| empId | string ID for the employee |
| siteCode | string sitecode of the employee |
| visitType | string visit type of the employee |
| fromDate | string start date of the on duty visit |
| toDate | string end date of the on duty visit |
| dayType | string type of the on type visit, Full Day or Half Day |
| onDutyComment | string comments during adding the request |
| extRefId | string external reference ID for the on duty visit request |
{- "empId": "EMP001",
- "siteCode": "ST009",
- "visitType": "Business Trip",
- "fromDate": "2001-10-10",
- "toDate": "2001-10-10",
- "dayType": "Full Day",
- "onDutyComment": "Discussion on Foreign Policies",
- "extRefId": "EXT0D10010"
}{- "code": 200,
- "title": "Success",
- "message": "successfully cancelled",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add job details
| siteCode | string The site code associated with the job |
| jobCode | string The unique job code |
| jobName | string The name of the job |
| budget_hours | number Maximum working hours for the job (Optional) |
| job_expiration_date | string The date until which the job is valid (Optional) |
| company_code | string The company code |
| jobType | string Job type (Optional) |
| job_manager_emp_id | string If the job manager's employee ID does not have access to the site, it will be granted as additional site access. |
| job_categories | string Comma-separated category names to associate with the job. Categories must exist in the system. |
| geofencingLocations | string (Optional) Comma-separated geofencing location names where attendance can be marked for this job. Use "all" to allow all locations. Location names must exist in the system. |
| map_activity_codes | string (Optional) Comma-separated activity codes to map to this job. Use "all" to allow all activities. Activity codes must exist in the system. Example: "ACT001,ACT002" or "all" |
| mapped_device_names | string (Optional) Comma-separated device names to map to this job. Use "all" to allow all devices. Device names must exist in the system. Example: "Device1,Device2" or "all" |
| restrict_max_working_hrs | number (Optional) Flag to restrict maximum working hours. Set to 1 to enable restriction, 0 to disable. No other value accepted |
| attendance_limit | number (Optional) Maximum number of attendance records allowed for this job. Set to 0 for unlimited. |
| department_names | string (Optional) Comma-separated department names to associate with this job. Use "all" to allow all departments. Department names must exist in the system. |
[- {
- "siteCode": "ST0022",
- "jobCode": "ABC456",
- "jobName": "ABC123 TEST",
- "budget_hours": 99,
- "job_expiration_date": "",
- "company_code": "CC11",
- "jobType": "FULL_TIME",
- "job_manager_emp_id": "1531",
- "job_categories": "Admin,Tech",
- "geofencingLocations": "Main Office, Warehouse A",
- "map_activity_codes": "ACT001,ACT002",
- "mapped_device_names": "Device1,Device2",
- "restrict_max_working_hrs": 1,
- "attendance_limit": 8,
- "department_names": "Department1,Department2"
}
]{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": {
- "total_success": 1,
- "total_fail": 0,
- "data_success": [
- {
- "siteCode": "ST0022",
- "jobCode": "ABC456",
- "jobName": "ABC123 TEST",
- "budget_hours": 99,
- "job_expiration_date": "",
- "company_code": "CC11",
- "jobType": "FULL_TIME",
- "job_manager_emp_id": "",
- "job_categories": "Admin,Tech",
- "message": "Success"
}
], - "data_fail": [ ]
}, - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Get job details
| siteCodes | string The site code for which job details are retrieved |
| jobCode | string Specific job code to filter results (Optional) |
| jobTypes | string Specific job type to filter results (Optional) |
{- "siteCodes": "ST0022",
- "jobCode": "ABC456",
- "jobTypes": "FULL_TIME"
}{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": [
- {
- "jobCode": "ABC456",
- "jobName": "ABC456 TEST",
- "companyCode": "CC11",
- "siteCode": "ST0022",
- "jobTypes": "FULL_TIME",
- "jobManager": "John Doe",
- "jobManagerEmpId": "EMP001",
- "jobCategories": "Admin,Tech",
- "geofencingLocations": "Location1,Location2",
- "budget_hours": 40,
- "jobExpirationDate": "2024-12-31",
- "mapActivityCodes": "ACT001,ACT002",
- "mappedDeviceNames": "Device1,Device2",
- "restrictMaxWorkingHrs": 1,
- "attendanceLimit": 5,
- "departmentNames": "Engineering,Operations"
}
], - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update job detail
| siteCode | string The site code for the job |
| jobCode | string The job code to be updated |
| jobName | string The name of the job |
| budget_hours | number Maximum working hours for the job (Optional) |
| job_expiration_date | string The date until which the job is valid (Optional) |
| company_code | string Company code |
| jobType | string Job type to be updated (Optional) |
| job_manager_emp_id | string If the job manager employee ID does not have access to the site, it will be granted as additional site access. |
| dept_codes | string Department Code to be updated (Optional) |
| job_categories | string (Optional) Comma-separated category names to associate with the job. Categories must exist in the system. |
| geofencingLocations | string (Optional) Comma-separated geofencing location names where attendance can be marked for this job. Use "all" to allow all locations. |
| map_activity_codes | string (Optional) Comma-separated activity codes to map to this job. Use "all" to allow all activities. Activity codes must exist in the system. |
| mapped_device_names | string (Optional) Comma-separated device names to map to this job. Use "all" to allow all devices. Device names must exist in the system. |
| restrict_max_working_hrs | number (Optional) Flag to restrict maximum working hours. Set to 1 to enable restriction, 0 to disable. |
| description | string (Optional) Detailed description of the job. If not provided, the jobName will be used as the description. |
| attendance_limit | number (Optional) Maximum number of attendance records allowed for this job. |
| department_names | string (Optional) Comma-separated department names to associate with this job. Use "all" to allow all departments. Department names must exist in the system. |
{- "siteCode": "ST0022",
- "jobCode": "ABC456",
- "jobName": "ABC456 Test",
- "budget_hours": 45,
- "job_expiration_date": "",
- "company_code": "CC11",
- "jobType": "FULL_TIME",
- "job_manager_emp_id": "",
- "dept_codes": "",
- "job_categories": "Admin,tech",
- "geofencingLocations": "Main Office, Warehouse A",
- "map_activity_codes": "ACT001,ACT002",
- "mapped_device_names": "Device1,Device2",
- "restrict_max_working_hrs": 1,
- "description": "Job Description",
- "attendance_limit": 8,
- "department_names": "Department1,Department2"
}{- "code": 200,
- "title": "Success",
- "message": "successfully updated.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete job detail
| siteCode | string The site code where the job is located |
| jobCode | string Unique job identifier to be deleted |
{- "siteCode": "ST0022",
- "jobCode": "ABC456"
}{- "code": 1,
- "title": "Success",
- "message": "Job deleted successfully.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add cost center
| siteCode | string The site code associated with the cost center |
| jobCode | string The job code linked to the cost center (Optional) |
| costCenterCode | string The unique cost center code |
| costCenterName | string The name of the cost center |
| description | string Additional description for the cost center (Optional) |
| category | string Multiple Staff Category for the cost center (Optional) |
[- {
- "siteCode": "ST0022",
- "jobCode": "JOBC11",
- "costCenterCode": "COST123",
- "costCenterName": "COST123 TEST",
- "description": "COST description",
- "category": "Admin,Tech"
}
]{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": {
- "total_success": 1,
- "total_fail": 0,
- "data_success": [
- {
- "costCenterCode": "COST123",
- "costCenterName": "COST123 TEST"
}
], - "data_fail": [ ]
}, - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Get cost center
| siteCodes | string The site code for filtering cost centers |
| costCenterCode | string The specific cost center code (Optional) |
| jobCodes | string The specific job codes associated with cost centers (Optional) |
{- "siteCodes": "ST0022",
- "costCenterCode": "COST123",
- "jobCodes": ""
}{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": [
- {
- "cost_center_id": 2,
- "costCenterName": "COST123 TEST",
- "costCenterCode": "COST123",
- "siteCode": "ST0022",
- "category": "Admin,Tech"
}
], - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update cost center
| siteCode | string The site code associated with the cost center |
| jobCode | string The job code associated with the cost center (Optional) |
| costCenterCode | string The unique cost center code to be updated |
| costCenterName | string The name of the cost center |
| description | string Additional description of the cost center (Optional) |
| category | string Update the staff category of cost center.If the field is not passed in the request body, it will not be updated. If the field is passed as an empty string, it will clear the category. If the field is passed with values, it will overwrite all existing categories |
{- "siteCode": "ST0022",
- "jobCode": "JOB123",
- "costCenterCode": "COST123",
- "costCenterName": "COST123 TEST",
- "description": "cost center description",
- "category": "Admin,Tech"
}{- "code": 200,
- "title": "Success",
- "message": "successfully updated.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete cost center
| siteCode | string The site code associated with the cost center |
| costCenterCode | string The unique cost center code to be deleted |
{- "siteCode": "ST0022",
- "costCenterCode": "COST123"
}{- "code": 1,
- "title": "Success",
- "message": "Successfully deleted",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Add Activity
| siteCode | string The site code associated with the activity |
| jobCode | string The job code linked to the activity (Optional) |
| activityCode | string The unique activity code |
| activityName | string The name of the activity |
| description | string Additional description for the activity (Optional) |
| category | string Multiple Staff Category for the activity (Optional) |
[- {
- "siteCode": "ST0022",
- "jobCode": "JOBC11",
- "activityCode": "ACT123",
- "activityName": "ACT123 TEST",
- "description": "ACT description",
- "category": "Admin,Tech"
}
]{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": {
- "total_success": 1,
- "total_fail": 0,
- "data_success": [
- {
- "activityCode": "ACT123",
- "activityName": "ACT123 TEST"
}
], - "data_fail": [ ]
}, - "help": "",
- "identifier": ""
}Returns the activities configured for the site codes you supply — one record per activity. The response is not paginated; a single call returns the complete list for those sites. To retrieve every activity on the account, pass all of your site codes in siteCodes.
• Note :
siteCodes is required. An empty request body does not return everything - it fails with "invalid input, site code not found.". Fetch your site codes from getClientSites.
Only currently active activities are returned; deleted activities and activities at inactive sites are excluded.
Site codes that match nothing are ignored rather than reported, so a smaller-than-expected list usually means a site code was mistyped.
• Request URL :
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Get Activity
| siteCodes required | string Site codes whose activities you want. Accepts multiple values, comma-separated. Required — if omitted or empty the call fails with "invalid input, site code not found." rather than returning all activities. Site codes are available from |
| activityCode | string Narrows the list to activities matching this text. This is a partial match against both the activity code and the activity name, so "ACT1" also returns "ACT10" and any activity whose name contains "ACT1". It is a search filter rather than an exact lookup. (Optional) |
| jobCodes | string Returns only activities mapped to this job. Provide a single job code — comma-separated values are not supported here and will return no records. (Optional) |
{- "siteCodes": "ST0022,ST0023",
- "activityCode": "ACT123",
- "jobCodes": "JOB01"
}{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": [
- {
- "activity_id": 2,
- "activityName": "ACT123 TEST",
- "activityCode": "ACT123",
- "siteCode": "ST0022",
- "category": "Admin,Tech"
}
], - "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Update Activity
| siteCode | string The site code associated with the activity |
| jobCode | string The job code associated with the activity (Optional) |
| activityCode | string The unique activity code to be updated |
| activityName | string The name of the activity |
| description | string Additional description of the activity (Optional) |
| category | string Update the staff category of activity.If the field is not passed in the request body, it will not be updated. If the field is passed as an empty string, it will clear the category. If the field is passed with values, it will overwrite all existing categories |
{- "siteCode": "ST0022",
- "jobCode": "JOB123",
- "activityCode": "ACT123",
- "activityName": "ACT123 TEST",
- "description": "activity description",
- "category": "Admin,Tech"
}{- "code": 200,
- "title": "Success",
- "message": "successfully updated.",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Delete Activity
| siteCode | string The site code associated with the activity |
| activityCode | string The unique activity code to be deleted |
{- "siteCode": "ST0022",
- "activityCode": "ACT123"
}{- "code": 1,
- "title": "Success",
- "message": "Successfully deleted",
- "type": "info",
- "data": { },
- "help": "",
- "identifier": ""
}Returns the Activity Timesheet — how each worked day was mapped across Jobs and Activities, with hours spent and approval status. One record per employee × date × job × activity.
Only includes employees with Activity Timesheet enabled, on days they have clocked out.
• Request URL :
https://api.truein.com/ext/v1/timesheet/getJobActivityAssignmentDtls
Limits: max range 31 days · fromDate <= toDate · 1 request per 40
seconds for the same payload ·
| Authorization required | Bearer Token Bearer {{access_token}} |
| Content-Type required | string application/json |
Get job Activity Assignment details
| fromDate | string Start date, YYYY-MM-DD. Defaults to today.
This is the date the timesheet was LAST UPDATED — approved, changed or newly
created on that date — even for attendance date is older. Example: a
timesheet for 1st Aug approved on 11th Aug is returned for fromDate = 11th Aug.
Note: when |
| toDate | string End date (inclusive), YYYY-MM-DD. Defaults to today.
Max 31 days from |
| status | string Approval status. Accepts multiple values, comma-separated. Options - pending, approved, rejected, draft, not_filled (attendance exists but no timesheet filled). Defaults to approved. (Optional) |
| siteCode | string Site code of the attendance site. Accepts multiple values, comma-separated. (Optional) |
| empId | string Employee ID. Accepts multiple values, comma-separated. (Optional) |
| category | string Staff category name, e.g. Worker, Permanent. Accepts multiple values, comma-separated. Matches if the employee has any of these. (Optional) |
| siteGroups | string Site group name. Accepts multiple values, comma-separated. Returns employees whose site belongs to these groups. (Optional) |
{- "fromDate": "2025-03-22",
- "toDate": "2025-03-22",
- "status": "pending,approved",
- "siteCode": "ST0022,ST0023",
- "empId": "C57879567554,31016",
- "category": "Worker,Other",
- "siteGroups": "Amana Group,Site Group 2"
}{- "code": 200,
- "title": "Success",
- "message": "success",
- "type": "info",
- "data": [
- {
- "uniqueId": 7018,
- "empId": "31016",
- "name": "MOHD ZAID",
- "designation": "Software Engineer",
- "department": "Enginnering",
- "attendanceDate": "2025-05-06",
- "baseSite": "ABC LIMITED",
- "jobCode": "AE052414",
- "jobDescription": "",
- "activityCode": "07.11.13",
- "activityDescription": "",
- "timeSpent": 120,
- "approvalStatus": "approved",
- "jobType": "Labour",
- "category": "Worker",
- "empType": "Permanent",
- "lastWorkingDay": "",
- "jobSite": "ABC LIMITED",
- "companyCode": "CC123",
- "weekNo": 10,
- "staffCompany": "Amana Steel",
- "contractor": "HRX Welders",
- "attendanceStatus": "PR",
- "start_time": "2025-05-06 09:00:00",
- "end_time": "2025-05-06 11:00:00",
- "activity_type": "productive"
}
], - "help": "",
- "identifier": ""
}