2024 is the year of the connector - vote here

Explore the Xero Payroll UK API data model

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

Pulling data from the Xero Payroll UK 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 UK 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/payrolluk/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/payrolluk/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/payrolluk/employees

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

EmployeeLeave

Documentation: https://developer.xero.com/documentation/api/payrolluk/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 - -

EmployeeLeaveBalance

Documentation: https://developer.xero.com/documentation/api/payrollUK/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/payrollUK/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 - -

EmployeeSalaryAndWage

Documentation: https://developer.xero.com/documentation/api/payrollUK/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 -
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/payrollUK/leavetypes

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

PayRun

Documentation: https://developer.xero.com/documentation/api/payrollUK/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 - -
CalendarType string - -
PayslipMessage string - -

PayrollCalendar

Documentation: https://developer.xero.com/documentation/api/payrollUK/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/payrolluk/payslips

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

Reimbursement

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

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

Timesheet

Documentation: https://developer.xero.com/documentation/api/payrollUK/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 - -

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.