2024 is the year of the connector - vote here

Explore the Employment Hero Payroll (Keypay) API data model

See how the various Employment Hero Payroll (Keypay) endpoints relate to each other, using our handy Entity Relationship Diagram

Pulling data from the Employment Hero Payroll (Keypay) 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 Employment Hero Payroll (Keypay) 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

AccountSetting

Documentation: https://api.keypay.com.au/australia/reference/chart-of-accounts/au-chart-of-accounts--get

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
LocationID long Location → ID
  • 29 Aug 2023 Each location has their own set of defaults, but this will be NULL if we are taking about the overall business defaults
IsDefaultBusinessSettings boolean -
  • 29 Aug 2023 Each location has their own set of defaults, so this will only be TRUE if the LocationID field is NULL
DefaultExpenseAccountID long JournalAccount → ID -
DefaultLiabilityAccountID long JournalAccount → ID -
EmployeeExpenseAccountID long JournalAccount → ID -
EmployerLiabilityExpenseAccountID long JournalAccount → ID -
EmployerLiabilityLiabilityAccountID long JournalAccount → ID -
PaygExpenseAccountID long JournalAccount → ID -
PaygLiabilityAccountID long JournalAccount → ID -
PaymentAccountID long JournalAccount → ID -
SuperannuationExpenseAccountID long JournalAccount → ID -
SuperannuationLiabilityAccountID long JournalAccount → ID -

DeductionCategory

Documentation: https://api.keypay.com.au/australia/reference/deduction-categories/au-deduction-category--get-deduction-categories

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
ExpenseGeneralLedgerMappingCode string - -
ExternalID string - -
IsResc boolean - -
IsSystem boolean - -
LiabilityGeneralLedgerMappingCode string - -
PaymentSummaryClassification string - -
SgcCalculationImpact string - -
Source string - -
TaxExempt boolean - -

Employee

Documentation: https://api.keypay.com.au/new-zealand/reference/employee/nz-employee--get-employees

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
AdjustedLeaveEntitlementDate datetime - -
AnniversaryDate datetime - -
AutomaticallyPayEmployee string - -
BankAccount1AccountCode string - -
BankAccount1AccountName string - -
BankAccount1AccountNumber string - -
BankAccount1AccountParticulars string - -
BankAccount1AllocatedPercentage decimal - -
BankAccount1BankCode string - -
BankAccount1FixedAmount decimal - -
BankAccount2AccountCode string - -
BankAccount2AccountName string - -
BankAccount2AccountNumber string - -
BankAccount2AccountParticulars string - -
BankAccount2AllocatedPercentage decimal - -
BankAccount2BankCode string - -
BankAccount2FixedAmount decimal - -
BankAccount3AccountCode string - -
BankAccount3AccountName string - -
BankAccount3AccountNumber string - -
BankAccount3AccountParticulars string - -
BankAccount3AllocatedPercentage decimal - -
BankAccount3BankCode string - -
BankAccount3FixedAmount decimal - -
DateCreated datetime - -
DateOfBirth datetime - -
EmailAddress string - -
EmergencyContact1Address string - -
EmergencyContact1AlternateContactNumber string - -
EmergencyContact1ContactNumber string - -
EmergencyContact1Name string - -
EmergencyContact1Relationship string - -
EmergencyContact2Address string - -
EmergencyContact2AlternateContactNumber string - -
EmergencyContact2ContactNumber string - -
EmergencyContact2Name string - -
EmergencyContact2Relationship string - -
EmployingEntityID string - -
EmployingEntityNZBN string - -
EmploymentType string - -
EndDate datetime - -
ExternalID string - -
FirstName string - -
Gender string - -
HomePhone string - -
HoursPerDay decimal - -
HoursPerWeek decimal - -
IsEnabledForTimesheets string - -
JobTitle string - -
KiwiSaverEmployeeContribution long - -
KiwiSaverEmployerContribution decimal - -
KiwiSaverEnrollmentStatus string - -
KiwiSaverIneligibilityReason string - -
KiwiSaverLateOptOutReason string - -
KiwiSaverLateOptOutReasonOtherExplanation string - -
KiwiSaverOptOutDate datetime - -
KiwiSaverPreviouslyReported boolean - -
KiwiSaverSavingsSuspensionFromDate datetime - -
KiwiSaverSavingsSuspensionToDate datetime - -
LeaveAccrualStartDateType string - -
LeaveTemplate string - -
LeaveWithoutPayAweAdjustmentType string - -
LeaveYearStart datetime - -
MiddleName string - -
MobilePhone string - -
OverrideTemplateRate string - -
PayConditionRuleSet string - -
PayRateTemplate string - -
PaySchedule string - -
PaySlipNotificationType string - -
PostalAddressIsOverseas boolean - -
PostalAddressLine2 string - -
PostalCountry string - -
PostalPostCode string - -
PostalState string - -
PostalStreetAddress string - -
PostalSuburb string - -
PreferredName string - -
PreviousSurname string - -
PrimaryPayCategory string - -
Rate decimal - -
RateUnit string - -
ReportingDimensionValues string - -
ResidentialAddressIsOverseas boolean - -
ResidentialAddressLine2 string - -
ResidentialCountry string - -
ResidentialPostCode string - -
ResidentialState string - -
ResidentialStreetAddress string - -
ResidentialSuburb string - -
RosteringNotificationChoices string - -
StartDate datetime - -
Status string - -
Surname string - -
Tags string - -
TaxCodeDeclarationDateSigned datetime - -
TaxCodeDeclarationElectedExtraPayRate decimal - -
TaxCodeDeclarationEsctRate decimal - -
TaxCodeDeclarationFtcOverseasSuperOrPension boolean - -
TaxCodeDeclarationIncomeAppliedToTestedBenefit boolean - -
TaxCodeDeclarationIncomeBand long - -
TaxCodeDeclarationIrdNumber string - -
TaxCodeDeclarationIrregularEmployment boolean - -
TaxCodeDeclarationIsNonDisclosed boolean - -
TaxCodeDeclarationIsPrimaryIncome boolean - -
TaxCodeDeclarationMeetsMainIncomeMeansTest boolean - -
TaxCodeDeclarationNewZealandResident boolean - -
TaxCodeDeclarationRegisteredForGST boolean - -
TaxCodeDeclarationSpecialTaxCode string - -
TaxCodeDeclarationSpecialTaxCodeRate decimal - -
TaxCodeDeclarationSpecialTaxCodeRateEndDate datetime - -
TaxCodeDeclarationStudentLoan boolean - -
TaxCodeDeclarationStudentLoanRate decimal - -
TaxCodeDeclarationStudentLoanRateEndDate datetime - -
TaxCodeDeclarationTaxCode string - -
TerminationReason string - -
Title string - -
WorkPhone string - -
WorkTypes string - -

