Top

Comments & History

List estimate comments & history
GET /estimates/:estimate_id/comments
Get the complete history and comments of an estimate.
Add comment
POST /estimates/:estimate_id/comments
Add a comment for an estimate.
Update comment
PUT /estimates/:estimate_id/comments/:comment_id
Update an existing comment of an estimate.
Delete a comment
DELETE /estimates/:estimate_id/comments/:comment_id
Delete an estimate comment.

List estimate comments & history

GET  /estimates/:estimate_id/comments

Get the complete history and comments of an estimate.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "comment_id": "982000000567019",
      "estimate_id": "982000000567011",
      "description": "Estimate created",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:02 AM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": "estimate"
    }
  ]
}

Add comment

POST  /estimates/:estimate_id/comments

Add a comment for an estimate.

Request attributes

show_comment_to_clients boolean Boolean to show the comments to contacts in portal.

Sample Request

{
      "description": "Estimate marked as sent",
      "show_comment_to_clients": true
    }

Sample Response

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

Update comment

PUT  /estimates/:estimate_id/comments/:comment_id

Update an existing comment of an estimate.

Request attributes

show_comment_to_clients boolean Boolean to show the comments to contacts in portal.

Sample Request

{
  "description": "Estimate created",
  "show_comment_to_clients": ""
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Comment has been updated successfully.",
  "comment": {
    "comment_id": "982000000567019",
    "estimate_id": "982000000567011",
    "description": "Estimate created",
    "commented_by_id": "982000000554041",
    "commented_by": "John David",
    "date": "2013-11-18",
    "date_description": "yesterday",
    "time": "2:02 AM",
    "comment_type": "system"
  }
}

Delete a comment

DELETE  /estimates/:estimate_id/comments/:comment_id

Delete an estimate comment.

Sample Response

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