HrisApi
- Create Company
- List Companies
- Delete Company
- Get Company
- Update Company
- Create Department
- List Departments
- Delete Department
- Get Department
- Update Department
- List Employee Payrolls
- Get Employee Payroll
- List Employee Schedules
- Create Employee
- List Employees
- Delete Employee
- Get Employee
- Update Employee
- List Payroll
- Get Payroll
- Create Time Off Request
- List Time Off Requests
- Delete Time Off Request
- Get Time Off Request
- Update Time Off Request
Method: companiesAdd
hrisApi.companiesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
company | HrisCompany | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Companies |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
company: {
legal_name: 'SpaceX',
display_name: 'SpaceX',
subdomain: 'company',
status: 'active',
company_number: '123456-AB',
currency: 'USD',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: '[email protected]',
type: 'primary'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
debtor_id: '12345',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.companiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesAll
hrisApi.companiesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Companies |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.hris.companiesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesDelete
hrisApi.companiesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Companies |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.companiesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesOne
hrisApi.companiesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Company |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.companiesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesUpdate
hrisApi.companiesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
company | HrisCompany | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Companies |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
company: {
legal_name: 'SpaceX',
display_name: 'SpaceX',
subdomain: 'company',
status: 'active',
company_number: '123456-AB',
currency: 'USD',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: '[email protected]',
type: 'primary'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
debtor_id: '12345',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.companiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: departmentsAdd
hrisApi.departmentsAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
department | Department | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Departments |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
department: {
name: 'R&D',
code: '2',
description: 'R&D',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.departmentsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: departmentsAll
hrisApi.departmentsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Departments |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.hris.departmentsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: departmentsDelete
hrisApi.departmentsDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Departments |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.departmentsDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: departmentsOne
hrisApi.departmentsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Departments |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.departmentsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: departmentsUpdate
hrisApi.departmentsUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
department | Department | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Departments |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
department: {
name: 'R&D',
code: '2',
description: 'R&D',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.departmentsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeePayrollsAll
hrisApi.employeePayrollsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
employeeId | [string] | ID of the employee you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
filter | PayrollsFilter | Apply filters | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | EmployeePayrolls |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
employeeId: 'employee_id_example'
}
try {
const { data } = await apideck.hris.employeePayrollsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeePayrollsOne
hrisApi.employeePayrollsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
payrollId | [string] | ID of the payroll you are acting upon. | |
employeeId | [string] | ID of the employee you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Payrolls |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
payrollId: 'payroll_id_example',
employeeId: 'employee_id_example'
}
try {
const { data } = await apideck.hris.employeePayrollsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeeSchedulesAll
hrisApi.employeeSchedulesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
employeeId | [string] | ID of the employee you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | EmployeeSchedules |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
employeeId: 'employee_id_example'
}
try {
const { data } = await apideck.hris.employeeSchedulesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeesAdd
hrisApi.employeesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
employee | Employee | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Employees |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
employee: {
id: '12345',
first_name: 'Elon',
last_name: 'Musk',
middle_name: 'D.',
display_name: 'Technoking',
preferred_name: 'Elon Musk',
initials: 'EM',
salutation: 'Mr',
title: 'CEO',
marital_status: 'married',
partner: {
first_name: 'Elon',
last_name: 'Musk',
middle_name: 'D.',
gender: 'male',
initials: 'EM',
birthday: '2000-08-12',
deceased_on: '2000-08-12'
},
division: 'Europe',
division_id: '12345',
department: 'R&D',
department_id: '12345',
department_name: '12345',
team: {
id: '1234',
name: 'Full Stack Engineers'
},
company_id: '23456',
company_name: 'SpaceX',
employment_start_date: '2021-10-26',
employment_end_date: '2028-10-26',
leaving_reason: 'resigned',
employee_number: '123456-AB',
employment_status: 'active',
employment_role: {
type: 'contractor',
sub_type: 'full_time'
},
ethnicity: 'African American',
manager: {
id: '12345',
name: 'Elon Musk',
first_name: 'Elon',
last_name: 'Musk',
email: '[email protected]',
employment_status: 'active'
},
direct_reports: [
'a0d636c6-43b3-4bde-8c70-85b707d992f4',
'a98lfd96-43b3-4bde-8c70-85b707d992e6'
],
social_security_number: '123456789',
birthday: '2000-08-12',
deceased_on: '2000-08-12',
country_of_birth: 'US',
description: 'A description',
gender: 'male',
pronouns: 'she,her',
preferred_language: 'EN',
languages: [
'EN'
],
nationalities: [
'US'
],
photo_url: 'https://unavatar.io/elon-musk',
timezone: 'Europe/London',
source: 'lever',
source_id: '12345',
record_url: 'https://app.intercom.io/contacts/12345',
jobs: [
{
title: 'CEO',
role: 'Sales',
start_date: '2020-08-12',
end_date: '2020-08-12',
compensation_rate: 72000,
currency: 'USD',
payment_unit: 'year',
hired_at: '2020-08-12',
is_primary: true,
is_manager: true,
location: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
}
],
compensations: [
{
id: '3404301363494309004',
job_id: '3490439050957906679',
rate: 50,
payment_unit: 'hour',
flsa_status: 'nonexempt',
effective_date: '2021-06-11'
}
],
works_remote: true,
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: '[email protected]',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
tax_code: '1111',
tax_id: '234-32-0000',
dietary_preference: 'Veggie',
food_allergies: [
'No allergies'
],
probation_period: {
start_date: '2021-10-01',
end_date: '2021-11-28'
},
tags: [
'New'
],
row_version: '1-12345',
deleted: true,
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.employeesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeesAll
hrisApi.employeesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | EmployeesFilter | Apply filters | (optional) |
sort | EmployeesSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Employees |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.hris.employeesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeesDelete
hrisApi.employeesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Employees |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.employeesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeesOne
hrisApi.employeesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
filter | EmployeesOneFilter | Apply filters | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
Status code | Description |
---|---|
200 | Employees |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.hris.employeesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: employeesUpdate
hrisApi.employeesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
employee | Employee | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Employees |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
employee: {
id: '12345',
first_name: 'Elon',
last_name: 'Musk',
middle_name: 'D.',
display_name: 'Technoking',
preferred_name: 'Elon Musk',
initials: 'EM',
salutation: 'Mr',
title: 'CEO',
marital_status: 'married',
partner: {
first_name: 'Elon',
last_name: 'Musk',
middle_name: 'D.',
gender: 'male',
initials: 'EM',
birthday: '2000-08-12',
deceased_on: '2000-08-12'
},
division: 'Europe',
division_id: '12345',
department: 'R&D',
department_id: '12345',
department_name: '12345',
team: {
id: '1234',
name: 'Full Stack Engineers'
},
company_id: '23456',
company_name: 'SpaceX',
employment_start_date: '2021-10-26',
employment_end_date: '2028-10-26',
leaving_reason: 'resigned',
employee_number: '123456-AB',
employment_status: 'active',
employment_role: {
type: 'contractor',
sub_type: 'full_time'
},
ethnicity: 'African American',
manager: {
id: '12345',
name: 'Elon Musk',
first_name: 'Elon',
last_name: 'Musk',
email: '[email protected]',
employment_status: 'active'
},
direct_reports: [
'a0d636c6-43b3-4bde-8c70-85b707d992f4',
'a98lfd96-43b3-4bde-8c70-85b707d992e6'
],
social_security_number: '123456789',
birthday: '2000-08-12',
deceased_on: '2000-08-12',
country_of_birth: 'US',
description: 'A description',
gender: 'male',
pronouns: 'she,her',
preferred_language: 'EN',
languages: [
'EN'
],
nationalities: [
'US'
],
photo_url: 'https://unavatar.io/elon-musk',
timezone: 'Europe/London',
source: 'lever',
source_id: '12345',
record_url: 'https://app.intercom.io/contacts/12345',
jobs: [
{
title: 'CEO',
role: 'Sales',
start_date: '2020-08-12',
end_date: '2020-08-12',
compensation_rate: 72000,
currency: 'USD',
payment_unit: 'year',
hired_at: '2020-08-12',
is_primary: true,
is_manager: true,
location: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
}
],
compensations: [
{
id: '3404301363494309004',
job_id: '3490439050957906679',
rate: 50,
payment_unit: 'hour',
flsa_status: 'nonexempt',
effective_date: '2021-06-11'
}
],
works_remote: true,
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: '[email protected]',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: '[email protected]',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
tax_code: '1111',
tax_id: '234-32-0000',
dietary_preference: 'Veggie',
food_allergies: [
'No allergies'
],
probation_period: {
start_date: '2021-10-01',
end_date: '2021-11-28'
},
tags: [
'New'
],
row_version: '1-12345',
deleted: true,
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.hris.employeesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: payrollsAll
hrisApi.payrollsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
filter | PayrollsFilter | Apply filters | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Payrolls |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.hris.payrollsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: payrollsOne
hrisApi.payrollsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
payrollId | [string] | ID of the payroll you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Payrolls |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
payrollId: 'payroll_id_example'
}
try {
const { data } = await apideck.hris.payrollsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: timeOffRequestsAdd
hrisApi.timeOffRequestsAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
timeOffRequest | TimeOffRequest | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | TimeOffRequests |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
timeOffRequest: {
employee_id: '12345',
policy_id: '12345',
status: 'approved',
description: 'Enjoying some sun.',
start_date: '2022-04-01',
end_date: '2022-04-01',
request_date: '2022-03-21',
request_type: 'vacation',
approval_date: '2022-03-21',
units: 'hours',
amount: 3.5,
day_part: 'morning',
notes: {
employee: 'Relaxing on the beach for a few hours.',
manager: 'Enjoy!'
},
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
],
policy_type: 'sick'
}
}
try {
const { data } = await apideck.hris.timeOffRequestsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: timeOffRequestsAll
hrisApi.timeOffRequestsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | TimeOffRequestsFilter | Apply filters | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | TimeOffRequests |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.hris.timeOffRequestsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: timeOffRequestsDelete
hrisApi.timeOffRequestsDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
employeeId | [string] | ID of the employee you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | TimeOffRequests |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
employeeId: 'employee_id_example'
}
try {
const { data } = await apideck.hris.timeOffRequestsDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: timeOffRequestsOne
hrisApi.timeOffRequestsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
employeeId | [string] | ID of the employee you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | TimeOffRequests |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
employeeId: 'employee_id_example'
}
try {
const { data } = await apideck.hris.timeOffRequestsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: timeOffRequestsUpdate
hrisApi.timeOffRequestsUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
timeOffRequest | TimeOffRequest | ||
id | [string] | ID of the record you are acting upon. | |
employeeId | [string] | ID of the employee you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | TimeOffRequests |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
employeeId: 'employee_id_example',
timeOffRequest: {
employee_id: '12345',
policy_id: '12345',
status: 'approved',
description: 'Enjoying some sun.',
start_date: '2022-04-01',
end_date: '2022-04-01',
request_date: '2022-03-21',
request_type: 'vacation',
approval_date: '2022-03-21',
units: 'hours',
amount: 3.5,
day_part: 'morning',
notes: {
employee: 'Relaxing on the beach for a few hours.',
manager: 'Enjoy!'
},
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
],
policy_type: 'sick'
}
}
try {
const { data } = await apideck.hris.timeOffRequestsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}