Using ifModifiedSince with getLeaveApplicationsV2 causes an error
SDK:
- Version 4.35.0
Describe the bug
If you use the ifModifiedSince argument with the xero.payrollAUApi.getLeaveApplicationsV2 method you'll get a 500 error back.
To Reproduce
Steps to reproduce the behavior:
- Set-up a client and connect it to a Xero tenant that's using AU payroll.
- Try to retrieve the leave applications using the
getLeaveApplicationsV2method by passing both axeroTenantIdargument and any date for aifModifiedSinceargument.
Alternatively, you can see the underlying issue by doing a cURL request with the If-Modified-Since header included:
curl 'https://api.xero.com/payroll.xro/1.0/LeaveApplications/v2?page=1' --header 'Xero-Tenant-Id: {ID}' --header 'Accept: application/json' --header 'Authorization: Bearer {TOKEN}' --header 'If-Modified-Since: 2023-07-05T07:43:38.820Z'
You'll get this response back:
{"Title":"An error occurred","Detail":"An error occurred in Xero. Check the API Status page http://status.developer.xero.com for current service status.","Status":500,"Instance":"c1ba9d6b-f0c7-4109-9364-ffdb6744909e"}
Expected behavior
It should accept the header and return only the leave applications modified since the given date as documented here:
https://developer.xero.com/documentation/api/payrollau/leaveapplications#optional-parameters
Screenshots
N/A
Additional context
N/A
PETOSS-313
Thanks for raising an issue, a ticket has been created to track your request
This is an error with the Xero API not an error in the SDK. A fix has been released for this within the Xero payroll API