Skip to content

feat(payroll-nz): add kiwiSaverStatus and registeredForGST to employee tax - #858

Merged
the-chris-mitchell merged 2 commits into
XeroAPI:masterfrom
adam-smith-xero:AUP-26301
Oct 29, 2026
Merged

the-chris-mitchell merged 2 commits into
XeroAPI:masterfrom
adam-smith-xero:AUP-26301

Conversation

@adam-smith-xero

@adam-smith-xero adam-smith-xero commented Oct 28, 2026 •

Copy link
Copy Markdown

Description

Aligns the NZ Payroll EmployeeTax schema with the updated payrollnz/employeetax developer documentation, ahead of kiwiSaverStatus becoming required on POST /Employees/{EmployeeID}/Tax.

The schema had no kiwiSaverStatus or registeredForGST property, so SDK users could not send either field. Once kiwiSaverStatus is enforced, POSTs from the generated SDKs would fail.

Changes in xero-payroll-nz.yaml:

  • Add kiwiSaverStatus (enum, values from KiwiSaver eligibility options). Required in POST for all tax codes except WT and NSW.
  • Add registeredForGST (boolean). Required in POST when taxCode is WT.
  • Mark isEligibleForKiwiSaver as deprecated: true, replaced by kiwiSaverStatus.
  • Add an operation description to updateEmployeeTax: POST is a full replacement, and omitted fields are treated as null.
  • Update the request and response examples, and the x-example SDK sample, to send kiwiSaverStatus instead of the deprecated field.
  • Fix grammar in the hasSpecialStudentLoanRate description.
  • Fix two x-example default values copied from deductionCategory (DeductionCategory.NzOther). kiwiSaverContributions now uses EmployeeTax.KiwiSaverContributionsEnum.MakeContributions, and scheduleOfAccrual on createEmployeeLeaveType now uses EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings. Both match the per-language values already in those entries.

Notes for review

  • All changes are additive or a deprecation, so this should not be flagged as breaking.
  • The per-language enum paths in the new x-example entry follow the existing kiwiSaverContributions entry. Codegen validation is the real check on these.
  • Conditional requirements are stated in the property descriptions. They are not expressed as required or oneOf, because they depend on other field values.
  • The min/max limits now in the docs are not added as minimum/maximum. Adding constraints to request properties is a breaking change for oasdiff.

Checklist

  • feat commit title
  • yamllint passes
  • Spectral reports no new findings against master
  • scripts/api-diff/api-diff.test.sh passes
  • oasdiff (not run locally, CI covers it)

Jira: AUP-26301

🤖 Generated with Claude Code

…e tax

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adam-smith-xero
adam-smith-xero marked this pull request as ready for review October 28, 2026 06:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@the-chris-mitchell
the-chris-mitchell merged commit df43c6d into XeroAPI:master Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants