This page is for MYOB partners familiar with APIs.
When integrating customer data into MYOB Acumatica — Payroll, there are two endpoints on the Web Service Endpoints screen that you can use for integrating data with REST API:
ADVPAU is the endpoint for the Australian version of payroll.
ADVPNZ is the endpoint for the New Zealand version of payroll.
Both endpoints are based on the 20.200.001 endpoint version of the MYOB Acumatica platform.
The ADVP endpoints cover the following entities related to payroll:
Employee – organisational employee record with payroll-specific information: Employment History, Payroll Expense Allocation Settings.
PayDetails – Payroll Employee, Employee and Taxation Settings, Pay Distribution, Employee Pay Groups and Standard Pay.
PayItem – Pay Items.
Entitlement – Entitlements.
PostingClass – Payroll Posting Classes.
GLPurpose – General Ledger Purposes.
PayItemLiabilities – Pay Item Liabilities.
Timesheet – Import Timesheet batches.
DataMap – mapping rules for the Timesheet Import.
The ADVP endpoints also cover some entities shared with fields related to payroll – like Employees.
Because the ADVP endpoints are not based on any other endpoints, you might need to use a different endpoint if you need access to entities that aren't covered by the ADVP endpoints. For example, if a third-party software needs to access the list of GL Accounts, you can use the Default endpoint.
REST API examples that use the ADVP endpoints
Below, you can find examples of HTTP requests for supported business scenarios in MYOB Acumatica — Payroll. These requests might not meet your exact requirements, so you might need to tweak them to import or retrieve the data you need.
In the examples below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance. For example, https://mycompany.myobacumatica.com.
Creating an employee
The following HTTP request is an example of how to create an employee. In this example, the employee's ID is EMP000111.
Having the $expand or $select parameters return the required details of the request examples below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance (such as https://mycompany.myobacumatica.com).
Retrieving information about an employee
There are two ways to retrieve information about an employee.
The following HTTP request is an example of how to create a payroll employee record for a previously created employee. In this example, the employee's ID is EMP000111.
The following HTTP request is an example of how to create employee pay groups for a previously created employee. In this example, the employee's ID is EMP000111. You can also incorporate the pay groups section to the initial call for the payroll employee creation.
You don't need to include the EmployeePayGroupCode in the creation request, because the IDs will be automatically generated during creation.
Use $expand=PayGroups to get the EmployeePayGroupCode of the created pay groups (Standard Pay ID) record. It will be required for the updating of the existing Employee PayGroup records.
Updating existing pay groups
The request below is an example of how to update the existing PayGroups, since the automatically generated IDs (300 and 301) have been used in the request.
The following HTTP request is an example of how to populate the Employee Standard Pay for a specific Pay Group. In this example, the previously created employee's ID is EMP000111. You need to use the Pay Item internal ID to correctly identify the pay item in the Standard Pay.
To retrieve the internal ID of the Pay Item, add &$custom=PayItem.PayItemID parameter to the GET Pay Item call
Also, use the PayGroupCode (which is the internal ID) to specify which PayGroup is going to be updated.
The following HTTP request is an example of how to create an Import Timesheet Batch record. Use the Batchnumber returned in the response to find the created batch in subsequent requests.
The following HTTP request is an example of how to execute the Map Imported Items action against an Import Timesheet Batch record. Use the Batchnumber returned in the previous response.