Skip to content
POST /unified/hris/employees

Query Parameters

Refer Specifying query parameters in Truto APIs

Show Truto-specific parameters
integrated_account_idstring · uuid
required·

The ID of the integrated account to use for the request.

Example: 62f44730-dd91-461e-bd6a-aedd9e0ad79d
truto_response_formatstring

The format of the response.

  • unified returns the response with unified mappings applied.
  • raw returns the unprocessed, raw response from the remote API.
  • normalized applies the unified mappings and returns the data in a normalized format.
  • stream returns 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.

Defaults to unified.

Example: unified
Possible values:
unifiedrawnormalizedstream
truto_ignore_remote_databoolean

Excludes the remote_data attribute from the response.

truto_exclude_fieldsstring[]

Array of fields to exclude from the response.

Example: truto_exclude_fields[]=id&truto_exclude_fields[]=name
remote_queryRecord<string, any>

Query parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.

Example: remote_query[foo]=bar

Request Body

Refer Writing data using Unified APIs

custom_fields
1 supported
BambooHR
supported
date_of_birthstring

This represents date of birth

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
emailsobject[]

The emails of the user

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
emailstring

The email address

is_primaryboolean

Whether the email address is primary

typestring

The type of email address

employee_numberstring

This represents the employee number

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
employment_statusstring

This represents the employment status. If no clear mapping is available, then the raw value is returned.

Possible values:
activeinactivependingactiveinactive
2 supported
Microsoft Dynamics 365 Business Central
supported
activeinactive
Workable
supported
employmentsobject[]

Represents a role or employment of the employee in the company

References: Employments → id
1 supported
Workable
supported
idstring
required·

The unique identifier for employments

created_atstring · date-time

This represents the date when the employments was created

effective_datestring · date-time

Represents the effective date of the employment

employeeobject

Employee associated with this employment

1 property
idstring

The unique identifier for employees

employment_typestring

This represents the employment type

Possible values:
full_timepart_timecontractinternshiptemporarytraineevolunteerper_diemfull_timepart_timecontract
end_datestring · date-time

Represents the end date of the employment

end_reasonstring

Represents why the employment ended

flsa_statusstring

This represents the flsa status

job_titlestring

Job title of the employee

pay_currencystring

This represents the pay currency

pay_frequencystring

This represents the pay frequency

pay_groupstring

This represents the pay group

pay_periodstring

This represents the pay period

pay_ratenumber

This represents the pay rate

updated_atstring · date-time

This represents the date when the employments was updated

ethnicitystring

This represent ethnicity

first_namestring

This represents the first name of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
genderstring

This represents gender

1 supported
Workable
supported
groupsobject[]

This represents the groups

References: Groups → id
1 supported
Workable
supported
idstring

The unique identifier for groups

namestring

Group's name

typestring

Type of the group. Some underlying providers use this to differentiate between in-built and user created groups.

home_locationobject[]

This represents the home location

References: Locations → id
1 supported
Workable
supported
citystring

The city of the home address

countrystring

The country of the home address

idstring

The unique identifier for locations

namestring

This represents the name of the location

postal_codestring

The postal code of the home address

statestring

The state/province of the home address

street_1string

The first line of home address

street_2string

The second line of home address

job_titlestring

Job title of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
last_namestring

This represents the last name of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
managerobject

Represents the manager of the employee. Is also an employee.

1 supported
Workable
supported
idstring

The unique identifier for employees

namestring

This represents the name of the employee

marital_statusstring

This represents marital status

1 supported
Workable
supported
middle_namestring

This represents the middle name of the employee

1 supported
Microsoft Dynamics 365 Business Central
supported
phonesobject[]

The phones of the user

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
numberstring
required·

The phone number

typestring
required·

The type of phone number

Possible values:
workmobile
extensionstring

The extension of the phone number

remote_dataRecord<string, any>

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.

ssnstring

This represents the ssn

start_datestring · date-time

This represents the start date

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
statestring

The state of the employee.

Possible values:
publisheddraft
1 supported1 required
Workable
required
publisheddraft
termination_datestring · date-time

This represents the termination date

1 supported
Microsoft Dynamics 365 Business Central
supported
termination_reasonstring

Represents the reason for termination

termination_typestring

