Employee

Last updated: 30 Apr 2024

Integrate with PageUp's Core HR Employee API with your HRIS to create, update and archive Employee records.


Contents

  1. Overview
  2. Requesting API Credentials
  3. Before you begin
  4. Examples
  5. Validation Messages
  6. Error Messages
  7. URL format
  8. Postman Collection

Overview

The Core HR Employee API allows you to manipulate employees. The purpose of this API is to provide an endpoint for the consumers to insert a new employee or update an existing one. The Employee API allows for:

  • Creating a record for a new employee in the system.
  • Updating a record for an existing employee in the system.
  • Archiving a record for an existing employee in the system.

Requesting API Credentials

For information on how to obtain API credentials and to start integrating with the Core HR API, please visit the Getting started page.


Before you begin

To begin using any of the Core HR APIs, there are a few things that you will need:

  1. Authentication credentials for the particular PageUp Customer/Client
  2. You will need a valid (oAuth)JWT token to authorize yourself to access the end points in this API. When requesting the bearer token with the authentication service please ensure you include the scope Public.HrCore.Write in the authentication request. Multiple scopes may be requested by specifying them as space separated list. The available scope for the endpoints in this page is
    Public.HrCore.Write
    

This information will be provided to you when you register for API credentials.


Examples

Here are some examples on how to create and update Employees using the Core HR Employees API. Please note that the Employee number field is mandatory for all requests, however there are certain fields that are mandatory based on the action that you are trying to perform. More details on these fields are available in the following sections.

Data types

Please ensure all dates adhere to ISO-8601 format (YYYY-MM-DD or YYYYMMDD). Any time passed in to the date fields (eg. 2021-10-01T01:42:21.534Z) will be disregarded while parsing the date.

Creating an Employee

To create an employee record, follow the example provided below. The fields that are required to create an employee are externalId, firstName, lastName, email. Other fields provided in the example below are optional. The consumer will be provided with a validation message in response if there are any required fields missing. If the primaryTeamExternalId field or permissionGroupExternalIds collection is not passed in, or the entire access node is omitted, these fields will be set to their default based on the configuration specified in the system. For a full list of what fields are available and to also view details on requests and all types of responses, please refer to the API specifications below.

Request

PUT /hrcore/employee
{
  "externalId": "ABC1234",
  "title": "Mr",
  "firstName": "Joe",
  "lastName": "Blake",
  "initials": "JB",
  "email": "joe.blake@myemaildomain.com",
  "homePhone": "0312345678",
  "workPhone": "0312345678",
  "mobilePhone": "0412345678",
  "probationDate": "2021-10-01",
  "organizationStartDate": "2021-07-01",
  "siteStartDate": "2021-07-01",
  "loginAccess": true,
  "archive": false,
  "dateOfBirth": "2000-01-01",
  "gender": "M",
  "location": {
    "postCode": "3000",
    "state": "VIC",
    "countryCode": "AUS"
  },
  "position": {
    "externalId": "H4EX3245",
    "startDate": "2021-07-01"
  },
  "ineligibleForPerformanceReview": {
    "ineligibleForPerformance": true,
    "ineligibilityReason": "Employee in probation"
  },
  "succession": {
    "employeeCritical": false
  },
  "access": {
    "primaryTeamExternalId": "ABC1234",
    "secondaryTeamExternalIds": [
      "ABC12345"
    ],
    "permissionGroupExternalIds": [
      "BDG1", "CS2"
    ],
    "products": ["RECRUITMENT"]
  }
}

Updating an Employee

To update an employee record, follow the example provided below. The fields that are required to update an employee are externalId and at least one additional field that needs to be updated. Other fields provided in the example below are optional. The consumer will be provided with a validation message in response if there are any required fields missing. If any of the fields are not provided they will not be modified however if you intend to delete a field from the record then pass that field as a null value this will trigger the field to be removed from the system. In terms of lists or collections in the payload if a collection is passed then it will be updated in the system with all the values in the current collection, if the collection is passed as empty ( [] ) then all values will be removed from the system. For a full list of what fields are available and to also view details on requests and all types of responses, please refer to the API specifications below.

Request

PUT /hrcore/employee
{
  "externalId": "ABC1234",
  "email": "joe.blake@myemaildomain.com",
  "homePhone": "0312345678",
  "workPhone": "0312345678",
  "mobilePhone": "0412345678",
  "position": {
    "externalId": "A1B2C3D4",
    "startDate": "2021-12-01"
  },
  "ineligibleForPerformanceReview": {
    "ineligibleForPerformance": false,
    "ineligibilityReason": "Employee in probation"
  },
  "succession": {
    "employeeCritical": true
  },
  "access": {
    "primaryTeamExternalId": "ABC1234",
    "secondaryTeamExternalIds": [
      "ABC12345"
    ],
    "permissionGroupExternalIds": [
      "BDG1", "CSM2"
    ],
    "products": ["RECRUITMENT"],
  }
}

Archiving an Employee

To archive an employee, follow the example provided below. The fields that are required to archive an employee are externalId and archive. The consumer will be provided with a validation message in response if there are any required fields missing. For a full list of what fields are available and to also view details on requests and all types of responses, please refer to the API specifications below.

Request

PUT /hrcore/employee
{
  "externalId": "ABC1234",
  "archive": true
}

Validation messages

When integrating with the Core HR API, you may receive validation messages in your responses. Each specific Core HR API resource documents the list of validation messages you may receive and what they mean.


Error messages

In addition to validation messages, you may also receive generic HTTP Status code error messages in your responses. Information on these error messages can be found on our Error handling page.


URL format

Root url:
https://<environment>.<dataCentreId>.pageuppeople.com/v3/<tenantId>/hrcore/...
Where
  environment = specify 'api' for production or 'apiuat' for development or testing
  dataCentreId = the data centre to connect to (e.g. dc2)
  tenantId = the organisation's tenant Id (e.g. 218)
Region dataCentreId
AUS dc2
UK / EMEA dc3
US dc4
SEA dc5

Please contact PageUp representative to find out the data centre and organisation's tenant Id if not known.

Example - connect to the 218 production environment on dc2

https://api.dc2.pageuppeople.com/v3/218/hrcore/employee

Example - connect to the 218 development or testing environment on dc2

https://apiuat.dc2.pageuppeople.com/v3/218/hrcore/employee

Postman Collection

The Postman collection is available publicly (Core HR API > Employee API):

https://postman.com/puptechsolution/workspace/pageup-public-workspace/documentation/421061-5f56c18e-2665-472e-be55-e9a338f60d13

Run in Postman