Skip to content
POST /unified/hris/employees

Partial response — use the "get" endpoint for the full object.

Query Parameters

Refer Specifying query parameters in Truto APIs

companyobject

This represents the company

References: Companies → id
2 supported2 notes
7shifts
supported

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.

Paychex
supported

The Paychex company to use, referencing companies.id (Paychex companyId). A company pinned on the connection (company_id in the integrated account context) always wins and this parameter is then ignored. Otherwise, when omitted, the credential's companies are looked up and the single company with API permission is used. The request fails with a 400 when no company can be resolved (the credential sees more than one company with API permission, none, or 100 or more companies).

idstring
required·

The unique identifier for companies

company_idstring

Flat alternative to company.id.

2 supported
7shifts
supported
Paychex
supported
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.
  • debug returns the final unified result alongside raw remote fetch information. The response is an envelope containing result (identical to unified mode output) and debug (with requestUrl, requestOptions, data, responseHeaders, and for list operations: nextCursor, isLooping, isEmptyResult, resultCount). When the upstream body exceeds 1 MiB, data is replaced by { truto_truncated: true, truto_max_bytes, truto_excerpt }. debug is null for static responses or when truto_skip_api_call=true.

Defaults to unified.

Example: unified
Possible values:
unifiedrawnormalizedstreamdebug
truto_ignore_remote_databoolean

Excludes the remote_data attribute from the response.

truto_enforce_write_schemaboolean

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.

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

companyobject

Optional. The Sesame company (companies.id). When omitted, Truto reads the token's company from GET /core/v3/info (one extra call).

References: Companies → id
7 supported1 required
Deel
required
7shifts
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
idstring

The unique identifier for companies

countrystring

Deel-specific: the country the employee is hired in (Deel employee.country, ISO 3166-1 alpha-2). Falls back to work_location.country.

1 supported
Deel
supported
custom_fields
1 supported
BambooHR
supported
date_of_birthstring

Date of birth, YYYY-MM-DD.

9 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
emailsobject[]

Email addresses. type is required and must be one of the tenant's UKG contact type names (for example Work); UKG keeps one address per contact type.

12 supported5 required
Deel
required
Google Workspace
required
Humaans
required
Omni HR
required
PayFit
required
7shifts
supported
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
emailstring
required·

The email address

is_primaryboolean

Whether the email address is primary

typestring

The type of email address

employee_numberstring

The UKG person number (unique in the tenant). The created employee is mapped from UKG's own answer to this call (UKG returns the person it created, with its personKey), so a create never loses the new employee's ID.

11 supported3 required
HR WORKS
required
Kallidus
required
UKG Dimensions
required
7shifts
supported
Google Workspace
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
Workable
supported
employment_statusstring

active (default) or inactive. An active employee takes one of the company's Sesame licences (a disabled employee frees it) and can sign in; Truto sends active when this is omitted, because Sesame requires a status. 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).

Possible values:
activeinactivependingactiveinactiveactiveinactivependingactiveinactiveactiveinactive
9 supported1 required
Kallidus
required
activeinactivepending
Microsoft Dynamics 365 Business Central
supported
activeinactive
Sesame
supported
activeinactive
7shifts
supported
HR WORKS
supported
Humaans
supported
Paychex
supported
UKG Dimensions
supported
Workable
supported
employmentsobject[]

Represents a role or employment of the employee in the company

References: Employments → id
6 supported1 required
Deel
required
7shifts
supported
HR WORKS
supported
Paychex
supported
UKG Dimensions
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_timefull_timepart_time+ 1 more
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

Possible values:
annuallymonthlysemimonthlybiweeklyweeklydailyhourly
pay_ratenumber

This represents the pay rate

updated_atstring · date-time

This represents the date when the employments was updated

ethnicitystring

Ethnicity code. Paychex rejects changes for ACTIVE workers.

Possible values:
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
1 supported
Paychex
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_origin
first_namestring

First name.

13 supported10 required
7shifts
required
Deel
required
Google Workspace
required
Humaans
required
Kallidus
required
Omni HR
required
Paychex
required
PayFit
required
Sesame
required
UKG Dimensions
required
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
genderstring

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.

