Truein Integration APIs (1.0.11)

Get Access Token

Get Auth Token to use API

getAccessToken

Get Access Token

• Request URL :

https://api.truein.com/connect/token

• Note :

  1. Access Token will expire in 24 hours.
  2. You can use access token to Mark Clock In / Clock Out / updateAttendance / getTimesheetSummary.
header Parameters
Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "access_key_id": "XXXXXXXXXXX",
  • "secret_access_key": "XXXXXXXXXXXXXXXXXXXXXX",
  • "grant_type": "client_credentials"
}

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "data": [
    ]
}

Timesheets

Get Clock in/Clock out of all Staff

inOutDtls

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 :

  1. 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.

  2. 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.

  3. uid follows creation order, not punch time — a backdated punch created today gets a high uid and appears last despite an old inTime.

  4. 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.

query Parameters
lastUid
required
string

Pagination cursor. Send 0 on the first call, then the uid of the last record from the previous response. Applied together with from_date/to_date when those are also sent. Note that sending 0 without a date range returns today's punches only, not all history.

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 from_date, this filters on the Clock In time of the punch. A date without a time is treated as the end of that day (23:59:59), so sending the same value in from_date and to_date returns that whole day. Must not be later than 1 month in the future. When empty, records will be fetched based on lastUid When populated, records will be fetched from the date set in to_date,

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 A101, A102 will not match. Use A101,A102. (Optional)

header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "data": [
    ]
}

dailyAttendanceLog

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 :

  1. 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.

  2. All duration fields (workedHrs, regularHrs, breakHrs, paidBreakHrs, payableHrs, ot, timeSpent, lateBy) are returned in minutes despite the Hrs naming — "workedHrs": "480" means 8 hours.

  3. 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.

  4. 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

  5. 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.

  6. 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

query Parameters
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)

header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "moreRows": 0,
  • "lastUid": "0",
  • "data": [
    ]
}

getTimesheetSummary

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 :

  1. 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.

  2. 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.

  3. 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 :

https://api.truein.com/ext/v1/timesheet/getTimesheetSummary

query Parameters
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 GET /ext/v1/client-site/getClientSites, or view them in the Truein dashboard under Settings > Sites.

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 jobCode is used. (Optional)

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 includeJobWiseSummary=1 — sent on its own it is ignored. Employees with no matching job entries are excluded from the response, including employees with no attendance that would otherwise be returned by includeAbsent=1. (Optional)

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "data": [
    ]
}

getPunchLog

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 :

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. from_time must not be older than 2 years.

  8. 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.

query Parameters
lastUid
string

Pagination cursor. Send 0 on the first call, then the uid of the last record from the previous response. Applied together with from_time/to_time when those are also sent. Omitting it (or sending 0) with a time window re-reads that whole window and returns the latest stored values — the way to pick up regularized punches.

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, the end of the window is derived automatically to span 31 days. (Optional)

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 23:59:59 as the time — unlike a date-only filter, no end-of-day is assumed for you. The window must not exceed 31 days, otherwise the call fails with "invalid input, date range should not be more than 31 days". When sent without from_time, the start of the window is derived automatically. (Optional)

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)

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Success",
  • "data": {
    }
}

Time Tracking

Mark Clock In, Clock Out Staff in Truein. (Break, Activity Punch etc. (Coming Soon))

clockIn

Mark Clock In

• Request URL :

https://api.truein.com/v1/time-tracking/clockIn

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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
latitude
string

Latitude of the location where you want to Mark Clock In punch. (Optional)

longitude
string

Longitude of the location where you want to Mark Clock In punch. (Optional)

jobCode
string

Job Code. (Optional)

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ABC1234",
  • "empId": "1234",
  • "inTime": "2024-01-01 10:00:00",
  • "staffPic": "",
  • "coordinates": {
    },
  • "jobCode": "JOB123"
}

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "data": [ ]
}

clockOut

Mark Clock Out

• Request URL :

https://api.truein.com/v1/time-tracking/clockOut

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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
latitude
string

Latitude of the location where you want to Mark Clock Out punch. (Optional)

longitude
string

Longitude of the location where you want to Mark Clock Out punch. (Optional)

jobCode
string

