Skip to main content

Sage HR Component

Sage HR is all inclusive Human Resource management solution. Use the Sage HR component to manage Employees, Teams, Projects, and more.

Component key: sage-hr

Description

Sage HR Sage HR is all inclusive Human Resource management solution. Use the Sage HR component to manage Employees, Teams, Projects, and more.

Connections

API Key

Sage HR uses an activated API key for Authentication.

To activate API:

  1. Sign into Sage HR, click on your name on the top right, then click Settings.
  2. On the settings menu, click INTEGRATIONS, then click API.
  3. Click ENABLE API ACCESS to activate access to API and provide you with your unique API key.
  4. Save the API Key and paste into your connection's configuration.
InputNotesExample
API Key

API Key for your Sage HR User

Subdomain Name

The subdomain name of your Sage HR account

Data Sources

Fetch Positions

Fetch an array of positions | key: positions | type: picklist

InputNotesExample
Connection
Page

The page number to return

2

{
"result": [
{
"label": "CFO",
"key": "19"
}
]
}

Fetch Projects

Fetch an array of Projects | key: projects | type: picklist

InputNotesExample
Connection

{
"result": [
{
"label": "Project Name.",
"key": "123"
}
]
}

Fetch Teams

Fetch an array of teams | key: teams | type: picklist

InputNotesExample
Connection
Page

The page number to return

2

{
"result": [
{
"label": "Sales",
"key": "19"
}
]
}

Actions

Close Project

Close a project. | key: closeProject

InputNotesExample
Connection
Project ID

ID of project to be closed

123

{
"data": {
"data": {
"id": 1
}
}
}

Create Document

Creates a document only visible to the employee themselves. | key: createDocument

InputNotesExample
Category ID

Optional ID of the document category to filter by.

123
Connection
Description

Document description.

Document description
Employee IDs

Employee Identifier; also accepts and array of integers to share with multiple employees

123213
Expiration Date

Expiration date of the document, format: YYYY-MM-DD

2020-01-01
Expires

if 'true' expiration_date is also required

true
File Name

The name of the file

filename.jpg
File

The file to upload.

Some binary file
Notify

'true' to notify employee by email

true
Right to Work Document Number

Right to work document number

123213
Right to Work Document Type

Right to work document type

valid
Shared With Direct Manager

'true' to share with all direct manager

true
Shared With Everyone

'true' to share with all employees

true
Shared With Team Manager

'true' to share with all team managers

true
Source

Source of the document

API
Status

Status of the document

valid

{
"data": {
"data": {
"id": 1
}
}
}

Create Employee

Create new employee | key: createEmployee

InputNotesExample
City

Employees address city

Jacksonville
Connection
Country

Employees country two character ISO code

US
Date of Birth

Employees date of birth, format: YYYY-MM-DD

2020-01-01
Email

Email address of the employee

test@test.es
First Name

First name of the employee

John
Gender

Employees gender, Must be one of: Male, Female, Other

Male
Home Phone

Home phone number

+1 123 456 789
Last Name

Last name of the employee

Locke
Marital Status

Employees marital status, Must be one of: Married, Single, Divorced, Widower, In a relationship, Other

Single
Mobile Phone

Mobile phone number

+1 123 456 789
Nationality

Employees nationalty in long form, example: Canadian

Canadian
Personal Identification Number

Personal identification number

1123456789
Position Title

Employees position

Engineer
Post Code

Employees address: zip or postal code

32003
Send Email

'true' to send welcome email to employee

false
State

Employees address: state

Florida
Street First

Employees address first line

First street
Street Second

Employees address second line

Second street
Tax Number

Tax Number

1123456789
Work Phone

Work phone number

+1 123 456 789
Work Start Date

Employees work start date, format: YYYY-MM-DD, leave empty to use todays date

2020-01-01

{
"data": {
"data": {
"id": 1
}
}
}

Create Project

Create a new project. | key: createProject

InputNotesExample
Project Code

Code of the project

123
Connection
End Date

Last working day; format: YYYY-MM-DD

2020-01-01
Limit Total Hours

Activate the limit of hours

true
Max Limit Total Hours

The limit number of hours

123
Project Name

Name of the project

New Project
Start Date

Last working day; format: YYYY-MM-DD

2020-01-01

{
"data": {
"data": {
"id": 1
}
}
}

Create Projects

