File Attachments

Invoiced supports attaching files to invoices in order to give customers more context about a bill.

Usage

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.

Prerequisites

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.

Create a file

Next we are going to tell Invoiced about your file.

Curl
Java
PHP
Python
Ruby

Attach to an invoice

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:

Curl
Java
PHP
Python
Ruby

And the file is now attached! It will be available in the client view and dashboard as a downloadable attachment.

Retrieving attachments for an invoice

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.

Get a cake by its ID
GET
Code examples
Params
Curl
Java
PHP
Python
Ruby
200