Xero API not returning some invoices when searching by Invoice Number

33 Views Asked by At

I am using the Xero API to create or update invoices in Xero. The first step is to search the api using the invoice number to see if it exists. If found we update it and send it back as an update, otherwise we create a new invoice and send it using a put request to create the invoice. However in some cases it wont find the invoice searching by the invoice number, but when we send the put request to create we get the following error "Invoice # must be unique.". Which is weird as it doesnt show in the api. This all works fine most of the time, but theres a small handful of cases this happens. Anyone know why its not showing the invoice in the api but not letting us create due to the invoice number existing in the system?

Tried: Did a GET request to invoices using Invoice Number but invoice did not return. Expected: Would expect invoice with matching Invoice Number to be returned from the api

0

There are 0 best solutions below