Create a batch of projects. | key: createProjects

InputNotesExample
Connection
Projects

An array of projects.

{
"data": {
"data": {
"id": 1
}
}
}

Create Time Off Requests

Create new time off request | key: createTimeOffRequests

InputNotesExample
Connection
Last Working Day

format: YYYY-MM-DD; required if type is single

2020-01-01
Last Working Day

format: YYYY-MM-DD; required if type is multi

2020-01-01
Last Working Day

format: YYYY-MM-DD; required if type is multi

2020-01-01
Details

required based on policy settings

2
Employee ID

The ID of the employee

12323
Hours

required if type is single & part_of_day is first_part_of_day or second_part_of_day

2
Part of Day

Part of day

specific_timespan
Replacement ID

Time off policy ID

123
Last Working Day

format: H:M; required if part_of_day is specific_timespan

9:00
Time Off Policy ID

Time off policy ID

123
Last Working Day

format: H:M; required if part_of_day is specific_timespan

15:00
Type

Time off request type

Multi

{
"data": {
"data": {
"id": 1
}
}
}

Delete Document

Allows admin to delete document. | key: deleteDocument

InputNotesExample
Connection
Document ID

ID of document to be deleted

123

{
"data": {
"data": {
"id": 1
}
}
}

Get Document

View Document Details. | key: getDocument

InputNotesExample
Connection
Document ID

Document ID

123

{
"data": {
"data": {
"id": 18,
"document_category_id": 15,
"description": "",
"company_id": 5,
"file_name": "test_pdf.pdf",
"file_content_type": "application/pdf",
"file_size": 6193,
"file_updated_at": "2021-06-09T07:32:16.562-07:00",
"shared_with_direct_manager": false,
"shared_with_team_manager": true,
"created_by": 5,
"source": "web",
"created_at": "2021-06-09T14:32:20Z",
"updated_at": "2021-06-09T14:32:20Z",
"shared_with_everyone": false,
"last_edited_by": 5,
"document_template_pattern_id": null,
"acceptance_required": false,
"acceptance_deadline": null,
"file_scan_started_at": null,
"file_scan_result": "Pass",
"document_type": "",
"document_type_other": "",
"right_to_work_number": "",
"expiration_date": null,
"document_expires": false
}
}
}

Get Employee

Retrieve single active employee in company. | key: getEmployee

InputNotesExample
Connection
Employee ID

The ID of the employee

12323
Employment Status History

Whether to return the employment status history

false
Position History

Whether to return the position history

false
Team History

Whether to return the team history

false

{
"data": {
"data": {
"id": 19,
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"picture_url": "https://example.com/john.png",
"employment_start_date": "2014-08-25",
"date_of_birth": "1991-02-13",
"team": "Sage HR",
"team_id": 6742,
"position": "Api developer",
"position_id": 123,
"reports_to_employee_id": 5,
"work_phone": "555-0505",
"home_phone": "555-0506",
"mobile_phone": "555-0507",
"gender": "Male",
"street_first": "84 Glenwood Street",
"street_second": "Peoria",
"city": "London",
"post_code": 99999,
"country": "GB",
"employee_number": "A1",
"employment_status": "Full-time",
"nationality": "Spanish",
"marital_status": "Married",
"personal_identification_number": "1",
"tax_number": "1",
"team_history": [
{
"team_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"team_name": "Some Team"
}
],
"employment_status_history": [
{
"employment_status_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"employment_statu_name": "Full time"
}
],
"position_history": [
{
"position_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"position_name": "Developer",
"position_code": "1234"
}
]
}
}
}

Get Employee Compensations

Retrieve single employee's compensation details | key: getEmployeeCompensations

InputNotesExample
Connection
Employee ID

The ID of the employee

12323

