xero-php-oauth2 icon indicating copy to clipboard operation
xero-php-oauth2 copied to clipboard

Non-existent `includeArchived` field for Invoices

Open CodeSmith32 opened this issue 1 month ago • 2 comments

SDK you're using (please complete the following information):

  • Version [No idea. Update your issue template to specify where version is found. Regardless, I still see this issue in the 10.3.0 codebase.]

Describe the bug The Accounting API getInvoices method offers an $include_archived option which adds a query param, includeArchived set to either true or false. What is this? The Xero API documents an includeArchived field for Contacts but there's no such documented field for invoices. It is very misleading, and appears to have absolutely no effect. It does not filter out deleted invoices, and there is no 'archive' status for invoices.

The code for this unknown field appears in AccountingApi.php on line 34571: https://github.com/XeroAPI/xero-php-oauth2/blob/master/lib/Api/AccountingApi.php

CodeSmith32 avatar Dec 03 '25 16:12 CodeSmith32