Job Code. (Optional)

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ABC1234",
  • "empId": "1234",
  • "outTime": "2024-01-01 10:00:00",
  • "staffPic": "",
  • "coordinates": {
    },
  • "jobCode": "JOB123"
}

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "data": [ ]
}

updateAttendance

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.

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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
start_time
string

Start Time, Format(YYYY-MM-DD HH:mm:ss)

end_time
string

End Time, Format(YYYY-MM-DD HH:mm:ss)

punch_type
string

Its value will be 'break' in case of Break Punch

job_code
string

Populate only when you are adding a Work Punch

break_time_type
string

Populate only when you are adding a Break Punch

Responses

Request samples

Content type
application/json
{
  • "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": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully Regularized!",
  • "data": [ ]
}

Staff Master

Add, Edit, Delete Staff in Truein

addEmployeeDtls

Add new staff in Truein

• Request URL :

https://api.truein.com/apis/ext/attendance/v1.0/addEmployeeDtls

• Note :

  1. To bulk add multiple staff in one go, pass details as a json array of objects.
header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Request Body schema: 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.

email
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.

Responses

Request samples

Content type
application/json
{
  • "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 samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "data": [
    ]
}

getEmployeeDtls

query Parameters
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

header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Success",
  • "moreRows": "0",
  • "last_uid": "1432",
  • "data": [
    ]
}

updateEmployeeDtls

Update staff in Truein

• Request URL :

https://api.truein.com/apis/ext/attendance/v1.0/updateEmployeeDtls

• Note :

  1. Treat most fields as mandatory. This API rewrites the employee record with what you send, and a field you leave out is not always left untouched — many fields are reset to their default value instead, silently overwriting details already saved against that employee.
  2. Always send the employee's complete current details on every call, not only the fields you want to change. Fetch the record first using getEmployeeDtls, apply your changes to that payload, and post the full object back.
  3. Only a few fields keep their existing value when omitted — for example email, geofencingLocation, department, category, qualification, manager_emp_id, last_working_day and work_hour_config. Do not rely on this behaviour for any other field.
  4. Fields that have a defined default are set to that default when omitted — for example is_manager becomes false, publish_to_payroll becomes 0, and skipValidation becomes 0.
  5. Sending an empty string is not the same as omitting a field. An empty value is treated as a real value and can clear the data currently stored against that employee.
header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Request Body schema: 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

email
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)

Responses

Request samples

Content type
application/json
{
  • "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 samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Successfully Updated!"
}

deleteEmployeeDtls

header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Request Body schema: application/json

Delete staff

empId
string

Employee Id that needs to be updated

Responses

Request samples

Content type
application/json
{
  • "empId": "TR002"
}

Response samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Deleted Successfully!"
}

Configuration

Geofencing Locations

addUpdateGeofencingLocation

Add new or update existing geofencing location in Truein

• Request URL :

https://api.truein.com/apis/ext/attendance/v1.0/addUpdateGeofencingLocation

header Parameters
Subscription-key
required
string

API Access Key Found in your Truein admin dashboard.

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "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 samples

Content type
application/json
Example
{
  • "response": "Success",
  • "code": "200",
  • "message": "Geofencing Location added successfully"
}

getGeofencingLocations

Get existing geofencing location in Truein

• Request URL :

https://api.truein.com/ext/v1/geofencing-location/getGeoFencingLocations

query Parameters
siteCode
string

site code for the existing client site.

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "title": "Success",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

deactivateGeofencingLocations

Deactivate existing geofencing location in Truein

• Request URL :

https://api.truein.com/ext/v1/geofencing-location/deactivateGeoFencingLocation

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST1071",
  • "locationName": "Main Office"
}

Response samples

Content type
application/json
Example
{
  • "code": 200,
  • "title": "Geofencing location successfully deactivated",
  • "message": "Success",
  • "type": "Success",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

Leave

Get, Add, Update leave of staff

getLeave

This API retrieves leave details based on filter parameters like employee ID, site code, and leave dates.

• Request URL :

https://api.truein.com/ext/v1/leave/getLeave

query Parameters
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.
Note : If fromDate and toDate are not provided then the default value within the date range of previous 3 months and upcoming 3 months results are returned.

toDate
string <date>
Example: toDate=2024-08-31

Filter by end date.
Note : If fromDate and toDate are not provided then the default value within the date range of previous 3 months and upcoming 3 months results are returned.

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

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "data": [
    ]
}

