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

Get Clock in/Clock out of all Staff

• Request URL :

https://api.truein.com/apis/ext/attendance/v1.0/inOutDtls?lastUid=0

• How to use :

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

-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

Value of last uid

from_date
string

When empty, records will be fetched based on lastUid When populated, records will be fetched from the date set in from_date. Format - yyyy-mm-dd

to_date
string

When empty, records will be fetched based on lastUid When populated, records will be fetched from the date set in to_date. Format - yyyy-mm-dd

emp_id
string

Employee Id. You can use comma-separated Employee IDs to fetch data for multiple employees.

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

Get full attendance log of staff including multiple in-outs, total time, OT, half day, late mark etc.

• Request URL :

https://api.truein.com/apis/ext/attendance/v1.0/dailyAttendanceLog?date=2020-07-31&lastUid=0

• How to use :

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

-If moreRows in the response is 0 then there are no more rows for the input date and 1 means additional rows for input date. Call API again with lastUid and same date to fetch additional rows.

• Note :

  1. If inLocation or outLocation is not mapped in truein then captured Latitude andLongitude will be sent in response.

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

  3. 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
date
required
string

Format (YYYY-MM-DD). If empty today's date will be considered.

lastUid
required
string

Value of last uid. If empty, it will be set as 0. Set as 0 to fetch records from beginning for the date provided, Set as lastUid to fetch remaining records

emp_id
string

Employee Id.

include_absent
string

Send 1 to include absent staff details otherwise send 0.

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 category.(comma seperated)

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": 1,
  • "lastUid": "0",
  • "data": [
    ]
}

getTimesheetSummary

Get Attendance Timesheet Summary

• Request URL :

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

query Parameters
siteCode
string
Example: siteCode=ABC1234

Enter Site Code of the site whose timesheet data you need. You can view/download Site Codes from the Truein dashboard -> Settings menu > Sites.

empId
string

Employee ID

includeAbsent
string

Send flag as 1 to include absent staff data

fromDate
string

Format - yyyy-mm-dd

toDate
string

Format - yyyy-mm-dd

category
string

Comma-separated category values

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 "C Leave" will appear as "CLeave_leave")

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": [
    ]
}

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

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

inTime
string

Clock In Time, Format(YYYY-MM-DD HH:mm:ss), populate this field to update In Time

outTime
string

Clock Out Time, Format(YYYY-MM-DD HH:mm:ss), populate this field to update Out Time

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

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",
  • "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.

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",
  • "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

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.

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",
  • "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": ""
}

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

header Parameters
Authorization
required
Bearer Token

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

Get Activity

siteCodes
string

The site code for filtering activity

activityCode
string

The specific activity code (Optional)

jobCodes
string

The specific job codes associated with activity (Optional)

Responses

Request samples

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

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

Get Job Activity Assignment Details

• Request URL :

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

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

siteCode
string

Filter by site code. If siteCode is omitted or empty, returns all users for all sitecodes. (Optional)

empId
string

Filter by employee ID. If empId is omitted or empty, returns all users. (Optional)

fromDate
string

Format - YYYY-MM-DD.Return data for this date. If omitted or empty, defaults to current date (or data whose modified date is current date ). (Optional)

toDate
string

Format - YYYY-MM-DD.Return data for this date. If omitted or empty, defaults to current date (or data whose modified date is current date ). (Optional)

status
string

Return records matching these statuses. Defaults to only approved records if omitted. Options- Pending,Approved,Rejected. (Optional)

category
string

Filter by comma seperated Category. (Optional)

Responses

Request samples

Content type
application/json
{
  • "siteCode": "ST0022",
  • "empId": "C57879567554",
  • "fromDate": "2025-03-22",
  • "toDate": "2025-03-22",
  • "status": "pending,approved",
  • "category": "Worker,Other"
}

Response samples

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