Xero Payroll AU API

PayrollAu

approveLeaveApplication

Approve a requested leave application by a unique leave application id


/LeaveApplications/{LeaveApplicationID}/approve

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID leaveApplicationID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID leaveApplicationID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';

        try {
            LeaveApplications result = apiInstance.approveLeaveApplication(accessToken, xeroTenantId, leaveApplicationID, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#approveLeaveApplication");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Path parameters
Name Description
LeaveApplicationID*
UUID (uuid)
Leave Application id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

createEmployee

Creates a payroll employee


/Employees

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate dateOfBirth = LocalDate.of(2000, Month.OCTOBER, 28);
        
        HomeAddress homeAddress = new HomeAddress();
        homeAddress.setAddressLine1("123 Test st");
        homeAddress.setRegion("VIC");
        homeAddress.setPostalCode(3000);
        homeAddress.setCity("Melbourne");
        
        Employee employee = new Employee();
        employee.setFirstName("Adam");
        employee.setLastName("Adamson");
        employee.setDateOfBirth(dateOfBirth);
        employee.setHomeAddress(homeAddress);

        try {
            Employees result = apiInstance.createEmployee(accessToken, xeroTenantId, employee, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createEmployee");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
employee *
array[Employee]
Required

createLeaveApplication

Creates a leave application


/LeaveApplications

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 28);
        LocalDate endDate = LocalDate.of(2020, Month.OCTOBER, 30);
        
        LeaveApplication leaveApplication = new LeaveApplication();
        leaveApplication.setEmployeeId(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        leaveApplication.setLeaveTypeId(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        leaveApplication.setTitle("Annual Leave");
        leaveApplication.setStartDate(startDate);
        leaveApplication.setEndDate(endDate);

        try {
            LeaveApplications result = apiInstance.createLeaveApplication(accessToken, xeroTenantId, leaveApplication, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createLeaveApplication");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
leaveApplication *
array[LeaveApplication]
Required

createPayItem

Creates a pay item


/PayItems

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        
        EarningsRate earningsRate = new EarningsRate();
        earningsRate.setName("Ordinary Hours 123");
        earningsRate.setAccountCode("477");
        earningsRate.setTypeOfUnits("Hours");
        earningsRate.setIsExemptFromTax(true);
        earningsRate.setIsExemptFromSuper(true);
        earningsRate.setEarningsType(com.xero.models.payrollau.EarningsType.OVERTIMEEARNINGS);
        
        DeductionType deductionType = new DeductionType();
        deductionType.setName("Union Fees");
        deductionType.setAccountCode("826");
        deductionType.setReducesTax(true);
        deductionType.setReducesSuper(true);
        
        LeaveType leaveType = new LeaveType();
        leaveType.setName("Annual Leave");
        leaveType.setTypeOfUnits("Hours");
        leaveType.setIsPaidLeave(true);
        leaveType.setShowOnPayslip(true);
        
        ReimbursementType reimbursementType = new ReimbursementType();
        reimbursementType.setName("Annual Leave");
        reimbursementType.setAccountCode("850");

        List<EarningsRate> earningsRates = new ArrayList<EarningsRate>();
        earningsRates.add(earningsRate);

        List<DeductionType> deductionTypes = new ArrayList<DeductionType>();

        List<LeaveType> leaveTypes = new ArrayList<LeaveType>();
        leaveTypes.add(leaveType);

        List<ReimbursementType> reimbursementTypes = new ArrayList<ReimbursementType>();
        reimbursementTypes.add(reimbursementType);
        
        PayItem payItem = new PayItem();
        payItem.setEarningsRates(earningsRates);
        payItem.setDeductionTypes(deductionTypes);
        payItem.setLeaveTypes(leaveTypes);
        payItem.setReimbursementTypes(reimbursementTypes);

        try {
            PayItems result = apiInstance.createPayItem(accessToken, xeroTenantId, payItem, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createPayItem");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
payItem *
PayItem
Required

createPayRun

Creates a pay run


/PayRuns

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        
        PayRun payRun = new PayRun();
        payRun.setPayrollCalendarID(UUID.fromString("00000000-0000-0000-0000-000000000000"));

        try {
            PayRuns result = apiInstance.createPayRun(accessToken, xeroTenantId, payRun, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createPayRun");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payruns Grant read-write access to payroll payruns

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
payRun *
array[PayRun]
Required

createPayrollCalendar

Creates a Payroll Calendar


/PayrollCalendars

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 28);
        LocalDate paymentDate = LocalDate.of(2020, Month.OCTOBER, 30);
        
        PayrollCalendar payrollCalendar = new PayrollCalendar();
        payrollCalendar.setName("Weekly");
        payrollCalendar.setCalendarType(com.xero.models.payrollau.CalendarType.WEEKLY);
        payrollCalendar.setStartDate(startDate);
        payrollCalendar.setPaymentDate(paymentDate);

        List<PayrollCalendar> payrollCalendars = new ArrayList<PayrollCalendar>();
        payrollCalendars.add(payrollCalendar);

        try {
            PayrollCalendars result = apiInstance.createPayrollCalendar(accessToken, xeroTenantId, payrollCalendar, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createPayrollCalendar");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
payrollCalendar *
array[PayrollCalendar]
Required

createSuperfund

Creates a superfund


/Superfunds

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        
        SuperFund superFund = new SuperFund();
        superfund.setType(com.xero.models.payrollau.SuperFundType.REGULATED);
        superfund.setUSI("40022701955002");

        try {
            SuperFunds result = apiInstance.createSuperfund(accessToken, xeroTenantId, superFund, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createSuperfund");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
superFund *
array[SuperFund]
Required

createTimesheet

Creates a timesheet


/Timesheets

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 23);
        LocalDate endDate = LocalDate.of(2020, Month.OCTOBER, 30);
        
        Timesheet timesheet = new Timesheet();
        timesheet.setEmployeeID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        timesheet.setStartDate(startDate);
        timesheet.setEndDate(endDate);
        timesheet.setStatus(com.xero.models.payrollau.TimesheetStatus.DRAFT);

        try {
            Timesheets result = apiInstance.createTimesheet(accessToken, xeroTenantId, timesheet, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#createTimesheet");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.timesheets Grant read-write access to payroll timesheets

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
timesheet *
array[Timesheet]
Required

getEmployee

Retrieves an employee's detail by unique employee id


/Employees/{EmployeeID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID employeeID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID employeeID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            Employees result = apiInstance.getEmployee(accessToken, xeroTenantId, employeeID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getEmployee");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees
payroll.employees.read Grant read-only access to payroll employees

Parameters

Path parameters
Name Description
EmployeeID*
UUID (uuid)
Employee id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getEmployees

Searches payroll employees


/Employees

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            Employees result = apiInstance.getEmployees(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getEmployees");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees
payroll.employees.read Grant read-only access to payroll employees

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 employees will be returned in a single API call

getLeaveApplication

Retrieves a leave application by a unique leave application id


/LeaveApplications/{LeaveApplicationID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID leaveApplicationID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID leaveApplicationID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            LeaveApplications result = apiInstance.getLeaveApplication(accessToken, xeroTenantId, leaveApplicationID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getLeaveApplication");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees
payroll.employees.read Grant read-only access to payroll employees

Parameters

Path parameters
Name Description
LeaveApplicationID*
UUID (uuid)
Leave Application id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getLeaveApplications

Retrieves leave applications


/LeaveApplications

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            LeaveApplications result = apiInstance.getLeaveApplications(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getLeaveApplications");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees
payroll.employees.read Grant read-only access to payroll employees

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 objects will be returned in a single API call

getLeaveApplicationsV2

Retrieves leave applications including leave requests


/LeaveApplications/v2

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            LeaveApplications result = apiInstance.getLeaveApplicationsV2(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getLeaveApplicationsV2");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees
payroll.employees.read Grant read-only access to payroll employees

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 objects will be returned in a single API call

getPayItems

Retrieves pay items


/PayItems

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            PayItems result = apiInstance.getPayItems(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayItems");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 objects will be returned in a single API call

getPayRun

Retrieves a pay run by using a unique pay run id


/PayRuns/{PayRunID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID payRunID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID payRunID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            PayRuns result = apiInstance.getPayRun(accessToken, xeroTenantId, payRunID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayRun");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payruns Grant read-write access to payroll payruns
payroll.payruns.read Grant read-only access to payroll payruns

Parameters

Path parameters
Name Description
PayRunID*
UUID (uuid)
PayRun id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getPayRuns

Retrieves pay runs


/PayRuns

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            PayRuns result = apiInstance.getPayRuns(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayRuns");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payruns Grant read-write access to payroll payruns
payroll.payruns.read Grant read-only access to payroll payruns

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 PayRuns will be returned in a single API call

getPayrollCalendar

Retrieves payroll calendar by using a unique payroll calendar ID


/PayrollCalendars/{PayrollCalendarID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID payrollCalendarID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID payrollCalendarID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            PayrollCalendars result = apiInstance.getPayrollCalendar(accessToken, xeroTenantId, payrollCalendarID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayrollCalendar");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Path parameters
Name Description
PayrollCalendarID*
UUID (uuid)
Payroll Calendar id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getPayrollCalendars

Retrieves payroll calendars


/PayrollCalendars

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            PayrollCalendars result = apiInstance.getPayrollCalendars(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayrollCalendars");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 objects will be returned in a single API call

getPayslip

Retrieves for a payslip by a unique payslip id


/Payslip/{PayslipID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID payslipID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID payslipID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            PayslipObject result = apiInstance.getPayslip(accessToken, xeroTenantId, payslipID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getPayslip");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payslip Grant read-write access to payroll payslips
payroll.payslip.read Grant read-only access to payroll payslips

Parameters

Path parameters
Name Description
PayslipID*
UUID (uuid)
Payslip id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getSettings

Retrieves payroll settings


/Settings

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        try {
            SettingsObject result = apiInstance.getSettings(accessToken, xeroTenantId);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getSettings");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getSuperfund

Retrieves a superfund by using a unique superfund ID


/Superfunds/{SuperFundID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID superFundID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID superFundID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            SuperFunds result = apiInstance.getSuperfund(accessToken, xeroTenantId, superFundID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getSuperfund");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Path parameters
Name Description
SuperFundID*
UUID (uuid)
Superfund id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getSuperfundProducts

Retrieves superfund products


/SuperfundProducts

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        String aBN = '40022701955';
        String uSI = 'OSF0001AU';

        try {
            SuperFundProducts result = apiInstance.getSuperfundProducts(accessToken, xeroTenantId, aBN, uSI);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getSuperfundProducts");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Query parameters
Name Description
ABN
String
The ABN of the Regulated SuperFund
USI
String
The USI of the Regulated SuperFund

getSuperfunds

Retrieves superfunds


/Superfunds

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            SuperFunds result = apiInstance.getSuperfunds(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getSuperfunds");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings
payroll.settings.read Grant read-only access to payroll settings

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call

getTimesheet

Retrieves a timesheet by using a unique timesheet id


/Timesheets/{TimesheetID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID timesheetID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID timesheetID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

        try {
            TimesheetObject result = apiInstance.getTimesheet(accessToken, xeroTenantId, timesheetID);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getTimesheet");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.timesheets Grant read-write access to payroll timesheets
payroll.timesheets.read Grant read-only access to payroll timesheets

Parameters

Path parameters
Name Description
TimesheetID*
UUID (uuid)
Timesheet id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getTimesheets

Retrieves timesheets


/Timesheets

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';

        OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
        String where = 'Status=="ACTIVE"';
        String order = 'EmailAddress%20DESC';
        Integer page = 56;

        try {
            Timesheets result = apiInstance.getTimesheets(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#getTimesheets");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.timesheets Grant read-write access to payroll timesheets
payroll.timesheets.read Grant read-only access to payroll timesheets

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
If-Modified-Since
Date (date-time)
Only records created or modified since this timestamp will be returned
Query parameters
Name Description
where
String
Filter by an any element
order
String
Order by an any element
page
Integer
e.g. page=1 – Up to 100 timesheets will be returned in a single API call

rejectLeaveApplication

Reject a leave application by a unique leave application id


/LeaveApplications/{LeaveApplicationID}/reject

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID leaveApplicationID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID leaveApplicationID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';

        try {
            LeaveApplications result = apiInstance.rejectLeaveApplication(accessToken, xeroTenantId, leaveApplicationID, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#rejectLeaveApplication");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Path parameters
Name Description
LeaveApplicationID*
UUID (uuid)
Leave Application id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

updateEmployee

Updates an employee's detail

Update properties on a single employee


/Employees/{EmployeeID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID employeeID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID employeeID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate dateOfBirth = LocalDate.of(2000, Month.OCTOBER, 28);
        
        HomeAddress homeAddress = new HomeAddress();
        homeAddress.setAddressLine1("123 Test st");
        homeAddress.setRegion("VIC");
        homeAddress.setPostalCode(3000);
        homeAddress.setCity("Melbourne");
        
        Employee employee = new Employee();
        employee.setFirstName("Adam");
        employee.setLastName("Adamson");
        employee.setDateOfBirth(dateOfBirth);
        employee.setHomeAddress(homeAddress);

        try {
            Employees result = apiInstance.updateEmployee(accessToken, xeroTenantId, employeeID, employee, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updateEmployee");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Path parameters
Name Description
EmployeeID*
UUID (uuid)
Employee id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
employee *
array[Employee]
Required

updateLeaveApplication

Updates a specific leave application


/LeaveApplications/{LeaveApplicationID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID leaveApplicationID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID leaveApplicationID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 28);
        LocalDate endDate = LocalDate.of(2020, Month.OCTOBER, 30);
        
        LeaveApplication leaveApplication = new LeaveApplication();
        leaveApplication.setEmployeeId(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        leaveApplication.setLeaveTypeId(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        leaveApplication.setTitle("Annual Leave");
        leaveApplication.setStartDate(startDate);
        leaveApplication.setEndDate(endDate);

        try {
            LeaveApplications result = apiInstance.updateLeaveApplication(accessToken, xeroTenantId, leaveApplicationID, leaveApplication, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updateLeaveApplication");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.employees Grant read-write access to payroll employees

Parameters

Path parameters
Name Description
LeaveApplicationID*
UUID (uuid)
Leave Application id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
leaveApplication *
array[LeaveApplication]
Required

updatePayRun

Updates a pay run

Update properties on a single PayRun


/PayRuns/{PayRunID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID payRunID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID payRunID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        
        PayRun payRun = new PayRun();
        payRun.setPayrollCalendarID(UUID.fromString("00000000-0000-0000-0000-000000000000"));

        try {
            PayRuns result = apiInstance.updatePayRun(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updatePayRun");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payruns Grant read-write access to payroll payruns

Parameters

Path parameters
Name Description
PayRunID*
UUID (uuid)
PayRun id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
payRun *
array[PayRun]
Required

updatePayslip

Updates a payslip

Update lines on a single payslips


/Payslip/{PayslipID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID payslipID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID payslipID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        
        EarningsLine earningsLine = new EarningsLine();
        earningsLine.setEarningsRateID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        earningsLine.setRatePerUnit(20);
        earningsLine.setNumberOfUnits(1);

        List<EarningsLine> earningsLines = new ArrayList<EarningsLine>();
        earningsLines.add(earningsLine);
        
        PayslipLines payslipLine = new PayslipLines();
        payslipLine.setEarningsLines(earningsLines);

        List<PayslipLines> payslipLines = new ArrayList<PayslipLines>();
        payslipLines.add(payslipLine);

        try {
            Payslips result = apiInstance.updatePayslip(accessToken, xeroTenantId, payslipID, payslipLines, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updatePayslip");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.payslip Grant read-write access to payroll payslips

Parameters

Path parameters
Name Description
PayslipID*
UUID (uuid)
Payslip id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
payslipLines *
array[PayslipLines]
Required

updateSuperfund

Updates a superfund

Update properties on a single Superfund


/Superfunds/{SuperFundID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID superFundID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID superFundID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        
        SuperFund superFund = new SuperFund();
        superfund.setType(com.xero.models.payrollau.SuperFundType.REGULATED);
        superfund.setUSI("40022701955002");

        try {
            SuperFunds result = apiInstance.updateSuperfund(accessToken, xeroTenantId, superFundID, superFund, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updateSuperfund");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.settings Grant read-write access to payroll settings

Parameters

Path parameters
Name Description
SuperFundID*
UUID (uuid)
Superfund id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
superFund *
array[SuperFund]
Required

updateTimesheet

Updates a timesheet

Update properties on a single timesheet


/Timesheets/{TimesheetID}

Usage and SDK Samples

import org.openapitools.client.api.*;
import org.openapitools.client.api.client.PayrollAuApi;
import org.openapitools.client.models.payrollAu.*;

import java.io.File;
import java.util.*;

public class PayrollAuApiExample {
    private PayrollAuApi apiInstance;
    
    public static void main(String[] args) {
        String accessToken = "YOUR_ACCESS_TOKEN";
        ApiClient defaultClient = new ApiClient();

        apiInstance = AccountingApi.getInstance(defaultClient);
        String xeroTenantId = 'xeroTenantId_example';
        UUID timesheetID = UUID.fromString("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
        UUID timesheetID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
        String idempotencyKey = 'KEY_VALUE';
        LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 23);
        LocalDate endDate = LocalDate.of(2020, Month.OCTOBER, 30);
        
        Timesheet timesheet = new Timesheet();
        timesheet.setEmployeeID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
        timesheet.setStartDate(startDate);
        timesheet.setEndDate(endDate);
        timesheet.setStatus(com.xero.models.payrollau.TimesheetStatus.DRAFT);

        try {
            Timesheets result = apiInstance.updateTimesheet(accessToken, xeroTenantId, timesheetID, timesheet, idempotencyKey);
            System.out.println(result);
        } catch (XeroException e) {
            System.err.println("Exception when calling PayrollAuApi#updateTimesheet");
            e.printStackTrace();
        }
    }
}

Scopes

payroll.timesheets Grant read-write access to payroll timesheets

Parameters

Path parameters
Name Description
TimesheetID*
UUID (uuid)
Timesheet id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Idempotency-Key
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Body parameters
Name Description
timesheet *
array[Timesheet]
Required