addUpdateLeave

This API allows an employee to apply for or update a leave transaction.

• Request URL :

https://api.truein.com/ext/v1/leave/addUpdateLeave

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Leave applied successfully!",
  • "data": { }
}

updateLeaveStatus

API to update the status of an employee's leave request.

• Request URL :

https://api.truein.com/ext/v1/leave/updateLeaveStatus

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "empId": "2539",
  • "siteCode": "11",
  • "fromDate": "2024-03-08",
  • "toDate": "2024-03-08",
  • "leaveCode": "FLX",
  • "approvalStatus": "Reject",
  • "approverComment": "",
  • "extRefId": ""
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully Cancelled!",
  • "data": { }
}

Leave Lite

Get, Add, Update leave lite of staff

getLeaveLite

This API retrieves leave lite details based on filter parameters like employee ID, site code, and leave dates.

• Request URL :

https://api.truein.com/ext/v1/leave/getLeaveLite

query Parameters
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.

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "data": [
    ]
}

addLeaveLite

This API allows an employee to apply for a leave lite transaction.

• Request URL :

https://api.truein.com/ext/v1/leave/addLeaveLite

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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'

Responses

Request samples

Content type
application/json
{
  • "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
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Leave applied successfully!",
  • "data": { }
}

cancelLeaveLiteStatus

API to cancel the status of an employee's leave lite request.

• Request URL :

https://api.truein.com/ext/v1/leave/cancelLeaveLiteStatus

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "empId": "2539",
  • "siteCode": "11",
  • "fromDate": "2024-03-08",
  • "toDate": "2024-03-08",
  • "fromDateHalfDay": "First Half",
  • "leaveCode": "PTO",
  • "approverComment": ""
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully Cancelled!",
  • "data": { }
}

Alerts

Get spoofing data and alerts

getSpoofPunches

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 :

  1. Both fromDate and toDate are mandatory parameters.
  2. Maximum date range allowed is 1 year (365 days).
  3. If siteCodes are not provided, data will be returned for all sites of the client.
  4. If empIds are not provided, data will be returned for all employees.
query Parameters
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.

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Spoofed attendance records fetched successfully",
  • "type": "info",
  • "data": [
    ],
  • "count": 2,
  • "help": ""
}

Kiosk Device

Add, Update, Get, Delete Kiosk Devices in Truein

addKioskDevice

Add a new kiosk device to a site

• Request URL :

https://api.truein.com/ext/v1/kiosk-device/addKioskDevice

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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)

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "kioskName": "Main Gate Kiosk",
  • "location": "Warehouse A",
  • "description": "Entry gate device",
  • "captureMode": "touch",
  • "geofencing": "Main Gate,Parking Area"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "kiosk device added successfully.",
  • "type": "info",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

updateKioskDevice

Update an existing kiosk device

• Request URL :

https://api.truein.com/ext/v1/kiosk-device/updateKioskDevice

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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)

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "kioskId": 100294,
  • "kioskName": "Updated Kiosk",
  • "location": "Floor 2",
  • "description": "Updated description",
  • "geofencing": "Main Gate"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "kiosk device updated successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getKioskDevice

Get kiosk device(s)

• Request URL :

https://api.truein.com/ext/v1/kiosk-device/getKioskDevice

query Parameters
siteCode
any
Example: siteCode=ST001

Filter by site code

kioskId
any
Example: kioskId=100294

Filter by kiosk device ID

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "kiosk device list fetched successfully.",
  • "type": "info",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

deleteKioskDevice

Delete a kiosk device

• Request URL :

https://api.truein.com/ext/v1/kiosk-device/deleteKioskDevice

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Delete kiosk device

siteCode
string

Site code the kiosk device belongs to

kioskId
integer

Kiosk device ID to delete

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "kioskId": 100294
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "kiosk device deleted successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Shift

Get shift definitions in Truein

getShifts

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 :

https://api.truein.com/ext/v1/shift/getShifts

