Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Bulk download of attachments

Started by Jason Raikes -   in API Endpoints

I am attempting to use the scanned images of purchase invoices in my app.

The url supplied for the attachment relates to AutoEntry and requires the user to login. How do I avoid this please?

I have also tried to download copies of the attachments but I run into issues re exceeding the number of api calls within a time period. Here is an extract of the code:

Invoices invoices = accountingApi.getInvoices(null, "", "Date, InvoiceNumber", null, null, null, null, page, true, null);
while (invoices.getInvoices().size()>0)
for (int x=0; x<invoices.getInvoices().size();x++)
inv= invoices.getInvoices().get(x);

if (inv.getHasAttachments()==true)
List<Attachment> atts = client.getAttachments("Invoices", inv.getInvoiceID().toString());