Represents the type of termination. If no clear mapping exists, then raw value is returned.

Possible values:
voluntarydismissedredundancyend_of_contractretirementmutual
work_locationobject

This represents the work location

References: Locations → id
1 supported
Microsoft Dynamics 365 Business Central
supported
citystring

The city of the work address

countrystring

The country of the work address

idstring

The unique identifier for locations

namestring

This represents the name of the location

postal_codestring

The postal code of the work address

statestring

The state/province of the work address

street_1string

The first line of work address

street_2string

The second line of work address

Response Body

idstring
required·

The unique identifier for employees

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
avatarstring

This represents the avatar

1 supported
Workable
supported
companyobject

This represents the company

References: Companies → id
1 supported
Microsoft Dynamics 365 Business Central
supported
idstring

The unique identifier for companies

created_atstring · date-time

This represents the date when the Employee was created

date_of_birthstring

This represents date of birth

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
emailsobject[]

The emails of the user

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
emailstring

The email address

is_primaryboolean

Whether the email address is primary

typestring

The type of email address

employee_numberstring

This represents the employee number

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
employment_statusstring

This represents the employment status. If no clear mapping is available, then the raw value is returned.

Possible values:
activeinactivepending
2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
employmentsobject[]

Represents a role or employment of the employee in the company

References: Employments → id
1 supported
Workable
supported
idstring
required·

The unique identifier for employments

created_atstring · date-time

This represents the date when the employments was created

effective_datestring · date-time

Represents the effective date of the employment

employeeobject

Employee associated with this employment

1 property
idstring

The unique identifier for employees

employment_typestring

This represents the employment type

Possible values:
full_timepart_timecontractinternshiptemporarytraineevolunteerper_diem
end_datestring · date-time

Represents the end date of the employment

end_reasonstring

Represents why the employment ended

flsa_statusstring

This represents the flsa status

job_titlestring

Job title of the employee

pay_currencystring

This represents the pay currency

pay_frequencystring

This represents the pay frequency

pay_groupstring

This represents the pay group

pay_periodstring

This represents the pay period

pay_ratenumber

This represents the pay rate

updated_atstring · date-time

This represents the date when the employments was updated

etagstring

The unique identifier for the specific version of the resource.

1 supported
Microsoft Dynamics 365 Business Central
supported
ethnicitystring

This represent ethnicity

first_namestring

This represents the first name of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
genderstring

This represents gender

1 supported
Workable
supported
groupsobject[]

This represents the groups

References: Groups → id
1 supported
Workable
supported
idstring

The unique identifier for groups

namestring

Group's name

typestring

Type of the group. Some underlying providers use this to differentiate between in-built and user created groups.

home_locationobject[]

This represents the home location

References: Locations → id
1 supported
Workable
supported
citystring

The city of the home address

countrystring

The country of the home address

idstring

The unique identifier for locations

namestring

This represents the name of the location

postal_codestring

The postal code of the home address

statestring

The state/province of the home address

street_1string

The first line of home address

street_2string

The second line of home address

job_titlestring

Job title of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
last_namestring

This represents the last name of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
managerobject

Represents the manager of the employee. Is also an employee.

1 supported
Workable
supported
idstring

The unique identifier for employees

namestring

This represents the name of the employee

marital_statusstring

This represents marital status

1 supported
Workable
supported
middle_namestring

This represents the middle name of the employee

1 supported
Microsoft Dynamics 365 Business Central
supported
namestring

This represents the name of the employee

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
pay_groupobject

This represents the pay group

References: PayGroups → id
idstring

The unique identifier for pay groups

phonesobject[]

The phones of the user

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
extensionstring

The extension of the phone number

numberstring

The phone number

typestring

The type of phone number

remote_dataRecord<string, any>

Raw data returned from the remote API call.

ssnstring

This represents the ssn

start_datestring · date-time

This represents the start date

2 supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
tagsobject[]

The employee's tags

References: Tags → id
idstring

The tag's unique identifier

namestring

The tag's name

termination_datestring · date-time

This represents the termination date

1 supported
Microsoft Dynamics 365 Business Central
supported
termination_reasonstring

Represents the reason for termination

termination_typestring

Represents the type of termination. If no clear mapping exists, then raw value is returned.