query Parameters
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).

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Shift list fetched successfully",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

addShift

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 :

  1. Identifiers are codes/names only (siteCode, shiftCode, category names). Times are 24-hour HH:mm.
  2. appliedToCategories and shiftDays are optional — omit or send [] to mean "all".

• Request URL :

https://api.truein.com/ext/v1/shift/addShift

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "shiftCode": "SHIFT001",
  • "shiftName": "First Shift",
  • "appliedToCategories": [
    ],
  • "startTime": "09:00",
  • "endTime": "18:00",
  • "graceTime": "00:10",
  • "shiftDays": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "shift added successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

updateShift

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 :

https://api.truein.com/ext/v1/shift/updateShift

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "shiftCode": "SHIFT001",
  • "shiftName": "First Shift",
  • "appliedToCategories": [
    ],
  • "startTime": "09:00",
  • "endTime": "18:00",
  • "graceTime": "00:10",
  • "shiftDays": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "shift updated successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deleteShift

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 :

https://api.truein.com/ext/v1/shift/deleteShift

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
siteCode
required
string

Site code the shift belongs to.

shiftCode
required
string

Shift code to delete.

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST001",
  • "shiftCode": "SHIFT001"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "shift deleted successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Scheduling

Create / update, retrieve, and delete Shift, Job, and Weekly-Off schedules for employees.

updateSchedule

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 :

  1. date must be today or later and no more than 3 months ahead.
  2. To schedule Weekly-Off, keep 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.
  3. type: shift needs the Shift module enabled; type: job needs the Job module enabled.
  4. A deactivated employee, an unknown code, or a code with an empty employee list is returned as a per-item failure (not a whole-call error).
  5. Requires a read-write access key.

• Request URL :

https://api.truein.com/ext/v1/schedule/updateSchedule

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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.

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST009",
  • "date": "2026-08-01",
  • "type": "shift",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "type": "info",
  • "message": "schedule updated successfully.",
  • "code": 200,
  • "data": {
    }
}

getSchedule

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 :

  1. pageSize defaults to 100 and is capped at 500.
  2. weeklyOff is true only when the day is marked Weekly-Off and not since removed.
  3. Results are scoped to the requested siteCode only — employees belonging to other sites are never returned.

• Request URL :

https://api.truein.com/ext/v1/schedule/getSchedule

query Parameters
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)

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "type": "info",
  • "message": "schedule fetched successfully.",
  • "code": 200,
  • "data": {
    }
}

deleteSchedule

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 :

  1. fromDate must be today or later; toDate must be ≥ fromDate and no more than 3 months ahead.
  2. scheduleType selects what to delete: ALL | SHIFT | JOB | SHIFT_JOB | WEEKLY_OFF.
  3. An employee with no matching schedule in the range is returned in failures with reason "no schedule found for the given date range."
  4. Requires a read-write access key.

• Request URL :

https://api.truein.com/ext/v1/schedule/deleteSchedule

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST009",
  • "fromDate": "2026-08-01",
  • "toDate": "2026-08-05",
  • "employeeIds": "EMP001,EMP002",
  • "scheduleType": "SHIFT"
}

Response samples

Content type
application/json
{
  • "type": "info",
  • "message": "schedule deleted successfully.",
  • "code": 200,
  • "data": {
    }
}

Punch Checklist

getPunchChecklistAnswers

Get Punch Check List Answers

• Request URL :

https://api.truein.com/ext/v1/timesheet/getPunchChecklistAnswers

query Parameters
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

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Success",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

addPunchQuestion

Add a new punch checklist question.

• Request URL :
https://api.truein.com/ext/v1/punch-checklist/addPunchQuestion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required

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:

  • List of values (Single)
  • Multiple List of Values
  • Smileys
  • Yes/No
  • Textbox
  • Image
questionTypeValue
string

Value depends on questionType:

  • List of values (Single) / Multiple List of Values → comma-separated values (e.g. "Opt1,Opt2,Opt3")
  • Yes/No → must be exactly: Yes,No,None
  • Smileys → must be exactly: Not Good,Okay,Good,Very Good
  • Image/Textbox → must be an empty string ("").
defaultAnswer
string

