Top

Attachment

Get a purchase order attachment
GET /purchaseorders/:purchaseorder_id/attachment
Returns the file attached to the purchase order.
Add attachment to a purchase order
POST /purchaseorders/:purchaseorder_id/attachment
Attach a file to a purchase order
Update attachment preference
PUT /purchaseorders/:purchaseorder_id/attachment
Set whether you want to send the attached file while emailing the purchase order.
Delete an attachment
DELETE /purchaseorders/:purchaseorder_id/attachment
Delete the file attached to the purchase order.

Get a purchase order attachment

GET  /purchaseorders/:purchaseorder_id/attachment

Returns the file attached to the purchase order.

Parameters

preview boolean Get the thumbnail of the attachment.

Add attachment to a purchase order

POST  /purchaseorders/:purchaseorder_id/attachment

Attach a file to a purchase order

Parameters

attachment file 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."
    }

Update attachment preference

PUT  /purchaseorders/:purchaseorder_id/attachment

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

Parameters

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

Sample Response

Status: 200 OK
Content Type: image/png;charset=UTF-8
{
      "code": 0,
      "message": "Purchase Order updated successfully."
    }

Delete an attachment

DELETE  /purchaseorders/:purchaseorder_id/attachment

Delete the file attached to the purchase order.

Sample Response

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