EmployeeExpenseCategory

Documentation: https://api.keypay.com.au/australia/reference/employee-expense-categories/employee-expense-category--get-employee-expense-categories

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
Description string - -
ExternalID string - -
ExternalReferenceID string - -
ExternalTaxCodeID string - -
GeneralLedgerMappingCode string - -
TaxCode string - -
TaxRate decimal - -

EmployeeLeaveAllowance

Documentation: https://api.keypay.com.au/new-zealand/reference/employee-leave-allowances/nz-employee-leave-allowances--get

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID long Employee → ID -
AutomaticallyAccrues boolean - -
CanApplyForLeave boolean - -
HoursPerYear decimal - -
LeaveCategoryID long -
  • 29 Aug 2023 This is categorized as type string, but I observe longs and it semantically makes more sense
LeaveUnitType string - -
UnitType string - -
Units decimal - -
LeaveAccrualRuleID long - -
RuleAccrualType string - -
RuleAccrueInAdvance boolean - -
RuleCapType string - -
RuleCarryOverAmount decimal - -
RuleCarryOverBehaviour string - -
RuleLeaveYearOffsetAmount string - -
RuleUnitCap decimal - -

EmployerLiabilityCategory

Documentation: https://api.keypay.com.au/australia/reference/employer-liability-categories/employer-liability-category--get-employer-liability-categories

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
CanBeDeleted boolean - -
ExternalReferenceID string - -
HideFromPaySlips boolean - -
IncludeInShiftCosts boolean - -
IsSuperannuationFund boolean - -
ShowTotalPayments boolean - -

Invoice

Documentation: https://api.keypay.com.au/new-zealand/reference/invoices/invoice--get-business-invoices

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
CultureName string - -
Currency string - -
Date datetime - -
Gst decimal - -
InvoiceNumber string - -
TotalExcludingGst decimal - -
TotalIncludingGst decimal - -

JournalAccount

Documentation: https://api.keypay.com.au/new-zealand/reference/chart-of-accounts/accounts--get

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
AccountCode string - -
AccountName string - -
AccountType string - -
ExternalReferenceID string - -

LeaveCategory

