Download PDF from Hosted API

Hello!

I am integrating my own application with InvoiceNinja - the hosted version. I would like to be able to retrieve a link to a .pdf file that I can consume with my application for a given invoice, but I seem unable to succeed at this. I followed the instructions at https://www.invoiceninja.com/api-documentation/ and was able to retrieve information for a given invoice at https://app.invoiceninja.com/api/v1/invoices/. When I however make calls to /api/v1/download/ I get a

{
“error”: {
“message”: “Route does not exist”
}
}

I have also tried /api/v1/download/, supplying the token that came with the call to retrieve invoice information, but this returns a 500 Internal Server Error. However, with this latter call I do see a “Content-disposition” header that contains the filename I was expecting. I have been trying for a good while and have exhausted the options that make sense to me. Any help or advice on this is greatly appreciated. I would consider using the self-hosted version if that fixes my issue.

Thank you so much!

Hi,

Did you add the invoice_id at the end. ie, /api/v1/download/1