Default answer rules based on questionType:

  • List of values (Single) / Multiple List of Values → one of questionTypeValue + "None"
  • Textbox → must be string
  • Yes/No → Yes | No | None
  • Smileys → None | Not Good | Okay | Good | Very Good
  • Image → must be blank ("").
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:

  • Yes/No → Yes or No
  • Smileys → Not Good | Okay | Good | Very Good
  • List of values (Single) / Multiple List of Values → must match questionTypeValue
  • Image/Textbox → not allowed (must be blank)
action1
string
Enum: "Block Punch" "Notify Manager" "None"

Action 1 based on questionType:

  • Yes/No → Allowed
  • Smileys → Allowed
  • List of values (Single) / Multiple List of Values → Allowed
  • Image/Textbox → NOT allowed (must be blank)
cond2
string

Condition 2 based on questionType:

  • Yes/No → Yes or No
  • Smileys → Not Good | Okay | Good | Very Good
  • List of values (Single) / Multiple List of Values → must match questionTypeValue
  • Image/Textbox → not allowed (must be blank) Condition 2 not matched with Condition 1.
action2
string
Enum: "Block Punch" "Notify Manager" "None"

Action 2 based on questionType:

  • Yes/No → Allowed
  • Smileys → Allowed
  • List of values (Single) / Multiple List of Values → Allowed
  • Image/Textbox → NOT allowed (must be blank)

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

updatePunchQuestion

Update an existing punch checklist question.

• Request URL :
https://api.truein.com/ext/v1/punch-checklist/updatePunchQuestion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required

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:

  • List of values (Single)
  • Multiple List of Values
  • Smileys
  • Yes/No
  • Textbox
  • Image
questionTypeValue
string

Value depends on questionType:

  • List of values (Single) / Multiple List of Values → comma-separated values (e.g. "Opt1,Opt2,Opt3")
  • Yes/No → must be exactly: Yes,No,None
  • Smileys → must be exactly: Not Good,Okay,Good,Very Good
  • Image/Textbox → must be an empty string ("").
defaultAnswer
string

Default answer rules based on questionType:

  • List of values (Single) / Multiple List of Values → one of questionTypeValue + "None"
  • Textbox → must be string
  • Yes/No → Yes | No | None
  • Smileys → None | Not Good | Okay | Good | Very Good
  • Image → must be blank ("").
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:

  • Yes/No → Yes or No
  • Smileys → Not Good | Okay | Good | Very Good
  • List of values (Single) / Multiple List of Values → must match questionTypeValue
  • Image/Textbox → not allowed (must be blank)
action1
string
Enum: "Block Punch" "Notify Manager" "None"

Action 1 based on questionType:

  • Yes/No → Allowed
  • Smileys → Allowed
  • List of values (Single) / Multiple List of Values → Allowed
  • Image/Textbox → NOT allowed (must be blank)
cond2
string

Condition 2 based on questionType:

  • Yes/No → Yes or No
  • Smileys → Not Good | Okay | Good | Very Good
  • List of values (Single) / Multiple List of Values → must match questionTypeValue
  • Image/Textbox → not allowed (must be blank) Condition 2 not matched with Condition 1.
action2
string
Enum: "Block Punch" "Notify Manager" "None"

Action 2 based on questionType:

  • Yes/No → Allowed
  • Smileys → Allowed
  • List of values (Single) / Multiple List of Values → Allowed
  • Image/Textbox → NOT allowed (must be blank)

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deletePunchQuestion

Delete or mark a punch checklist question as inactive.

• Request URL :
https://api.truein.com/ext/v1/punch-checklist/deletePunchQuestion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required

Delete existing punch checklist question

punchQnId
required
integer

Unique ID of the punch checklist question to delete

Responses

Request samples

Content type
application/json
{
  • "punchQnId": 286
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getPunchQuestion

Get punch checklist questions for a given site or employee.

• Request URL :
https://api.truein.com/ext/v1/punch-checklist/getPunchQuestion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json
required

Retrieve punch checklist question details

siteCodes
string

Applicable site codes must be comma-separated (e.g. "ST009,ST005").
Use "all" to fetch for all sites.

Responses

Request samples

Content type
application/json
{
  • "siteCodes": "ST009"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": [
    ]
}

