0

We are creating a Salesforce API and only want to import Xero Invoices that relate to certain account codes. We don't want every Xero contact and Xero invoice in the system.

At present, we call a page of invoices and then loop over the line items in each invoice them and only insert the Invoices that contain the accound codes we are looking for.

This is not an efficient process. So I wanted to check with the XeroAPI gurus are there are any filters I can apply to the GET call?

1 Answers1

1

Sorry but there's no way to filter invoices on any of the line item level attributes (account, tracking, item etc). You'll have to continue looping through them all.

If you're not doing so already, I'd advise using the if-modified-since header so you're only looping through what's changed since your previous call but you still need to do it for all invoices.

Adam Moore
  • 371
  • 1
  • 5