In this article we are going to take a closer look at the Contact/EmployeeStandardPay endpoint and some of the fields that are used.
This endpoint supports only two HTTP Methods, GET and PUT.
Note: Making changes to the data that is returned with this endpoint can impact how an employee's pay is calculated if timesheets are being used.
Also when using the PUT method to update any data, you need to return the whole of the response body that is received in your GET request and only edit the data that you need to update.
This endpoint relates to the Standard Pay tab that is located in the Payroll Details tab on an Employee Card in product.
Field Meanings
The first section of the response body details with who the employee is and references back to the employee's record for the Contact/Employee and Contact/EmployeePayrollDetails endpoints.
"Employee": {
"UID": "32db6aec-4055-42f0-b54b-a8785351f171",
"Name": "API Test",
"DisplayID": "EMP00005",
"URI": "{cf_uri}/Contact/Employee/32db6aec-4055-42f0-b54b-a8785351f171"
},
"EmployeePayrollDetails": {
"UID": "a984f6ad-8e42-4cb4-b8ec-b02a9dd18b80",
"URI": "{cf_uri}/Contact/EmployeePayrollDetails/a984f6ad-8e42-4cb4-b8ec-b02a9dd18b80"
},
In this next section of the response body, the PayFrequency and HoursPerPayFrequency fields while read only pull there information from the Contact/EmployeePayrollDetails endpoint.
The Category field will return a null value unless category tracking is turned on in the file and a category is linked to the employee.
The memo field is used to add a message to the employees pay slip.
"PayFrequency": "Weekly",
"HoursPerPayFrequency": 30.000,
"Category": null,
"Memo": "Pay Employee",
The last section of the response body is made up of the payroll categories that the employee is linked to. These are the "backbone" of the employee's pay (how it is calculated or not in the case of timesheets).
Here fields like Type will help you identify what sort of payroll categories are linked to the employee. And the IsCalculated field lets you know if the payroll category is calculated by MYOB or not (True equals yes, so no need to have values returned in the Hours and Amount field).
"PayrollCategories": [
{
"PayrollCategory": {
"UID": "3d86356e-bc19-4c8e-80cb-cc0eacfb2d1e",
"Name": "PAYG Withholding",
"Type": "Tax",
"URI": "{cf_uri}/Payroll/PayrollCategory/Tax/3d86356e-bc19-4c8e-80cb-cc0eacfb2d1e"
},
"Hours": null,
"Amount": null,
"IsCalculated": true,
"Job": null
},
{
"PayrollCategory": {
"UID": "2b1d052f-6484-4472-8a5c-2097738a4d18",
"Name": "Sick Leave Accrual",
"Type": "Entitlement",
"URI": "{cf_uri}/Payroll/PayrollCategory/Entitlement/2b1d052f-6484-4472-8a5c-2097738a4d18"
},
"Hours": null,
"Amount": null,
"IsCalculated": true,
"Job": null
},
{
"PayrollCategory": {
"UID": "aeaaa640-20ac-42a8-a5a9-cb527efb10b6",
"Name": "Holiday Leave Accrual",
"Type": "Entitlement",
"URI": "{cf_uri}/Payroll/PayrollCategory/Entitlement/aeaaa640-20ac-42a8-a5a9-cb527efb10b6"
},
"Hours": null,
"Amount": null,
"IsCalculated": true,
"Job": null
},
{
"PayrollCategory": {
"UID": "9a225943-c852-44bc-8bc2-7cf21e78f317",
"Name": "Base Hourly",
"Type": "Wage",
"URI": "{cf_uri}/Payroll/PayrollCategory/Wage/9a225943-c852-44bc-8bc2-7cf21e78f317"
},
"Hours": 0.000000,
"Amount": 0.000000,
"IsCalculated": false,
"Job": null
},
{
"PayrollCategory": {
"UID": "75945d5d-0510-4a8e-bb40-7a5ab66f664d",
"Name": "Superannuation Guarantee",
"Type": "Superannuation",
"URI": "{cf_uri}/Payroll/PayrollCategory/Superannuation/75945d5d-0510-4a8e-bb40-7a5ab66f664d"
},
"Hours": null,
"Amount": null,
"IsCalculated": true,
"Job": null
}
],
Comments
0 comments
Article is closed for comments.