Greetings,
My company is using this API: Employment Hero Payroll API Reference: Get Shift Costings for Employee and I am seeking clarification on a specific scenario that is causing my organisation a bit of confusion. When we POST keypay.yourpayroll.com.au/api/v2/business/XXXXXX/employee/YYYYYY/timesheet/shiftcosting the following output is received (Note that both sensitive and null data has been removed from this output)
{
"shifts": [
{
"startTime": "2024-08-06T12:00:00",
"endTime": "2024-08-06T21:00:00"
}
]
}
{
"transactionId": "91ada7a9-953a-4c2f-b245-eefd728732b2",
"employmentAgreementId": 345514,
"employmentAgreementName": "Hospitality Level 4 - Part Time",
"payConditionRuleSetId": 14552,
"payConditionRuleSetName": "Permanent Hospitality",
"shifts": [
{
"externalId": "Shift1",
"startTime": "2024-08-06T12:00:00",
"endTime": "2024-08-06T21:00:00",
"cost": 820.5400000000000000000,
"consolidatedShifts": [],
"costBreakdown": [
{
"startTime": "2024-08-06T12:00:00",
"endTime": "2024-08-06T17:31:00",
"payCategoryId": 1376020,
"payCategoryName": "Permanent - Ordinary Hours",
"units": 5.51666666666667,
"rate": 27.17000,
"cost": 149.8878333333334239000,
"type": "Earnings",
"locationId": 217793,
"locationName": "Technical"
},
{
"startTime": "2024-08-06T17:31:00",
"endTime": "2024-08-06T18:01:00",
"units": 0.0,
"rate": 0.0,
"cost": 0.0,
"type": "Break",
},
{
"startTime": "2024-08-06T18:01:00",
"endTime": "2024-08-06T21:00:00",
"payCategoryId": 1376020,
"payCategoryName": "Permanent - Ordinary Hours",
"units": 2.98333333333333,
"rate": 27.17000,
"cost": 81.0571666666665761000,
"type": "Earnings",
"locationId": 217793,
"locationName": "Technical"
},
{
"startTime": "2024-08-06T21:00:00",
"endTime": "2024-08-06T21:00:00",
"payCategoryId": 1376020,
"payCategoryName": "Permanent - Ordinary Hours",
"units": 21.5,
"rate": 27.17000,
"cost": 584.155000,
"type": "Earnings",
"locationId": 217793,
"locationName": "Technical"
},
{
"payCategoryId": 1376002,
"payCategoryName": "Weekday 7pm-12am Allowance",
"units": 2.0,
"rate": 2.720000,
"cost": 5.4400000,
"type": "Allowance",
}
]
}
]
}
However when I compared this to the roster shifts, I was receiving a large variation. In this example, I was expecting a total cost of $222.80 however I instead received an API output of $820.54 instead. After a bit of investigation, it seems that the Normally works 30 hours per week. configuration within the employee payrun defaults is being used to calculate the output. If you take the 30 hours for the week and subtract the 8.5 hour shift (8hr working + 0.5hr break) you end up with 21.5 hours remaining. You can also see that there is one cost breakdown component with a unit quantity of 21.5 being applied immediately at the end of the shift (9pm) as a kind of “top up”
Screenshots: KeyPay API Evidence - Album on Imgur
Essentially what I want is to filter out this extra cost, is this possible?
Many thanks,
Liam from Cliftons.