Skip to content

Conversation

sue-obeirne-xero
Copy link

Description

  • Adding docs for updating the V2 earnings rate endpoint to be enabled for AU region to GET, POST and GET/{Id}

Release Notes

  • Enables AU consumers to get earnings rates without having to get Payitems object
  • Better validation messages
  • Correct error handling

Screenshots (if appropriate):

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Copy link

github-actions bot commented Oct 1, 2025

PETOSS-823

Copy link

github-actions bot commented Oct 1, 2025

Thanks for raising an issue, a ticket has been created to track your request

url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Payroll AU API
- description: Xero Payroll AU API (v1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean all the new earnings rates endpoints (that are calling the public api V2) will be under this v1?
image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need a new seperate server for our new endpoitns?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see here

- in: query
name: page
description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. When page value is not a number or a negative number, by default, the first set of records is returned
example: https://api.xero.com/payroll.xro/2.0/earningsRates?page=2 to get the second set of the records.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be the page number? And not the entire query
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch yes!!

tags:
- PayrollAu
operationId: getEarningsRates
x-hasPayrollUkProblem: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a vendor extension used for generation of the SDKs from the spec...specifically java sdk in this case 😀 Theres a list in xero-internal I'll send to you

tags:
- PayrollAu
operationId: createEarningsRate
x-hasPayrollUkProblem: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

operationId: getEarningsRate
servers:
- url: https://api.xero.com/payroll.xro/2.0
x-hasPayrollUkProblem: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here

Comment on lines 4578 to 4628
Pagination:
properties:
page:
type: integer
example: 1
pageSize:
type: integer
example: 10
pageCount:
type: integer
example: 1
itemCount:
type: integer
example: 2
Problem:
description: The object returned for a bad request
type: object
properties:
type:
description: The type of error format
type: string
example: application/problem+json
title:
description: The type of the error
type: string
example: BadRequest
status:
description: The error status code
type: string
example: 400
detail:
description: A description of the error
type: string
example: Validation error occurred.
instance:
type: string
invalidFields:
type: array
items:
$ref: '#/components/schemas/InvalidField'
InvalidField:
type: object
properties:
name:
description: The name of the field that caused the error
type: string
example: isExemptFromSuper
reason:
description: The reason the error occurred
type: string
example: The property isExemptFromSuper is required.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these meant to be here?
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep they are part of the open api schema for the v2 endpoints

description: For allowances using RatePerUnit only, whether it contributes towards the overtime rate.
type: boolean
example: false
EarningsRateObject:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between this EarningsRateObject and EarningsRates? Because we also have V1 and V2 as well:
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EarningsRateObject needs to be cleaned up thank you!

operationId: getEarningsRates
x-hasPayrollUkProblem: true
servers:
- url: https://api.xero.com/payroll.xro/2.0
Copy link
Author

@sue-obeirne-xero sue-obeirne-xero Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rickyh5000 have left the server uri as is and only added the V2 server uri for the V2 endpoints... however if you think it would be easier to understand we can always put both server uris into the dropdown?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just think it might be a bit misleading but not sure how easy it is to put the V2 server uri into the dropdown

type: boolean
example: false
AccrueLeave:
description: Indicates that this earnings rate should affect accruing of leave. Only applicable if RateType is MULTIPLEOFORDINARYEARNINGSRATE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Indicates that this earnings rate should affect accruing of leave. Only applicable if RateType is MULTIPLEOFORDINARYEARNINGSRATE
description: Indicates that this earnings rate should affect accruing of leave.

Not sure if we need that extra part here, this feels like more just a generic description and the Required if RateType is MultipleOfOrdinaryEarningsRate is more for the POST only

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.

3 participants