We’re using Xero’s Xero.NetStandard.OAuth2 package to bulk update repeating invoices for our monthly invoices to customers. Almost every function works fine, except when we try to set the Schedule.EndDate property.
If we update other information – for example the LineAmount etc. then when we call UpdateRepeatingInvoiceAsync it works perfectly.
But if we try to send the Schedule.EndDate property to a time in the future – for example, August 2024 – on the repeatingInvoice object and call UpdateRepeatingInvoiceAsync it throws a 400 error with a “Validation exception”:
"ErrorNumber": 10,
"Type": "ValidationException",
"Message": "A validation exception occurred",
"Elements": [
....
],
"SubTotal": 77.50,
"TotalTax": 15.50,
"Total": 93.00,
"CurrencyCode": "GBP",
"ValidationErrors": [
{
"Message": "Repeating invoice status must be set to DELETED"
}
]
}
]
}
We are assuming that if we set it to deleted then of course no monthly invoices will be sent at all with immediate effect, rather than running until the specified EndDate.
Has anyone seen this before and any suggestions on how to resolve it?