Documentation: https://api.keypay.com.au/australia/reference/leave-categories/au-leave-category--get-leave-categories

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
AccruesFirstPayRunPerPeriodOnly boolean - -
AutomaticallyAccrues boolean - -
ContingentPeriod decimal - -
DeductFromPayCategoryID long PayCategory → ID -
DeductFromPrimaryPayCategory boolean - -
EntitlementPeriod decimal - -
ExcludeFromTerminationPayout boolean - -
ExternalID string - -
HideAccrualsOnPayslip boolean - -
IsBalanceUntracked boolean - -
IsNamePrivate boolean - -
IsPrivate boolean - -
LeaveCategoryType string - -
LeaveLoading decimal - -
LeaveUnitType string - -
PayoutAsETP boolean - -
PreventNegativeBalanceUnpaidLeaveCategoryID long - -
Source string - -
TransferOnTerminationToPayCategoryID long PayCategory → ID -
TransferToPayCategoryID long PayCategory → ID -
UnitType string - -
Units decimal - -
UseDeductFromPayCategoryRate boolean - -
LeaveAccrualRuleID long - -

LeaveRequest

Documentation: https://api.keypay.com.au/australia/reference/leave-requests/au-business-hours-leave-request--list-leave-requests

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
AttachmentID long - -
EmployeeID long Employee → ID -
FromDate datetime - -
ToDate datetime - -
HoursApplied decimal - -
LeaveCategoryID long LeaveCategory → ID -
Notes string - -
Status string - -
TotalHours decimal - -

Location

Documentation: https://api.keypay.com.au/new-zealand/reference/location/nz-location--get-locations

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
Country string - -
ExternalAccountingLocationID string - -
ExternalID string - -
FullyQualifiedName string - -
GeneralLedgerMappingCode string - -
IsGlobal boolean - -
IsRollupReportingLocation boolean - -
ParentID long Location → ID -
Source string - -
State string - -

PayCategory

Documentation: https://api.keypay.com.au/australia/reference/pay-category/au-pay-category--get-pay-categories

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
AccruesLeave boolean - -
AllowanceDescription string - -
AwardID long - -
DefaultSuperRate decimal - -
ExternalID string - -
GeneralLedgerMappingCode string - -
HideUnitsOnPaySlip boolean - -
IsPayrollTaxExempt boolean - -
IsPrimary boolean - -
IsSystemPayCategory boolean - -
IsTaxExempt boolean - -
NumberOfDecimalPlaces long - -
ParentID long PayCategory → ID -
PayCategoryType string - -
PaymentSummaryClassification string - -
PenaltyLoadingPercent decimal - -
RateLoadingPercent decimal - -
RateUnit string - -
RoundingMethod string - -
Source string - -
SuperExpenseMappingCode string - -
SuperLiabilityMappingCode string - -

EmployeePayRate

Documentation: https://api.keypay.com.au/australia/reference/employee/au-employee-pay-rates--get

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID long Employee → ID -
AccruesLeave boolean - -
CalculatedRate decimal - -
IsPrimaryPayCategory boolean - -
PayCategoryID long PayCategory → ID -
Rate decimal - -
RateUnit string - -
HasSuperRateOverride boolean -
  • 31 Aug 2023 Part of the Australian data model, only
SuperRate decimal -
  • 31 Aug 2023 Part of the Australian data model, only

PayRun

Documentation: https://api.keypay.com.au/australia/reference/pay-run/au-pay-run--get

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
DateFinalised datetime - -
DatePaid datetime - -
ExternalID string - -
IsFinalised boolean - -
Notation string - -
PayPeriodEnding datetime - -
PayPeriodStarting datetime - -
PayScheduleID long - -
PaySlipsPublished boolean - -

EmployeePayRun

Documentation: https://api.keypay.com.au/australia/reference/pay-run/au-pay-run--payments

Column Type Relates to Notes
RemoteID string - -
PayRunRemoteID string PayRun → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
EmployeeID long Employee → ID -
PayRunID long PayRun → ID -
GrossEarnings decimal - -
IsPublished boolean - -
NetEarnings decimal - -
Notation string - -
PostTaxDeductions decimal - -
PreTaxDeductions decimal - -
TaxableEarnings decimal - -
TotalEmployeeExpenses decimal - -
TotalEmployerLiabilities decimal - -
TotalHours decimal - -
AccLevyAmount decimal - -
EsctContribution decimal - -
KiwiSaverEmployeeContribution decimal - -
KiwiSaverEmployerContribution decimal - -
PayeWithheld decimal - -
StudentLoanAdditionalMandatoryAmount decimal - -
StudentLoanAdditionalVoluntaryAmount decimal - -
StudentLoanAmount decimal - -
HelpWithheld decimal - -
PaygWithheld decimal - -
SfssWithheld decimal - -
SuperContribution decimal - -

