Invoices
CreateInvoiceAttachment
Uploads a file and attaches it to an invoice. This endpoint accepts HTTP multipart/form-data file uploads with a JSON request part and a file part. The file part must be a readable stream that contains a file in a supported format: GIF, JPEG, PNG, TIFF, BMP, or PDF.
Invoices can have up to 10 attachments with a total file size of 25 MB. Attachments can be added only to invoices in the DRAFT, SCHEDULED, UNPAID, or PARTIALLY_PAID state.
NOTE: When testing in the Sandbox environment, the total file size is limited to 1 KB.
post/v2/invoices/{invoice_id}/attachments
Path parameters
invoice_idstring required
The ID of the invoice to attach the file to.
Response
Success
Example response
{
"attachment": {
"description": "Service contract",
"filename": "file.jpg",
"filesize": 102705,
"hash": "273ee02cb6f5f8a3a8ca23604930dd53",
"id": "inva:0-3bB9ZuDHiziThQhuC4fwWt",
"mime_type": "image/jpeg",
"uploaded_at": "2023-02-03T20:28:14Z"
}
}