In this article we are going to take a closer look at the Report/Payroll/EmployeePayrollAdvice endpoint, how we can use filters to retrieve the data we need and also have a sneak peek at the AccountRight UI.
The endpoint returns a pay advice report showing employee paycheque details.
To generate the report, we can simply use the HTTP method GET from the endpoint Report/Payroll/EmployeePayrollAdvice.
Endpoint URL: Company File URI/Company File GUID/Report/Payroll/EmployeePayrollAdvice
We can apply different filters to GET the specific set of results we need. As per below example, we can filter based on the PayPeriodStartDate and PayPeriodEndDate to GET all the Payroll Advice for the month of April 2021.
https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Report/Payroll/EmployeePayrollAdvice?$filter=PayPeriodStartDate ge datetime'2021-04-01' and PayPeriodEndDate le datetime'2021-04-30'
For more information on filters please refer to our developer page.
Below is an example response. Please note, the AnnualSalary is based on the value at the time of the API call.
{
"Items": [
{
"Employer": {
"CompanyName": "MYOB Shared Sandbox 08",
"ABNOrTFN": "80 000 000 001",
"URI": null
},
"Employee": {
"UID": "6c50d523-aa78-4179-9c05-5e41e122c9bb",
"Name": "Mary Jones",
"DisplayID": "EMP00001",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Contact/Employee/6c50d523-aa78-4179-9c05-5e41e122c9bb"
},
"PayPeriodStartDate": "2021-05-01T00:00:00",
"PayPeriodEndDate": "2021-05-07T00:00:00",
"PaymentDate": "2021-05-07T00:00:00",
"PayFrequency": "Weekly",
"AnnualSalary": 50000.000,
"GrossPay": 961.540000,
"NetPay": 661.540000,
"HourlyRate": 24.038500,
"ChequeNumber": "24",
"DateOfBirth": "1978-01-01T00:00:00",
"SuperannuationFund": {
"UID": "7c61d12d-870b-4b2a-b793-52172ff156c6",
"Name": "AMP Life",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/SuperannuationFund/7c61d12d-870b-4b2a-b793-52172ff156c6"
},
"EmploymentClassification": null,
"Lines": [
{
"PayrollCategory": {
"UID": "cc6ed715-8cf7-417b-9ac1-887717f021e3",
"Name": "Base Salary",
"Type": "Wage",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/PayrollCategory/Wage/cc6ed715-8cf7-417b-9ac1-887717f021e3"
},
"Hours": null,
"CalculationRate": null,
"Amount": 961.540000,
"YearToDate": 0.0
},
{
"PayrollCategory": {
"UID": "0a13c7f8-7768-4066-b99e-ba55089866bf",
"Name": "Salary Sacrifice",
"Type": "Superannuation",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/PayrollCategory/Superannuation/0a13c7f8-7768-4066-b99e-ba55089866bf"
},
"Hours": null,
"CalculationRate": null,
"Amount": -100.000000,
"YearToDate": 0.0
},
{
"PayrollCategory": {
"UID": "3d86356e-bc19-4c8e-80cb-cc0eacfb2d1e",
"Name": "PAYG Withholding",
"Type": "Tax",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/PayrollCategory/Tax/3d86356e-bc19-4c8e-80cb-cc0eacfb2d1e"
},
"Hours": null,
"CalculationRate": null,
"Amount": -200.000000,
"YearToDate": 0.0
},
{
"PayrollCategory": {
"UID": "aeaaa640-20ac-42a8-a5a9-cb527efb10b6",
"Name": "Holiday Leave Accrual",
"Type": "Entitlement",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/PayrollCategory/Entitlement/aeaaa640-20ac-42a8-a5a9-cb527efb10b6"
},
"Hours": 1.670000,
"CalculationRate": null,
"Amount": null,
"YearToDate": 0.0
},
{
"PayrollCategory": {
"UID": "75945d5d-0510-4a8e-bb40-7a5ab66f664d",
"Name": "Superannuation Guarantee",
"Type": "Superannuation",
"URI": "https://arl2.api.myob.com/accountright/0c7fc03e-e474-42dc-9a46-2fa91694d984/Payroll/PayrollCategory/Superannuation/75945d5d-0510-4a8e-bb40-7a5ab66f664d"
},
"Hours": null,
"CalculationRate": null,
"Amount": 86.540000,
"YearToDate": 0.0
}
]
}
],
"NextPageLink": null,
"Count": 1
}
To access the report in AccountRight UI, go to the Reports menu (at the top of the AccountRight window) and choose Index to Reports. The report is available under Payroll/Employees/Payroll Advice.
Below is an example report. To learn more about the the AccountRight UI refer to Reports
If you have any questions, feel free to log a ticket with the Customisation & Integration Team.
Comments
0 comments
Article is closed for comments.