Attachments and documents
BILL enables you to upload you can upload supporting attachments for vendors, customers, and invoices. In addition, you can upload documents for bills.
See Invoice PDF email attachments to learn about adding and replacing invoice PDF attachments.
All attachments API operations are similarThe vendor attachment, customer attachment and invoice attachmen API operations are similar. In this section, the vendor attachment example is explained. See the /v3/attachments API for more information.
Upload a vendor attachment
In your POST /v3/attachments/vendors/{vendorId} request, set the required fields.
| Field | Description |
|---|---|
vendorId | BILL-generated ID of the vendor. The value begins with 009. |
name | File name with extension. For example, to upload a PDF attachment titled business_details, set name as business_details.pdf. |
file | Attachment file. The file size limit is 6 MB. See Supported file formats in the BILL Help Center for more information. |
Sample request
In this cURL example, an attachment file is uploaded for a vendor.
curl --request POST \
--url '{baseUrl}/connect/v3/attachments/vendors/{vendorId}?name={file_name}' \
--header 'devKey: {developer_key}' \
--header 'sessionId: {session_id}' \
--header 'accept: application/json' \
--header 'content-type: */*' \
--data-binary '@{filepath}'Response
In the response, an attachment id is available. The value begins with att. In addition, downloadLink is the generated URL for downloading the attachment. Use the URL in a GET request to download the attachment.
{
"id":"{attachment_id}",
"name":"{file_name}",
"createdTime":"2026-12-16T23:19:20.000+00:00",
"downloadLink":"{baseUrl}/AttachDownload?id={attachment_id}"
}
BILL takes a few minutes to complete the upload processWhen you upload an attachment, it takes a few minutes for BILL to complete the upload process and to generate a preview of the attachment. The download process will be successful only after the upload process is complete.
Download an attachment
In this cURL example, an attachment is downloaded. In the request, downloadLink is set from the upload attachment response.
curl '{downloadLink}' \
--header 'sessionId={session_id}' \
--output {attachment_name}See the /v3/attachments API for more information.
Upload a bill document
In your POST /v3/documents/bills/{billId} request, set the required fields.
| Field | Description |
|---|---|
billId | BILL-generated ID of the bill. The value begins with 00n. |
name | File name with extension. For example, to upload a PDF attachment titled business_details, set name as business_details.pdf. |
file | Document file. The file size limit is 6 MB. See Supported file formats in the BILL Help Center for more information. |
Sample request
In this cURL example, an document file is uploaded for a bill.
curl --request POST \
--url '{baseUrl}/connect/v3/documents/bills/{billId}?name={file_name}' \
--header 'devKey: {developer_key}' \
--header 'sessionId: {session_id}' \
--header 'accept: application/json' \
--header 'content-type: */*' \
--data-binary '@{filepath}'Response
In the response, a document uploadId is available. The value begins with 0du. This is a temporary BILL-generated ID for the document when the upload is in progress.
When the upload is complete, a new BILL-generated ID is available for the document. The value begins with 00h. You can get the document upload status with GET /v3/documents/upload-status.
{
"uploadId":"{document_upload_id}"
}See the /v3/documents API for more information.
Updated 3 days ago
