Exclusive: all our customers get a free six-month subscription to a next-gen data and AI learning platform

Explore the Xero Payroll NZ API data model

See how the various Xero Payroll NZ endpoints relate to each other, using our handy Entity Relationship Diagram

Pulling data from the Xero Payroll NZ API is only the first part of your reporting. You also need to understand the relationships between different endpoints - something that APIs typically fail to convey.

At SyncHub, we not only sync your Xero Payroll NZ API endpoints down into a reportable format, we also describe their relationships (e.g. in terms of foreign keys) so that you can quickly get a grasp of your data and how it fits together. This page is intended as technical documentation of these relationships.

Endpoints

Account

Documentation: https://developer.xero.com/documentation/api/payrollnz/settings

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
AccountID guid - -
Type string - -
Code string - -

EarningsRate

Documentation: https://developer.xero.com/documentation/api/payrollnz/earningrates

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
EarningsRateID guid - -
CurrentRecord boolean - -
EarningsType string - -
RateType string - -
TypeOfUnits string - -
ExpenseAccountID guid -
  • 27 Feb 2024 Foreign Key - Should refer to Account but examples have been found that don't come down from API.
FixedAmount decimal - -
RatePerUnit decimal - -
MultipleOfOrdinaryEarningsRate decimal - -

Employee

Documentation: https://developer.xero.com/documentation/api/payrollnz/employees

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID guid - -
UpdatedDateUTC datetime - -
CreatedDateUTC datetime - -
FirstName string - -
LastName string - -
DateOfBirth datetime - -
Gender string - -
Email string - -
PhoneNumber string - -
StartDate datetime - -
EndDate datetime - -
EmploymentType string - -
JobTitle string - -
AddressLine1 string - -
AddressLine2 string - -
AddressCity string - -
AddressSuburb string - -
AddressCountryName string - -
AddressPostCode string - -
PayrollCalendarID guid PayrollCalendar → PayrollCalendarID -

EmployeeLeave

Documentation: https://developer.xero.com/documentation/api/payrollnz/employeeleave

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Description string - -
EmployeeID guid Employee → EmployeeID -
LeaveID guid - -
UpdatedDateUTC datetime - -
LeaveTypeID guid LeaveType → LeaveTypeID -
StartDate datetime - -
EndDate datetime - -
JobTitle string - -

EmployeeLeaveBalance

Documentation: https://developer.xero.com/documentation/api/payrollnz/leavebalances

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID guid Employee → EmployeeID -
LeaveTypeID guid LeaveType → LeaveTypeID -
Balance decimal - -
TypeOfUnits string - -

EmployeeLeaveType

Documentation: https://developer.xero.com/documentation/api/payrollnz/employeeleavetypes

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID guid Employee → EmployeeID -
LeaveTypeID guid LeaveType → LeaveTypeID -
ScheduleOfAccrual string - -
HoursAccruedAnnually decimal - -
MaximumToAccrue decimal - -
OpeningBalance decimal - -
RateAccruedHourly decimal - -
PercentageOfGrossEarnings decimal - -
IncludeHolidayPayEveryPay boolean - -
ShowAnnualLeaveInAdvance boolean - -
AnnualLeaveTotalAmountPaid decimal - -

EmployeeSalaryAndWage

Documentation: https://developer.xero.com/documentation/api/payrollnz/salaryandwages

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID guid Employee → EmployeeID -
SalaryAndWagesID guid - -
EarningsRateID guid EarningsRate → EarningsRateID -
NumberOfUnitsPerWeek decimal - -
RatePerUnit decimal - -
NumberOfUnitsPerDay decimal - -
DaysPerWeek decimal - -
EffectiveFrom datetime - -
AnnualSalary decimal - -
Status string - -
PaymentType string - -

LeaveType

Documentation: https://developer.xero.com/documentation/api/payrollnz/leavetypes

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
LeaveTypeID guid - -
UpdatedDateUTC datetime - -
IsActive boolean - -
IsPaidLeave boolean - -
ShowOnPayslip boolean - -

PayRun

Documentation: https://developer.xero.com/documentation/api/payrollnz/payruns

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayRunID guid - -
PostedDateTime datetime - -
PayrollCalendarID guid PayrollCalendar → PayrollCalendarID -
PeriodStartDate datetime - -
PeriodEndDate datetime - -
PaymentDate datetime - -
TotalCost decimal - -
TotalPay decimal - -
PayRunStatus string - -
PayRunType string - -
PayslipMessage string - -

PayrollCalendar

