Top

attachment

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

Get a sales order attachment

GET  /salesorders/:salesorder_id/attachment

Returns the file attached to the sales order.

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 sales order

POST  /salesorders/:salesorder_id/attachment

Attach a file to a sales order

Parameters

can_send_in_mail boolean Param Description.

Sample Response

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

Update attachment preference

PUT  /salesorders/:salesorder_id/attachment

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

Parameters

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

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Sales Order Updated Successfully."
    }

Delete an attachment

DELETE  /salesorders/:salesorder_id/attachment

Delete the file attached to the sales order.

Sample Response

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