Invoiced supports attaching files to invoices in order to give customers more context about a bill.
Files can be attached to invoices through the dashboard or programmatically through the API. In this guide we are going to walk you through the complete steps to attach a file to an invoice through the API.
We don't support uploads through the API at the moment (but the dashboard does). This means that you must host the file somewhere publicly accessible. Once that's done you are ready to send us the URL along with some basic file metadata.
Next we are going to tell Invoiced about your file.
Once you have created your file you can now attach it to an invoice. This is done by passing in an array of file IDs through the attachments parameter when creating or editing an invoice.
In this example we are going to show how to attach a single file when creating a new invoice:
And the file is now attached! It will be available in the client view and dashboard as a downloadable attachment.
You can also retrieve the existing file attachments for an invoice with a simple API query. This might be useful to synchronize the attachments for an invoice with your internal systems.