Qualification

Documentation: https://api.keypay.com.au/australia/reference/qualifications/qualification--get-qualifications?v=latest

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -

Role

Documentation: https://api.keypay.com/new-zealand/resources/rostershiftrole?v=latest

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
ClassName string - -
HexColourCode string - -

RosterShift

Documentation: https://api.keypay.com.au/australia/reference/roster-shifts/au-roster-shift--get?v=latest

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Description string - -
IsDifferent boolean - -
Token string - -
EmployeeID long Employee → ID -
LocationID long Location → ID -
WorkTypeID long WorkType → ID -
StartTime datetime - -
EndTime datetime - -
Notes string - -
Published boolean - -
Accepted boolean - -
DatePublished datetime - -
Biddable boolean - -
ShiftSwapCutoffTime datetime - -
ShiftAssignmentStatus string - -
ClassificationID long - -
PendingSwapID long - -
RoleID long Role → ID -

Timesheet

Documentation: https://api.keypay.com.au/new-zealand/reference/timesheets/nz-timesheet--get

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
AttachmentID long - -
Comments string - -
EmployeeID long Employee → ID -
StartTime datetime - -
EndTime datetime - -
ExternalID string - -
HiddenComments string - -
LeaveCategoryID long - -
LocationID long Location → ID -
PayCategoryID long PayCategory → ID -
Rate decimal - -
Source string - -
Status string - -
SubmittedByUser string - -
WorkTypeID long WorkType → ID -

WorkType

Documentation: https://api.keypay.com.au/australia/reference/work-types/au-work-type--get-work-types

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
AccruesLeave boolean - -
AwardPackageID long - -
ExternalID string - -
LeaveCategoryID long - -
MappingType string - -
PayCategoryID long PayCategory → ID -
ShortCode string - -
Source string - -

AccountSettingCategory

Column Type Relates to Notes
RemoteID string - -
AccountSettingRemoteID string AccountSetting → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
CategoryType string - -
ExpenseAccountID long JournalAccount → ID
  • 23 Aug 2023 This field is not present in all category types, but we slightly denormalize here so that we may merge all categories into a single result set
LiabilityAccountID long JournalAccount → ID
  • 23 Aug 2023 This field is not present in all category types, but we slightly denormalize here so that we may merge all categories into a single result set
AccrueFromContingentPeriod boolean -
  • 23 Aug 2023 This field is not present in all category types, but we slightly denormalize here so that we may merge all categories into a single result set
DeductionCategoryID long DeductionCategory → ID -
EmployeeExpenseCategoryID long EmployeeExpenseCategory → ID -
PayCategoryID long PayCategory → ID -
LeaveCategoryID long LeaveCategory → ID -
EmployerLiabilityCategoryID long EmployerLiabilityCategory → ID -

EmployeeLocation

Column Type Relates to Notes
RemoteID string - -
EmployeeRemoteID string Employee → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
EmployeeID long Employee → ID -
LocationID long Location → ID -
IsPrimaryLocation boolean - -

InvoiceLine

Column Type Relates to Notes
RemoteID string - -
InvoiceRemoteID string Invoice → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Description string - -
InvoiceID long Invoice → ID -
LineNumber int - -
Abn string - -
BillingPlan string - -
BrandName string - -
BusinessNumber string - -
Quantity decimal - -
TotalIncludingGst decimal - -
UnitPriceIncludingGst decimal - -
WhiteLabelName string - -
DetailedDescription string - -
GroupName string - -

RosterShiftBreak

Column Type Relates to Notes
RemoteID string - -
RosterShiftRemoteID string RosterShift → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
RosterID long RosterShift → ID -
StartTime datetime - -
EndTime datetime - -
IsPaidBreak boolean - -

RosterShiftQualification

Column Type Relates to Notes
RemoteID string - -
RosterShiftRemoteID string RosterShift → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
RosterID long RosterShift → ID -
OpportunityID long -
  • 7 Dec 2023 Have not been able to confirm if this is an FK to a Qualification, removing reference for now

TimesheetBreak

Column Type Relates to Notes
RemoteID string - -
TimesheetRemoteID string Timesheet → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
TimesheetID long Timesheet → ID -
EndTime datetime - -
IsPaidBreak boolean - -
StartTime datetime - -

TimesheetDimension

Column Type Relates to Notes
RemoteID string - -
TimesheetRemoteID string Timesheet → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
TimesheetID long Timesheet → ID -
ReportingDimensionID long - -

Need more?

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