Possible values:
malefemalenon_binarynot_specifiedmalefemalenot_specifiedmalefemalefemalemalenon_binary+ 1 more
6 supported
HR WORKS
supported
malefemalenon_binarynot_specified
Paychex
supported
malefemalenot_specified
Sesame
supported
femalemalenon_binaryprefer_not_to_disclose
Humaans
supported
Omni HR
supported
Workable
supported
groupsobject[]

The organization (groups.id); only the first entry is used. On create, Paychex can create the worker yet reject a value like this one: it answers 207 Multi-Status, Truto returns the created employee as a normal success, and Paychex's per-field errors are only in remote_data.errors (check them after a create).

References: Groups → id
9 supported1 required
Deel
required
7shifts
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
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[]

Postal addresses. name is the UKG address contact type name (for example Home) and is required; street_1, city, state, postal_code and country map to UKG's street, city, state, postalCode and country. UKG has no second street line.

References: Locations → id
8 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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

The name of an existing Omni position (job_roles.name), matched exactly (case-insensitive). A title that matches no position, or more than one, is refused with a 400 before anything is written to Omni HR; create the position first with job_roles create.

10 supported2 required
Deel
required
Humaans
required
7shifts
supported
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
last_namestring

Last name.

13 supported10 required
7shifts
required
Deel
required
Google Workspace
required
Humaans
required
Kallidus
required
Omni HR
required
Paychex
required
PayFit
required
Sesame
required
UKG Dimensions
required
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Workable
supported
managerobject

The manager (employees.id). UKG assigns a supervisor by person number, so the manager is read first (one extra call) and UKG's supervisorPersonNumber and supervisorName are sent; the manager must already exist in UKG.

6 supported
Google Workspace
supported
HR WORKS
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
supported
Workable
supported
idstring

Manager's primary email.

namestring

This represents the name of the employee

marital_statusstring

Marital status, stored as sent (Sesame has no fixed list; its app uses single, married, divorced, widowed, separated, domestic_partnership and religious).

Possible values:
singlemarrieddivorcedwidowed
3 supported
Omni HR
supported
singlemarrieddivorcedwidowed
Sesame
supported
Workable
supported
middle_namestring

Middle name. Paychex only stores an initial through the API, so only the first character is sent.

5 supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
supported
nationalitystring

Deel-specific: the nationality of the employee (Deel employee.nationality, e.g. US).

1 supported1 required
Deel
required
part_time_percentagenumber

Deel-specific: required when employment_type is part_time (1-99).

1 supported
Deel
supported
passwordstring

Initial password. A random one is generated when omitted and the user must change it at first login.

1 supported
Google Workspace
supported
phonesobject[]

Telephone numbers. type is required and must be one of the tenant's UKG telephone contact type names (for example Phone 1); UKG keeps one number per contact type and has no extension field.

9 supported
7shifts
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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.

send_invitationboolean

Not a unified field. true makes Sesame email an invitation to the work email (which is then required). Defaults to false: no email is sent.

1 supported
Sesame
supported
senioritystring

Deel-specific: the seniority of the employment (Deel employment.seniority, e.g. Senior).

1 supported1 required
Deel
required
ssnstring

Social Security number.

3 supported
HR WORKS
supported
Paychex
supported
Sesame
supported
start_datestring · date-time

Hire date (only the date part is sent, as UKG hireDate).

9 supported3 required
Deel
required
Humaans
required
Omni HR
required
7shifts
supported
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
UKG Dimensions
supported
Workable
supported
statestring

The state of the employee.

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

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.

6 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
UKG Dimensions
supported
termination_reasonstring

Represents the reason for termination

3 supported
HR WORKS
supported
Humaans
supported
Paychex
supported
termination_typestring

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

Possible values:
voluntarydismissedredundancyend_of_contractretirementmutual
2 supported
HR WORKS
supported
Humaans
supported
usernamestring

The UKG user account name. UKG requires a password with it (send remote_data.user.userAccount.userPassword) and a logon profile.