Possible values:
voluntarydismissedredundancyend_of_contractretirementmutual
updated_atstring · date-time

This represents the date when the Employee was updated

1 supported
Microsoft Dynamics 365 Business Central
supported
usernamestring

This represents the username

work_locationobject

This represents the work location

References: Locations → id
1 supported
Microsoft Dynamics 365 Business Central
supported
citystring

The city of the work address

countrystring

The country of the work address

idstring

The unique identifier for locations

namestring

This represents the name of the location

postal_codestring

The postal code of the work address

statestring

The state/province of the work address

street_1string

The first line of work address

street_2string

The second line of work address

curl -X POST 'https://api.truto.one/unified/hris/employees?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",
  "middle_name": "your_middle_name",
  "emails": [],
  "phones": [],
  "date_of_birth": "your_date_of_birth",
  "ssn": "your_ssn",
  "gender": "your_gender",
  "ethnicity": "your_ethnicity",
  "marital_status": "your_marital_status",
  "home_location": [],
  "employee_number": "your_employee_number",
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "job_title": "your_job_title",
  "start_date": "your_start_date",
  "work_location": {},
  "groups": [],
  "manager": {},
  "state": "published",
  "remote_data": {}
}'
const integratedAccountId = '<integrated_account_id>';

const body = {
  "first_name": "your_first_name",
  "last_name": "your_last_name",
  "middle_name": "your_middle_name",
  "emails": [],
  "phones": [],
  "date_of_birth": "your_date_of_birth",
  "ssn": "your_ssn",
  "gender": "your_gender",
  "ethnicity": "your_ethnicity",
  "marital_status": "your_marital_status",
  "home_location": [],
  "employee_number": "your_employee_number",
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "job_title": "your_job_title",
  "start_date": "your_start_date",
  "work_location": {},
  "groups": [],
  "manager": {},
  "state": "published",
  "remote_data": {}
};

const response = await fetch(`https://api.truto.one/unified/hris/employees?integrated_account_id=${integratedAccountId}`, {
  method: 'POST',
  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"
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",
    "middle_name": "your_middle_name",
    "emails": [],
    "phones": [],
    "date_of_birth": "your_date_of_birth",
    "ssn": "your_ssn",
    "gender": "your_gender",
    "ethnicity": "your_ethnicity",
    "marital_status": "your_marital_status",
    "home_location": [],
    "employee_number": "your_employee_number",
    "employments": [],
    "employment_status": "active",
    "termination_type": "voluntary",
    "termination_reason": "your_termination_reason",
    "termination_date": "your_termination_date",
    "job_title": "your_job_title",
    "start_date": "your_start_date",
    "work_location": {},
    "groups": [],
    "manager": {},
    "state": "published",
    "remote_data": {}
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.unifiedApi.create(
  'hris',
  'employees',
  {
  "first_name": "your_first_name",
  "last_name": "your_last_name",
  "middle_name": "your_middle_name",
  "emails": [],
  "phones": [],
  "date_of_birth": "your_date_of_birth",
  "ssn": "your_ssn",
  "gender": "your_gender",
  "ethnicity": "your_ethnicity",
  "marital_status": "your_marital_status",
  "home_location": [],
  "employee_number": "your_employee_number",
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "job_title": "your_job_title",
  "start_date": "your_start_date",
  "work_location": {},
  "groups": [],
  "manager": {},
  "state": "published",
  "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.create(
        "hris",
        "employees",
        {
        "first_name": "your_first_name",
        "last_name": "your_last_name",
        "middle_name": "your_middle_name",
        "emails": [],
        "phones": [],
        "date_of_birth": "your_date_of_birth",
        "ssn": "your_ssn",
        "gender": "your_gender",
        "ethnicity": "your_ethnicity",
        "marital_status": "your_marital_status",
        "home_location": [],
        "employee_number": "your_employee_number",
        "employments": [],
        "employment_status": "active",
        "termination_type": "voluntary",
        "termination_reason": "your_termination_reason",
        "termination_date": "your_termination_date",
        "job_title": "your_job_title",
        "start_date": "your_start_date",
        "work_location": {},
        "groups": [],
        "manager": {},
        "state": "published",
        "remote_data": {}
},
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())