Top

Attachment

Get an invoice attachment
GET /invoices/:invoice_id/attachment
Returns the file attached to the invoice.
Add attachment to an invoice
POST /invoices/:invoice_id/attachment
Attach a file to an invoice.
Update attachment preference
PUT /invoices/:invoice_id/attachment
Set whether you want to send the attached file while emailing the invoice.
Delete an attachment
DELETE /invoices/:invoice_id/attachment
Delete the file attached to the invoice.
Delete the expense receipt
DELETE /invoices/expenses/:expense_id/receipt
Delete the expense receipts attached to an invoice which is raised from an expense.

Get an invoice attachment

GET  /invoices/:invoice_id/attachment

Returns the file attached to the invoice.

Parameters

preview boolean Get the thumbnail of the attachment.

Add attachment to an invoice

POST  /invoices/:invoice_id/attachment

Attach a file to an invoice.

Parameters

can_send_in_mail boolean True to send the attachment with the invoice when emailed.

multipart/form-data

attachment file The file to be attached.
Allowed Extensions: gif, png, jpeg, jpg, bmp and pdf

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Your file has been successfully attached to the invoice."
}

Update attachment preference

PUT  /invoices/:invoice_id/attachment

Set whether you want to send the attached file while emailing the invoice.

Parameters

can_send_in_mail* boolean Boolean to send the attachment with the invoice when emailed.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Invoice information has been updated."
}

Delete an attachment

DELETE  /invoices/:invoice_id/attachment

Delete the file attached to the invoice.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Your file is no longer attached to the invoice."
}

Delete the expense receipt

DELETE  /invoices/expenses/:expense_id/receipt

Delete the expense receipts attached to an invoice which is raised from an expense.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The attached expense receipt has been deleted."
}