4 supported2 required
HR WORKS
required
Kallidus
required
7shifts
supported
UKG Dimensions
supported
work_locationobject

Work location (locations.id). Paychex requires the organization (groups) to be sent together with the location. On create, Paychex can create the worker yet reject a value like this one: it answers 207 Multi-Status, Truto returns the created employee as a normal success, and Paychex's per-field errors are only in remote_data.errors (check them after a create).

References: Locations → id
6 supported2 required
7shifts
required
Humaans
required
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
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

13 supported
7shifts
supported
Deel
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Kallidus
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
PayFit
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
avatarstring

This represents the avatar

6 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Paychex
supported
Sesame
supported
Workable
supported
companyobject

This represents the company

References: Companies → id
6 supported
7shifts
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
idstring

The unique identifier for companies

created_atstring · date-time

This represents the date when the Employee was created

4 supported
7shifts
supported
Google Workspace
supported
Humaans
supported
Sesame
supported
date_of_birthstring

This represents date of birth

9 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
emailsobject[]

The emails of the user

11 supported
7shifts
supported
Deel
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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

10 supported
7shifts
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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
8 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
employmentsobject[]

Represents a role or employment of the employee in the company

References: Employments → id
6 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Paychex
supported
UKG Dimensions
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

1 supported
Paychex
supported
first_namestring

This represents the first name of the employee

11 supported
7shifts
supported
Deel
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
genderstring

This represents gender

6 supported
HR WORKS
supported
Humaans
supported
Omni HR
supported
Paychex
supported
Sesame
supported
Workable
supported
groupsobject[]

This represents the groups

References: Groups → id
8 supported
7shifts
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
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
8 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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

9 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
last_namestring

This represents the last name of the employee

11 supported
7shifts
supported
Deel
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
supported
Workable
supported
managerobject

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

6 supported
Google Workspace
supported
HR WORKS
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
supported
Workable
supported
idstring

The unique identifier for employees

namestring

This represents the name of the employee

marital_statusstring

This represents marital status

3 supported
Omni HR
supported
Sesame
supported
Workable
supported
middle_namestring

This represents the middle name of the employee

5 supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
supported
namestring

This represents the name of the employee

11 supported
7shifts
supported
Deel
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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

9 supported
7shifts
supported
Google Workspace
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
Sesame
supported
UKG Dimensions
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

3 supported
HR WORKS
supported
Paychex
supported
Sesame
supported
start_datestring · date-time

This represents the start date

9 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
supported
UKG Dimensions
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

6 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Paychex
supported
UKG Dimensions
supported
termination_reasonstring

Represents the reason for termination

3 supported
HR WORKS
supported
Humaans
supported
Paychex
supported
termination_typestring

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

Possible values:
voluntarydismissedredundancyend_of_contractretirementmutual
2 supported
HR WORKS
supported
Humaans
supported
updated_atstring · date-time

This represents the date when the Employee was updated

4 supported
7shifts
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Sesame
supported
usernamestring

This represents the username

3 supported
7shifts
supported
HR WORKS
supported
UKG Dimensions
supported
work_locationobject

This represents the work location

References: Locations → id
6 supported
7shifts
supported
HR WORKS
supported
Humaans
supported
Microsoft Dynamics 365 Business Central
supported
Omni HR
supported
Paychex
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

