v1

latestOpenAPI 3.0.12026-07-24310590875.6 KB
attachments

Upload invoice attachment

Upload an attachment for an existing invoice. The file size limit is 6 MB.

Note: When you upload an attachment, it takes a few minutes for BILL to complete the upload process.

See Documents and attachments in the Guides section for more information, sample requests, and responses.

post/v3/attachments/invoices/{invoiceId}

Path parameters

invoiceIdstring required

BILL-generated ID of the invoice. The value begins with 00e.

Example:{{invoice_id}}

Query parameters

namestring required

File name with extension. For example, to upload a PDF attachment titled business_details, set name as business_details.pdf.

Example:business_details.pdf
replaceInvoicePdfboolean nullable

Set as true to replace the existing invoice PDF with a new PDF attachment. The default value is false.

The invoice PDF is sent as an email attachment when you send an invoice to a customer. The invoice PDF also appears when the customer clicks the invoice payment link to complete the invoice payment. See Get invoice payment link to learn more about invoice payment links.

Note: You can get the list of invoice attachments with GET /v3/attachments/invoices/{invoiceId}. All the attachments in the list (including the invoice PDF) are sent as email attachments when you send the invoice to the customer.

Headers

sessionIdstring nullable

API session ID generated with /v3/login

Example:{{session_id}}
devKeystring nullable

Developer key generated with your BILL developer account

Example:{{developer_key}}

Response

Upload invoice attachment response

idstring

BILL-generated ID of the attachment. The value begins with att.

namestring

Attachment name

createdTimestring date-time

Created date and time

downloadLinkstring

URL for downloading the attachment. Use the URL in a GET request to download the attachment.