If an ID is passed or an existing employee is matched (according to the matchType parameter), it will be updated. Otherwise a new employee will be created.

MatchType parameter values:

  • Standard (default): attempts to match an existing employee - first, based on the IRD number, then based on first name + surname + date of birth
  • None: do not attempt to match an existing employee (create a new one)
  • An employee may be created with a status of 'Incomplete' by specifying at least the minimum fields; firstName, surname, startDate, employmentType, taxCodeDeclaration_IrdNumber, taxCodeDeclaration_EsctRate, kiwiSaver_EnrollmentStatus.
    For an employee record to be considered 'Complete' the following groups of data are required:

  • Basic Details (Name, Start Date, Date of Birth and Address Details)
  • Tax Code Declaration (Tax Code and Employment Type)
  • Pay Run Defaults (Default Pay Category, Pay Cycle and Location)
  • Locations (at least one)
  • Bank Account/s (at least one)
  • Kiwi Saver Contribution Plan
  • If reporting dimensions are enabled for the business, add primary reporting dimension values using "|" as a separator between values.

    Request

    POST https://api.nzpayroll.co.nz/api/v2/business/{businessId}/employee/unstructured

    Path parameters

    Parameter name Value Description Additional
    businessId string Required

    Query parameters

    Parameter name Value Description Additional
    matchType string

    Possible values are:

    • None
    • Standard

    Request body

    The request body takes a complete NzUnstructuredEmployeeModel resource, containing the following writable properties:

    {
        "adjustedLeaveEntitlementDate": "date-time",
        "anniversaryDate": "date-time",
        "automaticallyPayEmployee": "string",
        "bankAccount1_AccountCode": "string",
        "bankAccount1_AccountName": "string",
        "bankAccount1_AccountNumber": "string",
        "bankAccount1_AccountParticulars": "string",
        "bankAccount1_AllocatedPercentage": "double",
        "bankAccount1_BankCode": "string",
        "bankAccount1_FixedAmount": "double",
        "bankAccount2_AccountCode": "string",
        "bankAccount2_AccountName": "string",
        "bankAccount2_AccountNumber": "string",
        "bankAccount2_AccountParticulars": "string",
        "bankAccount2_AllocatedPercentage": "double",
        "bankAccount2_BankCode": "string",
        "bankAccount2_FixedAmount": "double",
        "bankAccount3_AccountCode": "string",
        "bankAccount3_AccountName": "string",
        "bankAccount3_AccountNumber": "string",
        "bankAccount3_AccountParticulars": "string",
        "bankAccount3_AllocatedPercentage": "double",
        "bankAccount3_BankCode": "string",
        "bankAccount3_FixedAmount": "double",
        "dateCreated": "date-time",
        "dateOfBirth": "date-time",
        "emailAddress": "string",
        "emergencyContact1_Address": "string",
        "emergencyContact1_AlternateContactNumber": "string",
        "emergencyContact1_ContactNumber": "string",
        "emergencyContact1_Name": "string",
        "emergencyContact1_Relationship": "string",
        "emergencyContact2_Address": "string",
        "emergencyContact2_AlternateContactNumber": "string",
        "emergencyContact2_ContactNumber": "string",
        "emergencyContact2_Name": "string",
        "emergencyContact2_Relationship": "string",
        "employingEntityId": "string",
        "employingEntityNZBN": "string",
        "employmentType": "string",
        "endDate": "date-time",
        "externalId": "string",
        "firstName": "string",
        "gender": "string",
        "homePhone": "string",
        "hoursPerDay": "double",
        "hoursPerWeek": "double",
        "id": "int32",
        "isEnabledForTimesheets": "string",
        "jobTitle": "string",
        "kiwiSaver_EmployeeContribution": "int32",
        "kiwiSaver_EmployerContribution": "double",
        "kiwiSaver_EnrollmentStatus": "string",
        "kiwiSaver_IneligibilityReason": "string",
        "kiwiSaver_LateOptOutReason": "string",
        "kiwiSaver_LateOptOutReasonOtherExplanation": "string",
        "kiwiSaver_OptOutDate": "date-time",
        "kiwiSaver_PreviouslyReported": "boolean",
        "kiwiSaver_SavingsSuspensionFromDate": "date-time",
        "kiwiSaver_SavingsSuspensionToDate": "date-time",
        "leaveAccrualStartDateType": "string",
        "leaveTemplate": "string",
        "leaveWithoutPayAweAdjustmentType": "string",
        "leaveYearStart": "date-time",
        "locations": "string",
        "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",
        "primaryLocation": "string",
        "primaryPayCategory": "string",
        "rate": "double",
        "rateUnit": "string",
        "reportingDimensionValues": "string",
        "residentialAddressIsOverseas": "boolean",
        "residentialAddressLine2": "string",
        "residentialCountry": "string",
        "residentialPostCode": "string",
        "residentialState": "string",
        "residentialStreetAddress": "string",
        "residentialSuburb": "string",
        "rosteringNotificationChoices": "string",
        "startDate": "date-time",
        "status": "string",
        "surname": "string",
        "tags": "string",
        "taxCodeDeclaration_DateSigned": "date-time",
        "taxCodeDeclaration_ElectedExtraPayRate": "double",
        "taxCodeDeclaration_EsctRate": "double",
        "taxCodeDeclaration_FtcOverseasSuperOrPension": "boolean",
        "taxCodeDeclaration_IncomeAppliedToTestedBenefit": "boolean",
        "taxCodeDeclaration_IncomeBand": "int32",
        "taxCodeDeclaration_IrdNumber": "string",
        "taxCodeDeclaration_IrregularEmployment": "boolean",
        "taxCodeDeclaration_IsNonDisclosed": "boolean",
        "taxCodeDeclaration_IsPrimaryIncome": "boolean",
        "taxCodeDeclaration_MeetsMainIncomeMeansTest": "boolean",
        "taxCodeDeclaration_NewZealandResident": "boolean",
        "taxCodeDeclaration_RegisteredForGST": "boolean",
        "taxCodeDeclaration_SpecialTaxCode": "string",
        "taxCodeDeclaration_SpecialTaxCodeRate": "double",
        "taxCodeDeclaration_SpecialTaxCodeRateEndDate": "date-time",
        "taxCodeDeclaration_StudentLoan": "boolean",
        "taxCodeDeclaration_StudentLoanRate": "double",
        "taxCodeDeclaration_StudentLoanRateEndDate": "date-time",
        "taxCodeDeclaration_TaxCode": "string",
        "terminationReason": "string",
        "title": "string",
        "workPhone": "string",
        "workTypes": "string"
    }

    Properties

    Name Type Description
    adjustedLeaveEntitlementDate date-time Nullable
    anniversaryDate date-time Nullable
    automaticallyPayEmployee string String
    bankAccount1_AccountCode string String
    bankAccount1_AccountName string String
    bankAccount1_AccountNumber string String
    bankAccount1_AccountParticulars string String
    bankAccount1_AllocatedPercentage double Nullable
    bankAccount1_BankCode string String
    bankAccount1_FixedAmount double Nullable
    bankAccount2_AccountCode string String
    bankAccount2_AccountName string String
    bankAccount2_AccountNumber string String
    bankAccount2_AccountParticulars string String
    bankAccount2_AllocatedPercentage double Nullable
    bankAccount2_BankCode string String
    bankAccount2_FixedAmount double Nullable
    bankAccount3_AccountCode string String
    bankAccount3_AccountName string String
    bankAccount3_AccountNumber string String
    bankAccount3_AccountParticulars string String
    bankAccount3_AllocatedPercentage double Nullable
    bankAccount3_BankCode string String
    bankAccount3_FixedAmount double Nullable
    dateCreated date-time DateTime
    dateOfBirth date-time Nullable
    emailAddress string String
    emergencyContact1_Address string String
    emergencyContact1_AlternateContactNumber string String
    emergencyContact1_ContactNumber string String
    emergencyContact1_Name string String
    emergencyContact1_Relationship string String
    emergencyContact2_Address string String
    emergencyContact2_AlternateContactNumber string String
    emergencyContact2_ContactNumber string String
    emergencyContact2_Name string String
    emergencyContact2_Relationship string String
    employingEntityId string String
    employingEntityNZBN string String
    employmentType string String
    endDate date-time Nullable
    externalId string String
    firstName string String
    gender string String
    homePhone string String
    hoursPerDay double Nullable
    hoursPerWeek double Nullable
    id int32 Int32
    isEnabledForTimesheets string String
    jobTitle string String
    kiwiSaver_EmployeeContribution int32 Nullable
    kiwiSaver_EmployerContribution double Nullable
    kiwiSaver_EnrollmentStatus string String
    kiwiSaver_IneligibilityReason string String
    kiwiSaver_LateOptOutReason string String
    kiwiSaver_LateOptOutReasonOtherExplanation string String
    kiwiSaver_OptOutDate date-time Nullable
    kiwiSaver_PreviouslyReported boolean Nullable
    kiwiSaver_SavingsSuspensionFromDate date-time Nullable
    kiwiSaver_SavingsSuspensionToDate date-time Nullable
    leaveAccrualStartDateType string Nullable

    Possible values are:

    • EmployeeStartDate
    • SpecifiedDate
    • CalendarYear
    • CategorySpecificDate
    leaveTemplate string String
    leaveWithoutPayAweAdjustmentType string String
    leaveYearStart date-time Nullable
    locations string String
    middleName string String
    mobilePhone string String
    overrideTemplateRate string String
    payConditionRuleSet string String
    payRateTemplate string String
    paySchedule string String
    paySlipNotificationType string String
    postalAddressIsOverseas boolean Nullable
    postalAddressLine2 string String
    postalCountry string String
    postalPostCode string String
    postalState string String
    postalStreetAddress string String
    postalSuburb string String
    preferredName string String
    previousSurname string String
    primaryLocation string String
    primaryPayCategory string String
    rate double Nullable
    rateUnit string String
    reportingDimensionValues string String
    residentialAddressIsOverseas boolean Nullable
    residentialAddressLine2 string String
    residentialCountry string String
    residentialPostCode string String
    residentialState string String
    residentialStreetAddress string String
    residentialSuburb string String
    rosteringNotificationChoices string String
    startDate date-time Nullable
    status string EmployeeStatusEnum

    Possible values are:

    • Active
    • Terminated
    • Incomplete
    surname string String
    tags string String
    taxCodeDeclaration_DateSigned date-time Nullable
    taxCodeDeclaration_ElectedExtraPayRate double Nullable
    taxCodeDeclaration_EsctRate double Nullable
    taxCodeDeclaration_FtcOverseasSuperOrPension boolean Nullable
    taxCodeDeclaration_IncomeAppliedToTestedBenefit boolean Nullable
    taxCodeDeclaration_IncomeBand int32 Nullable
    taxCodeDeclaration_IrdNumber string String
    taxCodeDeclaration_IrregularEmployment boolean Nullable
    taxCodeDeclaration_IsNonDisclosed boolean Nullable
    taxCodeDeclaration_IsPrimaryIncome boolean Nullable
    taxCodeDeclaration_MeetsMainIncomeMeansTest boolean Nullable
    taxCodeDeclaration_NewZealandResident boolean Nullable
    taxCodeDeclaration_RegisteredForGST boolean Nullable
    taxCodeDeclaration_SpecialTaxCode string String
    taxCodeDeclaration_SpecialTaxCodeRate double Nullable
    taxCodeDeclaration_SpecialTaxCodeRateEndDate date-time Nullable
    taxCodeDeclaration_StudentLoan boolean Nullable
    taxCodeDeclaration_StudentLoanRate double Nullable
    taxCodeDeclaration_StudentLoanRateEndDate date-time Nullable
    taxCodeDeclaration_TaxCode string String
    terminationReason string String
    title string String
    workPhone string String
    workTypes string String

    Response

    The following HTTP status codes may be returned, optionally with a response resource.

    Status code Description Resource
    200 OK

    OK

    EmployeeUpdateResponseModel