truto unified hris employees \
  -m create \
  -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",
  "work_location": {},
  "groups": [],
  "middle_name": "your_middle_name",
  "ssn": "your_ssn",
  "gender": "male",
  "ethnicity": "american_indian_or_alaskan_native",
  "marital_status": "single",
  "home_location": [],
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "company": {},
  "manager": {},
  "job_title": "your_job_title",
  "country": "your_country",
  "nationality": "your_nationality",
  "seniority": "your_seniority",
  "part_time_percentage": 0,
  "password": "your_password",
  "username": "your_username",
  "send_invitation": true,
  "remote_data": {},
  "state": "published"
}' \
  -o 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",
  "employee_number": "your_employee_number",
  "emails": [],
  "phones": [],
  "date_of_birth": "your_date_of_birth",
  "start_date": "your_start_date",
  "work_location": {},
  "groups": [],
  "middle_name": "your_middle_name",
  "ssn": "your_ssn",
  "gender": "male",
  "ethnicity": "american_indian_or_alaskan_native",
  "marital_status": "single",
  "home_location": [],
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "company": {},
  "manager": {},
  "job_title": "your_job_title",
  "country": "your_country",
  "nationality": "your_nationality",
  "seniority": "your_seniority",
  "part_time_percentage": 0,
  "password": "your_password",
  "username": "your_username",
  "send_invitation": true,
  "remote_data": {},
  "state": "published"
},
  { 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",
        "employee_number": "your_employee_number",
        "emails": [],
        "phones": [],
        "date_of_birth": "your_date_of_birth",
        "start_date": "your_start_date",
        "work_location": {},
        "groups": [],
        "middle_name": "your_middle_name",
        "ssn": "your_ssn",
        "gender": "male",
        "ethnicity": "american_indian_or_alaskan_native",
        "marital_status": "single",
        "home_location": [],
        "employments": [],
        "employment_status": "active",
        "termination_type": "voluntary",
        "termination_reason": "your_termination_reason",
        "termination_date": "your_termination_date",
        "company": {},
        "manager": {},
        "job_title": "your_job_title",
        "country": "your_country",
        "nationality": "your_nationality",
        "seniority": "your_seniority",
        "part_time_percentage": 0,
        "password": "your_password",
        "username": "your_username",
        "send_invitation": True,
        "remote_data": {},
        "state": "published"
},
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())
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",
  "employee_number": "your_employee_number",
  "emails": [],
  "phones": [],
  "date_of_birth": "your_date_of_birth",
  "start_date": "your_start_date",
  "work_location": {},
  "groups": [],
  "middle_name": "your_middle_name",
  "ssn": "your_ssn",
  "gender": "male",
  "ethnicity": "american_indian_or_alaskan_native",
  "marital_status": "single",
  "home_location": [],
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "company": {},
  "manager": {},
  "job_title": "your_job_title",
  "country": "your_country",
  "nationality": "your_nationality",
  "seniority": "your_seniority",
  "part_time_percentage": 0,
  "password": "your_password",
  "username": "your_username",
  "send_invitation": true,
  "remote_data": {},
  "state": "published"
}'
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",
  "work_location": {},
  "groups": [],
  "middle_name": "your_middle_name",
  "ssn": "your_ssn",
  "gender": "male",
  "ethnicity": "american_indian_or_alaskan_native",
  "marital_status": "single",
  "home_location": [],
  "employments": [],
  "employment_status": "active",
  "termination_type": "voluntary",
  "termination_reason": "your_termination_reason",
  "termination_date": "your_termination_date",
  "company": {},
  "manager": {},
  "job_title": "your_job_title",
  "country": "your_country",
  "nationality": "your_nationality",
  "seniority": "your_seniority",
  "part_time_percentage": 0,
  "password": "your_password",
  "username": "your_username",
  "send_invitation": true,
  "remote_data": {},
  "state": "published"
};

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",
    "employee_number": "your_employee_number",
    "emails": [],
    "phones": [],
    "date_of_birth": "your_date_of_birth",
    "start_date": "your_start_date",
    "work_location": {},
    "groups": [],
    "middle_name": "your_middle_name",
    "ssn": "your_ssn",
    "gender": "male",
    "ethnicity": "american_indian_or_alaskan_native",
    "marital_status": "single",
    "home_location": [],
    "employments": [],
    "employment_status": "active",
    "termination_type": "voluntary",
    "termination_reason": "your_termination_reason",
    "termination_date": "your_termination_date",
    "company": {},
    "manager": {},
    "job_title": "your_job_title",
    "country": "your_country",
    "nationality": "your_nationality",
    "seniority": "your_seniority",
    "part_time_percentage": 0,
    "password": "your_password",
    "username": "your_username",
    "send_invitation": True,
    "remote_data": {},
    "state": "published"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())