Client Site

addClientSite

Add new client site in Truein

• Request URL :

https://api.truein.com/ext/v1/client-site/addClientSite

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully created.",
  • "title": "Success",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

updateClientSite

Update existing client site in Truein

• Request URL :

https://api.truein.com/ext/v1/client-site/updateClientSite

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "",
  • "message": "Successfully updated.",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getClientSites

Get existing client site in Truein

• Request URL :

https://api.truein.com/ext/v1/client-site/getClientSites

query Parameters
siteCode
any
Example: siteCode=ST1070

siteCode of the client site

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Client site list fetched successfully",
  • "data": [
    ],
  • "help": "",
  • "indentifier": ""
}

Public Holiday

addPublicHoliday

Add public holiday in Truein

• Request URL :

https://api.truein.com/ext/v1/holiday/addPublicHoliday

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "holidayDate": "2024-12-25",
  • "holidayName": "Christmas Holiday",
  • "siteCode": "ST1070",
  • "extRefId": "2321IU9000TU"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Successfully added!",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

updatePublicHoliday

Update existing public holiday in Truein

• Request URL :

https://api.truein.com/ext/v1/holiday/updatePublicHoliday

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "holidayDate": "2024-12-25",
  • "holidayName": "Christmas Holiday",
  • "addSiteCode": "ST1070",
  • "removeSiteCode": "ST1020",
  • "extRefId": "2321IU9000TU"
}

Response samples

Content type
application/json
Example
{
  • "code": 200,
  • "title": "Success",
  • "message": "Holiday updated!",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getPublicHoliday

Get public holidays in Truein

• Request URL :

https://api.truein.com/ext/v1/holiday/getPublicHoliday

query Parameters
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.

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "string",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

deletePublicHoliday

Get public holidays in Truein

• Request URL :

https://api.truein.com/ext/v1/holiday/deletePublicHoliday

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "holidayDate": "2024-008-15",
  • "extRefId": "2321IU9000TU"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "data": { },
  • "message": "Holiday deleted!",
  • "help": "",
  • "identifier": ""
}

Region

addRegion

Add Region and Region Head in Truein

• Request URL :

https://api.truein.com/ext/v1/region/addRegion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Add new region

regionName
string

Region Name

regionHeadEmpId
string

Region Head Employee Id

Responses

Request samples

