This article contains all the details for using Employee resource object.
Employee object contains the details of an employee of the organization.
Employee Object
Name | Type | Description |
---|---|---|
Id <Should we show this here because it is returned in GET requests?> | String | Unique identifier for the employee |
xFirstName* | String | First name |
xLastName* | String | Last name |
xFullName* | String | Full name |
xEmail* | String | Email address |
xEmployeeNumber* | String | Unique employee number |
xRecordStatus* | String | Active or Inactive |
xStartDate* | Date | Start date |
xAddress1 | String | Address (street name and number) |
xAddress2 | String | Additional address information |
xCity | String | City |
xState | String | State |
xZipCode | Number | Zip code |
xCountry | Number | Country |
xBonus | JSON array | Bonus using two fields specifying amount and currency. Cannot be updated using PUT. |
xCellPhone | String | Mobile phone number |
xDateOfBirth | Date | Date of birth |
xEducationLevel | String | Educational level |
xEthnicity | String | Ethnicity |
xGender | String | Female or Male |
xInternationalTaxID | String | International tax ID |
xMIddleName | String | Middle name |
xNickname | String | Nickname |
xSalary | JSON array | Salary using two fields specifying amount and currency. Cannot be updated using PUT. |
xSeparationDate | Date | Separation (end) date |
xSeparationReason | String | Separation reason |
xSSN | String | Social security number |
xVeteranStatus | String | Veteran status |
xWorkPhone | String | Work phone number |
xDepartmentLookup* | String | Existing department ID |
xEmploymentStatusLookup* | String | Existing employment status ID |
xLocationLookup* | String | Existing location ID |
xPositionLookup* | String | Existing position ID |
xDivisionLookup | String | Existing division ID |
xEmploymentTypeLookup | String | Existing employment type ID |
Model Schema
{
"entities": [
{
"xFirstName":"String",
"xLastName":"String",
"xSalary": [
"amount":"String",
"currency":"String",
]
....
}
...
]
}
Endpoints
Method | Endpoint | Description |
Get | /xEmployee | Get All employees |
Get | /xEmployee/:employeeId | Retrieve a single employee |
POST |
/xEmployee |
Create a new employee |
PUT |
/xEmployee |
Update an employee |
Get All Employees
Retrieves a list of employees. When no parameters are added, all the employees are returned.
GET /xEmployee
For example,
GET https://corehr-api.hrcloud.com/v1/cloud/xEmployee
Response:
Status: 200 OK
[
{
"Id": "8320fb07077a2935",
"xAddress1": "19 Cherry Lane",
"xAddress2": null,
"xBonus": {
"Amount": 2200,
"Currency": "USD"
},
"xCellPhone": "310-654-8712",
"xCity": "Santa Monica",
"xCountry": null,
"xDateOfBirth": "1969-09-21T00:00:00Z",
"xDepartmentLookup": {
"__ObjectName": "xDepartment",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xDepartment/8320fb07077a2935",
"Id": "8320fb07077a2935",
"xDepartmentCode": "FIN",
"xDepartmentName": "FINANCE",
"xRecordStatus": "Active"
},
"xDivisionLookup": {
"__ObjectName": "xDivision",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xDivision/5d03e0d8dd13c7ea",
"Id": "5d03e0d8dd13c7ea",
"xDivisionCode": "Expenses",
"xDivisionName": "EXP",
"xRecordStatus": "Active"
},
"xEducationLevel": null,
"xEmail": "asmith@mytown.org",
"xEmployeeNumber": "8734",
"xEmploymentStatusLookup": {
"__ObjectName": "xEmploymentStatus",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xEmploymentStatus/8320fb07077a2935",
"Id": "8320fb07077a2935",
"xRecordStatus": "Active",
"xType": "Active"
},
"xEmploymentTypeLookup": null,
"xEthnicity": null,
"xFirstName": "Amanda",
"xFullName": "Amanda Smith",
"xGender": null,
"xLastName": "Smith",
"xLocationLookup": {
"__ObjectName": "xLocation",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xLocation/5d03e0d8dd13c7ea",
"Id": "5d03e0d8dd13c7ea",
"xDescription": null,
"xLocationCode": "LA",
"xLocationName": "Los Angeles",
"xRecordStatus": "Active"
},
"xManagerLookup": {
"__ObjectName": "xEmployee",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xEmployee/011151b847015c07",
"Id": "011151b847015c07",
"xFullName": "John Faynard"
},
"xMIddleName": "mIddle1",
"xNickname": null,
"xPersonalEmail": null,
"xPositionLookup": {
"__ObjectName": "xPosition",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xPosition/8320fb07077a2935",
"Id": "8320fb07077a2935",
"xDescription": "<p>asdasdasd</p>",
"xPositionCode": "Hr0023211",
"xPositionTitle": "HR Managerrrrrrr",
"xRecordStatus": "Active"
},
"xRecordStatus": "Active",
"xSalary": {
"Amount": 75000,
"Currency": "USD"
},
"xSeparationDate": "null,
"xSeparationReason": null,
"xStartDate": "2014-07-15T00:00:00Z",
"xState": "none1",
"xVeteranStatus": null,
"xWorkPhone": null,
"xZipCode": "90403"
}
...
]
Query Parameters
Fields (Filter by) | Description and Examples |
Get a particular employee
Retrieve a particular employee record.
GET /xEmployee/:employeeId
For example,
GET https://corehr-api.hrcloud.com/v1/cloud/xEmployee/8320fb07077a2935
Response
Status: 200 OK
[
{
"Id": "8320fb07077a2935",
"xAddress1": "19 Cherry Lane",
"xAddress2": null,
"xBonus": {
"Amount": 2200,
"Currency": "USD"
},
"xCellPhone": "310-654-8712",
"xCity": "Santa Monica",
"xCountry": null,
"xDateOfBirth": "1969-09-21T00:00:00Z",
"xDepartmentLookup": {
"__ObjectName": "xDepartment",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xDepartment/8320fb07077a2935",
"Id": "8320fb07077a2935",
"xDepartmentCode": "FIN",
"xDepartmentName": "FINANCE",
"xRecordStatus": "Active"
...
}
]
Create a new employee
POST /xEmployee