Documentation: https://developer.xero.com/documentation/api/payrollnz/payruncalendars

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
PayrollCalendarID guid - -
UpdatedDateUTC datetime - -
CalendarType string - -
PeriodStartDate datetime - -
PeriodEndDate datetime - -
PaymentDate datetime - -

Payslip

Documentation: https://developer.xero.com/documentation/api/payrollnz/payslips

Column Type Relates to Notes
RemoteID string - -
PayRunRemoteID string PayRun → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayslipID guid - -
PayRunID guid - -
EmployeeID guid Employee → EmployeeID -
LastEdited datetime - -
TotalEarnings decimal - -
GrossEarnings decimal - -
TotalPay decimal - -
TotalEmployerTaxes decimal - -
TotalEmployeeTaxes decimal - -
TotalDeductions decimal - -
TotalReimbursements decimal - -
TotalStatutoryDeductions decimal - -
TotalSuperannuation decimal - -
BacsHash string - -
PaymentMethod string - -

Reimbursement

Documentation: https://developer.xero.com/documentation/api/payrollnz/reimbursements

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
ReimbursementID guid - -
CurrentRecord boolean - -
StandardAmount decimal - -
StandardTypeOfUnits string - -
StandardRatePerUnit decimal - -
ReimbursementCategory string - -
CalculationType string - -
AccountID guid -
  • 27 Feb 2024 Foreign Key - Should refer to Account but examples have been found that don't come down from API.

Superannuation

Documentation: https://developer.xero.com/documentation/api/payrollnz/superannuation

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID guid - -
Name string - -
CurrentRecord boolean - -
Category string - -
LiabilityAccountID guid -
  • 27 Feb 2024 Foreign Key - Should refer to Account but examples have been found that don't come down from API.
ExpenseAccountID guid -
  • 27 Feb 2024 Foreign Key - Should refer to Account but examples have been found that don't come down from API.
StandardAmount decimal - -
Percentage decimal - -
CalculationTypeNZ string - -

Timesheet

Documentation: https://developer.xero.com/documentation/api/payrollnz/timesheets

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
TimesheetID guid - -
UpdatedDateUTC datetime - -
PayrollCalendarID guid PayrollCalendar → PayrollCalendarID -
EmployeeID guid Employee → EmployeeID -
StartDate datetime - -
EndDate datetime - -
Status string - -
TotalHours decimal - -

EmployeeLeavePeriod

Column Type Relates to Notes
RemoteID string - -
EmployeeLeaveRemoteID string EmployeeLeave → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
LeaveID guid - -
LineNumber int - -
PeriodStartDate datetime - -
PeriodEndDate datetime - -
NumberOfUnits string - -
PeriodStatus string - -

PayslipEarningsLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayslipID guid Payslip → PayslipID -
EarningsLineID guid - -
EarningsRateID guid EarningsRate → EarningsRateID -
DisplayName string - -
RatePerUnit decimal - -
NumberOfUnits decimal - -
FixedAmount decimal - -
Amount decimal - -
IsLinkedToTimesheet boolean - -
IsAverageDailyPayRate boolean - -
IsSystemGenerated boolean - -

PayslipSuperannuationLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayslipID guid Payslip → PayslipID -
SuperannuationTypeID guid Superannuation → ID -
Amount decimal - -
FixedAmount decimal - -
Percentage decimal - -
ManualAdjustment boolean - -

PayslipLeaveAccrualLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayslipID guid Payslip → PayslipID -
LeaveTypeID guid - -
NumberOfUnits decimal - -

PayslipPaymentLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PayslipID guid Payslip → PayslipID -
PaymentLineID guid - -
Amount decimal - -
AccountNumber string - -

PayslipEmployeeTaxLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Description string - -
PayslipID guid Payslip → PayslipID -
TaxLineID guid - -
Amount decimal - -
GlobalTaxTypeID int - -
ManualAdjustment boolean - -

PayslipEmployerTaxLine

Column Type Relates to Notes
RemoteID string - -
PayslipRemoteID string Payslip → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Description string - -
PayslipID guid Payslip → PayslipID -
TaxLineID guid - -
Amount decimal - -
GlobalTaxTypeID int - -
ManualAdjustment boolean - -

TimesheetLine

Column Type Relates to Notes
RemoteID string - -
TimesheetRemoteID string Timesheet → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
TimesheetID guid - -
TimesheetLineID guid - -
Date datetime - -
EarningsRateID guid EarningsRate → EarningsRateID -
TrackingItemID guid -
  • 27 Feb 2024 Foreign Key - Refers to 'TrackingCategory' (not implemented).
NumberOfUnits decimal - -

Need more?

SyncHub lives and breathes APIs and data. Keep exploring using the links below.