Content type
application/json
{
  • "regionName": "North Region",
  • "regionHeadEmpId": "EMP001"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Region Successfully added.",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getRegions

Get Region and Region Head in Truein

• Request URL :

https://api.truein.com/ext/v1/region/getRegions

query Parameters
regionName
string

region Name for which the details will be provided

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Success",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

updateRegion

Update Region and Region Head in Truein

• Request URL :

https://api.truein.com/ext/v1/region/updateRegion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Update existing region

regionName
string

Region Name

regionHeadEmpId
string

Region Head Employee Id

Responses

Request samples

Content type
application/json
{
  • "regionName": "North Region",
  • "regionHeadEmpId": "EMP001"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully updated.",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deleteRegion

Delete Region in Truein

• Request URL :

https://api.truein.com/ext/v1/region/deleteRegion

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

delete existing region

regionName
string

Region name which will be deleted.

Responses

Request samples

Content type
application/json
{
  • "regionName": "North Region"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully deleted.",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Work-from-home

addWorkFromHomeRequest

Add work from home request in Truein

• Request URL :

https://api.truein.com/ext/v1/work-from-home/addWorkFromHomeRequest

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "empId": "EMP001",
  • "fromDate": "2001-10-10",
  • "toDate": "2001-10-10",
  • "extRefId": "EXTWFH001"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully added",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getWorkFromHomeRequest

Get work from home requests in Truein

• Request URL :

https://api.truein.com/ext/v1/work-from-home/getWorkFromHomeRequest

query Parameters
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

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "Success",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

cancelWorkFromHomeRequest

Cancel work from home requests in Truein

• Request URL :

https://api.truein.com/ext/v1/work-from-home/cancelWorkFromHomeRequest

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "empId": "EMP001",
  • "fromDate": "2001-10-10",
  • "toDate": "2001-10-10",
  • "extRefId": "EXTWFH001"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully cancelled",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

On-Duty

addOnDutyRequest

Add on duty request in Truein

• Request URL :

https://api.truein.com/ext/v1/on-duty/addOnDutyRequest

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully added",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

getOnDutyRequest

Get on duty request in Truein

• Request URL :

https://api.truein.com/ext/v1/on-duty/getOnDutyRequest

query Parameters
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

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

cancelOnDutyRequest

Cancel on duty request in Truein

• Request URL :

https://api.truein.com/ext/v1/on-duty/cancelOnDutyRequest

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully cancelled",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Job

addJobDtls

Add Multiple Jobs

• Request URL :

https://api.truein.com/ext/v1/jobs/addJobDtls

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Add job details

Array
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.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

getJobDtls

Get Job Details

• Request URL :

https://api.truein.com/ext/v1/jobs/getJobDtls

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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)

Responses

Request samples

Content type
application/json
{
  • "siteCodes": "ST0022",
  • "jobCode": "ABC456",
  • "jobTypes": "FULL_TIME"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

updateJobDtls

Update Job Detail

• Request URL :

https://api.truein.com/ext/v1/jobs/updateJobDtls

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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.

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully updated.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deleteJobDtls

Delete Job Detail

• Request URL :

https://api.truein.com/ext/v1/jobs/deleteJobDtls

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Delete job detail

siteCode
string

The site code where the job is located

jobCode
string

Unique job identifier to be deleted

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "jobCode": "ABC456"
}

Response samples

Content type
application/json
{
  • "code": 1,
  • "title": "Success",
  • "message": "Job deleted successfully.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Cost Center

addCostCenter

Add Multiple Cost Center

• Request URL :

https://api.truein.com/ext/v1/cost-center/addCostCenter

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Add cost center

Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

getCostCenter

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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)

Responses

Request samples

Content type
application/json
{
  • "siteCodes": "ST0022",
  • "costCenterCode": "COST123",
  • "jobCodes": ""
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

updateCostCenter

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "jobCode": "JOB123",
  • "costCenterCode": "COST123",
  • "costCenterName": "COST123 TEST",
  • "description": "cost center description",
  • "category": "Admin,Tech"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully updated.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deleteCostCenter

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "costCenterCode": "COST123"
}

Response samples

Content type
application/json
{
  • "code": 1,
  • "title": "Success",
  • "message": "Successfully deleted",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Activity

addActivity

Add Multiple Activity

• Request URL :

https://api.truein.com/ext/v1/activity/addActivity

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Add Activity

Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": {
    },
  • "help": "",
  • "identifier": ""
}

getActivity

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 :

  1. 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.

  2. Only currently active activities are returned; deleted activities and activities at inactive sites are excluded.

  3. 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 :

https://api.truein.com/ext/v1/activity/getActivity

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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 getClientSites.

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)

Responses

Request samples

Content type
application/json
{
  • "siteCodes": "ST0022,ST0023",
  • "activityCode": "ACT123",
  • "jobCodes": "JOB01"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}

updateActivity

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "jobCode": "JOB123",
  • "activityCode": "ACT123",
  • "activityName": "ACT123 TEST",
  • "description": "activity description",
  • "category": "Admin,Tech"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "successfully updated.",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

deleteActivity

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Delete Activity

siteCode
string

The site code associated with the activity

activityCode
string

The unique activity code to be deleted

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "activityCode": "ACT123"
}

Response samples

Content type
application/json
{
  • "code": 1,
  • "title": "Success",
  • "message": "Successfully deleted",
  • "type": "info",
  • "data": { },
  • "help": "",
  • "identifier": ""
}

Job Assignment

getJobActivityAssignmentDtls

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 ·

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: 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 status is only approved, this matches the approval date, so timesheets not yet approved are excluded. (Optional)

toDate
string

End date (inclusive), YYYY-MM-DD. Defaults to today. Max 31 days from fromDate. Like fromDate, this is the date the timesheet was LAST UPDATED — approved, changed or newly created on that date. Note: when status is only approved, this matches the approval date. (Optional)

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)

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "title": "Success",
  • "message": "success",
  • "type": "info",
  • "data": [
    ],
  • "help": "",
  • "identifier": ""
}