{
"data": {
"data": [
{
"start_date": "2017-01-01",
"end_date": "2019-01-01",
"currency": "EUR",
"amount": 1234,
"period": "monthly",
"comment": "Starting salary",
"category": "Salary"
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

Get Employee Custom Fields

Get employee custom fields | key: getEmployeeCustomFields

InputNotesExample
Connection
Employee ID

The ID of the employee

12323

{
"data": {
"data": [
{
"id": 1,
"label": "Hobby",
"type": "CustomDropdownField",
"value": "Hockey",
"options": [
"Hockey",
"Football",
"Voleyball"
]
},
{
"id": 2,
"label": "Languages",
"type": "CustomTags",
"options": null,
"value": [
"English",
"Latvian",
"Estonian"
]
}
]
}
}

Get Terminated Employee

Retrieve single terminated employee | key: getTerminatedEmployee

InputNotesExample
Connection
Employee ID

The ID of the employee

12323

{
"data": {
"data": {
"id": 19,
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"picture_url": "https://example.com/john.png",
"employment_start_date": "2014-08-25",
"date_of_birth": "1991-02-13",
"position": "Api developer",
"position_id": 1234,
"reports_to_employee_id": 1000,
"work_phone": "867-5309",
"home_phone": "555-5555",
"mobile_phone": "555-1234",
"gender": "Male",
"street_first": "123 some Street",
"stree_second": "3A",
"city": "London",
"post_code": "E8 1LA",
"country": "GB",
"employee_number": 123,
"personal_identification_number": "1",
"tax_number": "1",
"termination_date": "2015-05-28",
"termination": {
"reason": "Moving location",
"comments": "Moving to"
}
}
}
}

List Documents

View all documents for company | key: listDocuments

InputNotesExample
Category ID

Optional ID of the document category to filter by.

123
Connection
Employee ID

Optional id of employee to filter documents.

12323

{
"data": {
"data": [
{
"id": 18,
"document_category_id": 15,
"description": "",
"company_id": 5,
"file_name": "test_pdf.pdf",
"file_content_type": "application/pdf",
"file_size": 6193,
"file_updated_at": "2021-06-09T07:32:16.562-07:00",
"shared_with_team_manager": true,
"shared_with_direct_manager": false,
"created_by": 5,
"source": "web",
"created_at": "2021-06-09T14:32:20Z",
"updated_at": "2021-06-09T14:32:20Z",
"shared_with_everyone": false,
"last_edited_by": 5,
"document_template_pattern_id": null,
"acceptance_required": false,
"acceptance_deadline": null,
"file_scan_started_at": null,
"file_scan_result": "Pass",
"document_type": "",
"document_type_other": "",
"right_to_work_number": "",
"expiration_date": null,
"document_expires": false
},
{
"id": 19,
"document_category_id": 15,
"description": "",
"company_id": 5,
"file_name": "test_pdf2.pdf",
"file_content_type": "application/pdf",
"file_size": 6193,
"file_updated_at": "2021-06-09T07:59:56.762-07:00",
"shared_with_managers": true,
"created_by": 5,
"source": "web",
"created_at": "2021-06-09T15:00:20Z",
"updated_at": "2021-06-09T15:00:20Z",
"shared_with_direct_manager": false,
"shared_with_team_manager": true,
"last_edited_by": 5,
"document_template_pattern_id": null,
"acceptance_required": false,
"acceptance_deadline": null,
"file_scan_started_at": null,
"file_scan_result": "Pass",
"document_type": "",
"document_type_other": "",
"right_to_work_number": "",
"expiration_date": null,
"document_expires": false
}
]
}
}

List Employees

List active employees in company. | key: listEmployees

InputNotesExample
Connection
Employment Status History

Whether to return the employment status history

false
Page

The page number to return

2
Position History

Whether to return the position history

false
Team History

Whether to return the team history

false

{
"data": {
"data": [
{
"id": 19,
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"picture_url": "https://example.com/john.png",
"employment_start_date": "2014-08-25",
"date_of_birth": "1991-02-13",
"team": "Sage HR",
"team_id": 1,
"position": "Api developer",
"position_id": 123,
"reports_to_employee_id": 5,
"work_phone": "555-0505",
"home_phone": "555-0506",
"mobile_phone": "555-0507",
"gender": "Male",
"street_first": "84 Glenwood Street",
"street_second": "Peoria",
"city": "London",
"post_code": 99999,
"country": "GB",
"employee_number": "A01",
"employment_status": "Full-time",
"nationality": "Spanish",
"marital_status": "Married",
"personal_identification_number": "1",
"tax_number": "1",
"team_history": [
{
"team_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"team_name": "Some Team"
}
],
"employment_status_history": [
{
"employment_status_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"employment_statu_name": "Full time"
}
],
"position_history": [
{
"position_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"position_name": "Developer",
"position_code": "1234"
}
]
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

List Positions

List positions in company | key: listPositions

InputNotesExample
Connection
Page

The page number to return

2

{
"data": {
"data": [
{
"id": 19,
"title": "CFO",
"description": "...",
"code": "X2"
},
{
"id": 20,
"title": "CEO",
"description": null,
"code": null
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

List Projects

List projects | key: listProjects

InputNotesExample
Connection

List Teams

List teams in company | key: listTeams

InputNotesExample
Connection
Page

The page number to return

2

{
"data": {
"data": [
{
"id": 19,
"name": "Sales",
"manager_ids": [
1,
2
],
"employee_ids": [
5,
7,
90
]
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

List Terminated Employees

Retrieve a list of terminated employees | key: listTerminatedEmployees

InputNotesExample
Connection
Employment Status History

Whether to return the employment status history

false
Page

The page number to return

2
Position History

Whether to return the position history

false
Team History

Whether to return the team history

false

{
"data": {
"data": [
{
"id": 19,
"termination_date": "2015-05-28",
"employee_number": "123",
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"picture_url": "https://example.com/john.png",
"employment_start_date": "2014-08-25",
"date_of_birth": "1991-02-13",
"position": "Api developer",
"personal_identification_number": "1",
"tax_number": "1",
"team_history": [
{
"team_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"team_name": "Some Team"
}
],
"employment_status_history": [
{
"employment_status_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"employment_statu_name": "Full time"
}
],
"position_history": [
{
"position_id": 1,
"start_date": "2018-01-01",
"end_date": "201-01-01",
"position_name": "Developer",
"position_code": "1234"
}
]
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

List Time Off Balances

Lists employee time off balances | key: listTimeOffBalances

InputNotesExample
Connection
Employee ID

The ID of the employee

12323

{
"data": {
"data": [
{
"policy_id": 1,
"used": 5.6,
"available": 2
},
{
"policy_id": 2,
"used": 75,
"available": null
}
]
}
}

List Time Off Requests

Lists employee time off Requests | key: listTimeOffRequests

InputNotesExample
Connection
From Date

If not specified defaults to beginning of current month. Format: YYYY-MM-DD

2018-05-20
Page

The page number to return

2
To Date

If not specified defaults to end of current month. Days between from date and to date must be less than 65. If you need info for larger period of time make multiple requests. Format: YYYY-MM-DD

2018-05-20

{
"data": {
"data": [
{
"id": 2902504,
"status": "Approved",
"status_code": "approved",
"policy_id": 1,
"employee_id": 1,
"replacement": {
"id": 2,
"full_name": "John Doe"
},
"details": "Birthday lunch",
"is_multi_date": false,
"is_single_day": true,
"is_part_of_day": true,
"first_part_of_day": false,
"second_part_of_day": true,
"start_date": "2018-05-24",
"end_date": "2018-05-24",
"request_date": "2018-05-22",
"approval_date": null,
"hours": 3.5,
"fields": [
{
"title": "Approved by manager?",
"answer": "yes"
}
]
}
],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 2,
"per_page": 50,
"total_entries": 75
}
}
}

Raw Request

Send raw HTTP request to Sage HR | key: rawRequest

InputNotesExample
Connection
Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
Debug Request

Enabling this flag will log out the current request.

false
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type.

false
Retry Delay (ms)

The delay in milliseconds between retries.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/employees), The base URL is already included (https://subdomain.sage.hr/api/). For example, to connect to https://subdomain.sage.hr/api/employees, only /employees is entered in this field.

/employees
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries.

false

Rehire Employee

Rehire Employee. | key: rehireEmployee

InputNotesExample
Comments

Comments

No comments
Connection
New start working day

format: YYYY-MM-DD

2020-01-01
Employee ID

The ID of the employee

12323
Start Fresh

This parameter is used to start the employee record clean, resetting the employee's leave balances.

No comments

{
"data": {}
}

Terminate Employee

Terminate Employee. | key: terminateEmployee

InputNotesExample
Comments

Comments

No comments
Connection
Last Working Day

Last working day; format: YYYY-MM-DD

2020-01-01
Employee ID

The ID of the employee

12323
Termination Reason ID

Termination reason ID

123

{
"data": {}
}

Time Clocking In and Out

Clock in and out employees on specific days | key: timeClockingInAndOut

InputNotesExample
Clocked Time

Clocked time entries for the day. If override is true, this will override the existing entries.

Connection
Override

'true' if override provided days clocked entries

true

{
"data": {
"errors": [
"error 1",
"error 2"
]
}
}

Update Document

Document will only be visible to employee themselves. | key: updateDocument

InputNotesExample
Category ID

Optional ID of the document category to filter by.

123
Connection
Description

Document description.

Document description
Document ID

ID of document to be updated

123
Employee IDs

Employee Identifier; also accepts and array of integers to share with multiple employees

123213
Expiration Date

Expiration date of the document, format: YYYY-MM-DD

2020-01-01
Expires

if 'true' expiration_date is also required

true
File Name

The name of the file

filename.jpg
File

The file to upload.

Some binary file
Notify

'true' to notify employee by email

true
Right to Work Document Number

Right to work document number

123213
Right to Work Document Type

Right to work document type

valid
Shared With Direct Manager

'true' to share with all direct manager

true
Shared With Everyone

'true' to share with all employees

true
Shared With Team Manager

'true' to share with all team managers

true
Source

Source of the document

API
Status

Status of the document

valid

{
"data": {
"data": {
"id": 18,
"document_category_id": 15,
"description": "",
"company_id": 5,
"file_name": "test_pdf.pdf",
"file_content_type": "application/pdf",
"file_size": 6193,
"file_updated_at": "2021-06-09T07:32:16.562-07:00",
"shared_with_direct_manager": false,
"shared_with_team_manager": true,
"created_by": 5,
"source": "web",
"created_at": "2021-06-09T14:32:20Z",
"updated_at": "2021-06-09T14:32:20Z",
"shared_with_everyone": false,
"last_edited_by": 5,
"document_template_pattern_id": null,
"acceptance_required": false,
"acceptance_deadline": null,
"file_scan_started_at": null,
"file_scan_result": "Pass",
"document_type": "",
"document_type_other": "",
"right_to_work_number": "",
"expiration_date": null,
"document_expires": false
}
}
}

Update Employee

Update employee | key: updateEmployee

InputNotesExample
Approver IDs

List of approver IDs.

000xxx
City

Employees address city

Jacksonville
Connection
Country

Employees country two character ISO code

US
Date of Birth

Employees date of birth, format: YYYY-MM-DD

2020-01-01
Employee ID

The ID of the employee

12323
Employee Number

The employee number

12323
First Name

First name of the employee

John
Gender

Employees gender, Must be one of: Male, Female, Other

Male
Home Phone

Home phone number

+1 123 456 789
Last Name

Last name of the employee

Locke
Leader ID

The ID of the leader

12323
Location ID

The ID of the location

12323
Marital Status

Employees marital status, Must be one of: Married, Single, Divorced, Widower, In a relationship, Other

Single
Mobile Phone

Mobile phone number

+1 123 456 789
Nationality

Employees nationalty in long form, example: Canadian

Canadian
Personal Identification Number

Personal identification number

1123456789
Position ID

The ID of the position

12323
Post Code

Employees address: zip or postal code

32003
Selected Leave Types

Selected leave types.

000xxx
State

Employees address: state

Florida
Street First

Employees address first line

First street
Street Second

Employees address second line

Second street
Tax Number

Tax Number

1123456789
Team ID

The ID of the team

12323
Work Phone

Work phone number

+1 123 456 789
Work Start Date

Employees work start date, format: YYYY-MM-DD, leave empty to use todays date

2020-01-01

{
"data": {
"data": {
"id": 1711
}
}
}

Update Employee Custom Field

Update employee custom field | key: updateEmployeeCustomField

InputNotesExample
Connection
Custom Field ID

Custom field ID

123
Employee ID

The ID of the employee

12323
Custom Field Value

Custom field Value

123

{
"data": {
"data": null
}
}

Update Project

Update a project. | key: updateProject

InputNotesExample
Project Code

Code of the project

123
Connection
End Date

Last working day; format: YYYY-MM-DD

2020-01-01
Project ID

Id of the project

123
Limit Total Hours

Activate the limit of hours

true
Max Limit Total Hours

The limit number of hours

123
Project Name

Name of the project

New Project
Start Date

Last working day; format: YYYY-MM-DD

2020-01-01

{
"data": {
"data": {
"id": 1
}
}
}

Update Projects

Update a batch of projects. | key: updateProjects

InputNotesExample
Connection
Projects

Array of projects to be updated

{
"data": {
"data": {
"id": 1
}
}
}