Update Employees
/unified/hris/employees/{id}
Partial response — use the "get" endpoint for the full object.
Path Parameters
The ID of the resource.
23423523Query Parameters
Refer Specifying query parameters in Truto APIs
The company to use, referencing companies.id. Optional: when omitted the account's company is looked up automatically. The request fails if the account can see more than one company and none is given.
1 supported
The unique identifier for companies
Flat alternative to company.id.
1 supported
The unique identifier for the specific version of the resource.
1 supported
Show Truto-specific parameters
The ID of the integrated account to use for the request.
62f44730-dd91-461e-bd6a-aedd9e0ad79dThe format of the response.
unifiedreturns the response with unified mappings applied.rawreturns the unprocessed, raw response from the remote API.normalizedapplies the unified mappings and returns the data in a normalized format.streamreturns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory.debugreturns the final unified result alongside raw remote fetch information. The response is an envelope containingresult(identical to unified mode output) anddebug(withrequestUrl,requestOptions,data,responseHeaders, and for list operations:nextCursor,isLooping,isEmptyResult,resultCount). When the upstream body exceeds 1 MiB,datais replaced by{ truto_truncated: true, truto_max_bytes, truto_excerpt }.debugisnullfor static responses or whentruto_skip_api_call=true.
Defaults to unified.
unifiedunifiedrawnormalizedstreamdebug
Excludes the remote_data attribute from the response.
Validates the request body against this method's request_body_schema before the request is sent to the underlying integration. When a field marked required is missing, Truto responds 400 with the missing field names under truto_error_insight.missing_required_body_fields instead of forwarding the call. Only the fields documented in request_body_schema are checked. A body carrying a non-empty remote_data object is forwarded unchecked, because remote_data is merged into the provider request and may already carry the required values. A field the mapping always supplies through its default body is treated as present, and a field that is only conditionally required is reported under truto_error_insight.conditionally_required_body_fields rather than rejected. Some integrations declare fields required on update that the provider only requires on create; check meta/{method} for the resource before enabling this on update calls. If you sent an Idempotency-Key and the request was rejected, use a fresh key when you retry with a corrected body: the idempotency cache is keyed on the integrated account, path and key only — it ignores the query string and the body — so reusing the key replays the rejection. Defaults to false, which forwards the request as-is.
Array of fields to exclude from the response.
truto_exclude_fields[]=id&truto_exclude_fields[]=nameQuery parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.
remote_query[foo]=barRequest Body
Refer Writing data using Unified APIs
1 supported
Date of birth, YYYY-MM-DD.
10 supported
Emails. The work or primary entry (or the first untyped one) becomes Sesame's email, the login and notification address; a personal entry becomes personalEmail. Other entries are not stored.
11 supported
The email address
Whether the email address is primary
The type of email address
Employee code. Sesame stores a whole number; any other value is sent as is and Sesame rejects it.
11 supported
active or inactive. Setting inactive disables the employee (they cannot sign in, and their Sesame licence is freed); active takes a licence. Prefer this over employees.delete: deleting a Sesame employee is irreversible — Sesame permanently removes the profile and all data associated with it (clock entries, time off, documents), and getting it back is a paid Sesame support request (29,99 EUR at the time of writing), not an API call (https://help.sesamehr.com/es_ES/gestion-de-empleados/puedo-eliminar-usuarios-de-mi-cuenta).
activeinactivependingactiveinactiveactiveinactiveactiveinactivependingactiveinactiveactiveinactive+ 2 more
9 supported
activeinactiveactiveinactiveactiveinactiveRepresents a role or employment of the employee in the company
6 supported
The unique identifier for employments
This represents the date when the employments was created
Represents the effective date of the employment
Employee associated with this employment
1 property
The unique identifier for employees
This represents the employment type
full_timepart_timecontractinternshiptemporarytraineevolunteerper_diem
Represents the end date of the employment
Represents why the employment ended
This represents the flsa status
Job title of the employee
This represents the pay currency
This represents the pay frequency
This represents the pay group
This represents the pay period
This represents the pay rate
This represents the date when the employments was updated
Ethnicity code. Paychex rejects changes for ACTIVE workers.
american_indian_or_alaskan_nativeasianblack_or_african_americanhispanic_or_latinonative_hawaiian_or_other_pacific_islandprefer_not_to_answertwo_or_more_raceswhite_not_of_hispanic_origin
2 supported
american_indian_or_alaskan_nativeasianblack_or_african_americanhispanic_or_latinonative_hawaiian_or_other_pacific_islandprefer_not_to_answertwo_or_more_raceswhite_not_of_hispanic_originFirst name.
10 supported
Gender. Sesame accepts female, male, non_binary_gender and no_response; companies in Mexico with an ADP or Nomitek integration accept only female and male.
malefemalenon_binarynot_specifiedmalefemalenot_specifiedfemalemalenon_binaryprefer_not_to_disclose
7 supported
malefemalenon_binarynot_specifiedmalefemalenot_specifiedfemalemalenon_binaryprefer_not_to_discloseSets the department (groups.id); the first entry is used. Send an empty array to unassign the department.
9 supported
The unique identifier for groups
Group's name
Type of the group. Some underlying providers use this to differentiate between in-built and user created groups.
Home address; only the first entry is used. street_1 and street_2 are joined into Sesame's single address line; state is Sesame's province; country is a two-letter ISO code.
8 supported
The city of the home address
The country of the home address
The unique identifier for locations
This represents the name of the location
The postal code of the home address
The state/province of the home address
The first line of home address
The second line of home address
The member's new job title (Justworks job_title). An empty value is not sent: Justworks does not document clearing a title. Justworks can change only the job title, the department and the manager (PATCH /v1/members/{member_id}); other employee fields in the body are ignored. Only the fields you send are sent; when the body has none of the three (or none usable), nothing is sent to Justworks and the member is returned unchanged. Justworks documents no side effects for this update (it may emit its member.profile.updated webhook; not documented). The response is the member read back after the update (employees.get).
9 supported
Last name.
10 supported
The member's manager (employees.id of another member), sent as manager_id. Removing a manager is not supported: Justworks does not document how to clear it. Justworks can change only the job title, the department and the manager (PATCH /v1/members/{member_id}); other employee fields in the body are ignored. Only the fields you send are sent; when the body has none of the three (or none usable), nothing is sent to Justworks and the member is returned unchanged. Justworks documents no side effects for this update (it may emit its member.profile.updated webhook; not documented). The response is the member read back after the update (employees.get).
7 supported
Manager's primary email.
This represents the name of the employee
Marital status, stored as sent (Sesame has no fixed list; its app uses single, married, divorced, widowed, separated, domestic_partnership and religious).
singlemarrieddivorcedwidowed
2 supported
Middle name. Paychex only stores an initial through the API, so only the first character is sent. On update, when any of first_name / last_name / middle_name is sent, the worker's current name is read from Paychex first and the whole name object is sent with the new parts (Paychex documents only whole-name updates).
4 supported
Initial password. A random one is generated when omitted and the user must change it at first login.
1 supported
Phones. A work entry becomes Sesame's workPhone; the first other entry (mobile, home, personal or untyped) becomes phone. Sesame stores no phone type.
10 supported
The phone number
The type of phone number
workmobile
The extension of the phone number
Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.
Social Security number.
4 supported
Hire date (date part is used). Paychex rejects changes for ACTIVE workers.
9 supported
End of employment (Kallidus leaveDate); only the date part (first 10 characters) is sent. Kallidus disables the account when the date is reached, so a future date schedules the leave. Send null to clear it (for example when re-hiring).
8 supported
Represents the reason for termination
4 supported
Represents the type of termination. If no clear mapping exists, then raw value is returned.
voluntarydismissedredundancyend_of_contractretirementmutual
4 supported
The Kallidus username: the unique sign-in name, 1-100 characters, no spaces (often an email address). Changing it changes how the person signs in. On tenants with an automated People-data feed, fields the feed manages are overwritten when the feed next runs.
3 supported
Work location (locations.id). Paychex requires the organization (groups) to be sent together with the location.
8 supported
The city of the work address
The country of the work address
The unique identifier for locations
This represents the name of the location
The postal code of the work address
The state/province of the work address
The first line of work address
The second line of work address
Response Body
The unique identifier for employees
11 supported
This represents the avatar
7 supported
This represents the company
8 supported
The unique identifier for companies
This represents the date when the Employee was created
7 supported
This represents date of birth
10 supported
The emails of the user
11 supported
The email address
Whether the email address is primary
The type of email address
This represents the employee number
11 supported
This represents the employment status. If no clear mapping is available, then the raw value is returned.
activeinactivepending
9 supported
Represents a role or employment of the employee in the company
6 supported
The unique identifier for employments
This represents the date when the employments was created
Represents the effective date of the employment
Employee associated with this employment
1 property
The unique identifier for employees
This represents the employment type
full_timepart_timecontractinternshiptemporarytraineevolunteerper_diem
Represents the end date of the employment
Represents why the employment ended
This represents the flsa status
Job title of the employee
This represents the pay currency
This represents the pay frequency
This represents the pay group
This represents the pay period
This represents the pay rate
This represents the date when the employments was updated
The unique identifier for the specific version of the resource.
1 supported
This represent ethnicity
2 supported
This represents the first name of the employee
10 supported
This represents gender
7 supported
This represents the groups
9 supported
The unique identifier for groups
Group's name
Type of the group. Some underlying providers use this to differentiate between in-built and user created groups.
This represents the home location
8 supported
The city of the home address
The country of the home address
The unique identifier for locations
This represents the name of the location
The postal code of the home address
The state/province of the home address
The first line of home address
The second line of home address
Job title of the employee
9 supported
This represents the last name of the employee
10 supported
Represents the manager of the employee. Is also an employee.
7 supported
The unique identifier for employees
This represents the name of the employee
This represents marital status
2 supported
This represents the middle name of the employee
4 supported
This represents the name of the employee
11 supported
This represents the pay group
The unique identifier for pay groups
The phones of the user
10 supported
The extension of the phone number
The phone number
The type of phone number
Raw data returned from the remote API call.
This represents the ssn
4 supported
This represents the start date
9 supported
The employee's tags
The tag's unique identifier
The tag's name
This represents the termination date
8 supported
Represents the reason for termination
4 supported
Represents the type of termination. If no clear mapping exists, then raw value is returned.
voluntarydismissedredundancyend_of_contractretirementmutual
4 supported
This represents the date when the Employee was updated
6 supported
This represents the username
3 supported
This represents the work location
8 supported
The city of the work address
The country of the work address
The unique identifier for locations
This represents the name of the location
The postal code of the work address
The state/province of the work address
The first line of work address
The second line of work address
truto unified hris employees '<resource_id>' \
-m update \
-a '<integrated_account_id>' \
-b '{
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
}' \
-o jsonimport Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const result = await truto.unifiedApi.update(
'hris',
'employees',
'<resource_id>',
{
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
},
{ integrated_account_id: '<integrated_account_id>' }
);
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.unified_api.update(
"hris",
"employees",
"<resource_id>",
{
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
},
{"integrated_account_id": "<integrated_account_id>"}
)
print(result)
asyncio.run(main())curl -X PATCH 'https://api.truto.one/unified/hris/employees/{id}?integrated_account_id=<integrated_account_id>' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
}'const integratedAccountId = '<integrated_account_id>';
const body = {
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
};
const response = await fetch(`https://api.truto.one/unified/hris/employees/{id}?integrated_account_id=${integratedAccountId}`, {
method: 'PATCH',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/unified/hris/employees/{id}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
"integrated_account_id": "<integrated_account_id>"
}
payload = {
"first_name": "your_first_name",
"last_name": "your_last_name",
"employee_number": "your_employee_number",
"emails": [],
"phones": [],
"date_of_birth": "your_date_of_birth",
"start_date": "your_start_date",
"employment_status": "active",
"middle_name": "your_middle_name",
"ssn": "your_ssn",
"gender": "male",
"ethnicity": "american_indian_or_alaskan_native",
"marital_status": "single",
"home_location": [],
"employments": [],
"termination_type": "voluntary",
"termination_reason": "your_termination_reason",
"termination_date": "your_termination_date",
"job_title": "your_job_title",
"groups": [],
"manager": {},
"password": "your_password",
"work_location": {},
"username": "your_username",
"remote_data": {}
}
response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())