This document intends to detail how to retrieve and update the main Employee record details for a user within "MyWorkPal". It is already assumed the User is known and their MyWorkPal System ID stored/ready to use with all end points.
Pre-requisites:
API Client access
See How to create API Clients to see how to obtain API Client IDs and secrets
Permissions
The API Client requires all the base permissions to read tenants, users, and then permissions for read/write of the main Employee record details. Only tenants that the API client has access to will be returned.
Environment "variables"
Within all examples:
{{url}} would be a full HTTPS URI such as https://webapi.myworkpal.co.uk
{{tenant_id}} is the unique tenant ID for the target user account
{{sub_domain_name}} is the unique tenant subdomain (lowercase text) for the target user account
{{system_id}} the unique SystemID for the target user
GET
With the desired User System ID (and subdomain) to hand - the following allows for retrieving, and then adding or updating property data against the user account within MyWorkPal. Employee details holds some important values such as NI Number and Start Date. Access is of course needed to the corresponding tenant, as well as user.
Our API implementation allows delivery and then modification to all properties. It is obligatory to start with the GET to ensure all existing data/values are present. One may then modify existing, or supply new values, and submit back the original JSON structure to ensure a successful POST via the Set.
Full response structure, example user is belonging to 1 Employee Group and 1 Cost Centre:
{
"userAccountId": {{system_id}},
"torusAccountId": 10228,
"lineManagerName": null,
"tenantId": {{tenant_id}} ,
"selectedEmployeeGroupIds": [],
"employeeGroupsAll": [
{
"id": 1,
"name": "RedBeta",
"priority": 0,
"count": 1,
"isSelected": false,
"isCreated": false,
"deleteMark": false,
"saved": true,
"dateCreated": "2022-03-04T13:03:14.47",
"lastUpdated": "2022-06-22T13:14:00.2666667"
}
],
"id": 9232,
"displayName": null,
"avatarImageFile": null,
"groups": null,
"startDate": "2025-08-01T00:00:00",
"leaveDate": null,
"hasLeft": null,
"inLongTermAbsence": null,
"costCentreId": null,
"costCentreName": null,
"costCentre": null,
"costCentresAll": [
{
"id": 4,
"name": "a cost centre",
"saved": true,
"deleteMark": false,
"isCreated": false,
"hasEmployees": false,
"dateCreated": "2022-05-18T11:13:16.2033333",
"lastUpdated": "2022-05-18T11:13:16.2033333"
}
],
"payrollNumber": "",
"payrollFrequency": "",
"workTelephoneNumber": "",
"alternativeWorkTelephoneNumber": null,
"salary": null,
"salaryDate": null,
"futureSalary": null,
"futureSalaryDate": null,
"benefitAllowance": null,
"benefitAllowanceDate": null,
"futureBenefitAllowance": null,
"futureBenefitAllowanceDate": null,
"qualifyingEarnings": null,
"qualifyingEarningsDate": null,
"payDate": null,
"dateCreated": "2025-08-22T16:17:49.373",
"lastUpdated": "2025-08-22T16:29:12.31",
"lineManagerRole": false,
"holidayApproverRole": false,
"jobDetails": null,
"hrRoles": null,
"remunerationOther": [],
"remunerationSalary": null,
"managerTorusAccountId": null,
"typeOfManagerRoleName": null,
"maximumProbationDates": 3,
"probationDates": [
{
"id": 31,
"employeeId": 9232,
"probationDate": null,
"priority": 1
},
{
"id": 32,
"employeeId": 9232,
"probationDate": null,
"priority": 2
}
],
"representTeamMembers": false
}
At present, this is the full scope of the main Employee data - which contains several collections used to allow configuration of multiple values, such as belonging to Employee Groups, Cost Centres, and Probation Dates. All greyed values are either for display purposes or immutable identifiers that should be ignored (but 100% kept) for when providing the payload back to the SET end-point. All blue values likewise should be kept, but are for display purposes only, in the context of Employee record viewing. The single orange value is obsolete.
The scope of this document is (at time of writing) to detail which core values can be changed - here is the JSON result again this time condensed purely to those.
{ "userAccountId": 10239, "tenantId": 2, "employeeGroupsAll": [ { "id": 1 } ], "startDate": "2025-08-01T00:00:00", "leaveDate": null, "hasLeft": null, "inLongTermAbsence": null, "costCentresAll": [ { "id": 4 } ], "payrollNumber": "", "payrollFrequency": "", "workTelephoneNumber": "", "alternativeWorkTelephoneNumber": null, "probationDates": [ { "id": 31, "employeeId": 9232, "probationDate": null, "priority": 1 }, { "id": 32, "employeeId": 9232, "probationDate": null, "priority": 2 } ] }
In the above, the ability to alter Employee Groups, Cost Centres is possible, should one be in possession of the the ID values for all other acceptable values. If one removed the array item, it is instruction to attempt removal of the "link" to the group or cost centre from the employee record, or indeed the deletion of the probation date (whilst the record in this case will remain, but with null value).
Within the system, the maximum number of probation date records (as configured for the tenant) are created for every user - and contain no value if not given on creation or, to-date. To update these, simply pass in a valid ISO date stamp. Priority ordering can be changed on altering the priority value.
Short list of values that can be added, altered or given:
"requestDTO" primary properties and objects (Json camelcase)
StartDate | DateTime | Non mandatory |
LeaveDate | DateTime | Non mandatory |
HasLeft | bool | Non mandatory |
InLongTermAbsence | bool | Non mandatory |
PayrollNumber | string | Non mandatory |
PayDate | DateTime | Non mandatory |
EmployeeGroupAll | Obj | Mandatory |
-- Id | integer | Mandatory, existing EmployeeGroup ID for the tenant |
ProbationDates | Obj | Mandatory |
-- ProbationDate | DateTime | Non mandatory |
-- Priority | int | Non mandatory |
CostCentresAll | Mandatory | |
-- Id | integer | Mandatory, existing CostCentre ID for the tenant |
Extra detail for collections:
EmployeeGroupAll - array containing ID property for all valid tenant Employee Groups the user is to be added, or kept in.
CostCentresAll - array containing ID property for all valid tenant Cost centres the user is to be added, or kept in.
ProbationDates - array containing exact records allowed for a user within the tenant. Records can not be removed or added. ProbationDate + Priority properties may be modified on all present records.
POST
With the appropriate Write permission, and a payload of JSON data born from the previously detailed GET, simply POST the data and await a response. If validation is successful and the request can be fulfilled, a simple empty 200 success status is sent back. If the request is invalid, a 400 bad request is returned.