Top

comments

List sales order comments & history
GET /salesorders/:salesorder_id/comments
Get the complete history and comments of sales order.
Add comment
POST /salesorders/:salesorder_id/comments
Add a comment for a sales order.
Update comment
PUT /salesorders/:salesorder_id/comments/:comment_id
Update existing comment of a sales order.
Delete a comment
DELETE /salesorders/:salesorder_id/comments/:comment_id
Delete a sales order comment.

List sales order comments & history

GET  /salesorders/:salesorder_id/comments

Get the complete history and comments of sales order.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000048023",
      "description": "Need to deliver this month",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "internal",
      "date": "2014-08-25",
      "date_description": "6 minutes ago",
      "time": "2:12 PM",
      "operation_type": "",
      "transaction_id": "",
      "transaction_type": ""
    },
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000048019",
      "description": "Sales Order updated",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "system",
      "date": "2014-08-25",
      "date_description": "about an hour ago",
      "time": "12:47 PM",
      "operation_type": "Updated",
      "transaction_id": "",
      "transaction_type": "salesorder"
    },
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000048013",
      "description": "Sales Order updated",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "system",
      "date": "2014-08-25",
      "date_description": "about an hour ago",
      "time": "12:35 PM",
      "operation_type": "Updated",
      "transaction_id": "",
      "transaction_type": "salesorder"
    },
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000048005",
      "description": "Sales Order updated",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "system",
      "date": "2014-08-25",
      "date_description": "2 hours ago",
      "time": "11:23 AM",
      "operation_type": "Updated",
      "transaction_id": "",
      "transaction_type": "salesorder"
    },
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000039147",
      "description": "Sales order converted to invoice INV-000004",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "system",
      "date": "2014-07-28",
      "date_description": "28 days ago",
      "time": "8:29 AM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": "invoice"
    },
    {
      "salesorder_id": "460000000039129",
      "comment_id": "460000000039137",
      "description": "Sales Order created for $12,400.00",
      "commented_by_id": "460000000017003",
      "commented_by": "John",
      "comment_type": "system",
      "date": "2014-07-28",
      "date_description": "28 days ago",
      "time": "8:29 AM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": "salesorder"
    }
  ]
}

Add comment

POST  /salesorders/:salesorder_id/comments

Add a comment for a sales order.

Sample Request

{
      "description": "Need to deliver this month"
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Comments added."
}

Update comment

PUT  /salesorders/:salesorder_id/comments/:comment_id

Update existing comment of a sales order.

Sample Request

{
      "description": "Need to deliver this month"
    }

Sample Response

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

Delete a comment

DELETE  /salesorders/:salesorder_id/comments/:comment_id

Delete a sales order comment.

Sample Response

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