Top

Attachment

Get a bill attachment
GET /bills/:bill_id/attachment
Returns the file attached to the bill.
Add attachment to a bill
POST /bills/:bill_id/attachment
Attach a file to a bill.
Delete an attachment
DELETE /bills/:bill_id/attachment
Delete the file attached to a bill.

Get a bill attachment

GET  /bills/:bill_id/attachment

Returns the file attached to the bill.

Parameters

preview boolean Get the thumbnail of the attachment.

Sample Response

Status: 400 Bad Request
Content Type: application/json;charset=UTF-8
{
  "code": 33003,
  "message": "Attachment not found."
}

Add attachment to a bill

POST  /bills/:bill_id/attachment

Attach a file to a bill.

multipart/form-data

attachment file File to attach.
Allowed Extensions: gif, png, jpeg, jpg, bmp, pdf, xls, xlsx, doc and docx

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The document has been attached."
}

Delete an attachment

DELETE  /bills/:bill_id/attachment

Delete the file attached to a bill.

Sample Response

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