Top

Comments & History

List bill comments & history
GET /bills/:bill_id/comments
Get the complete history and comments of a bill.
Add comment
POST /bills/:bill_id/comments
Add a comment for a bill.
Delete a comment
DELETE /bills/:bill_id/comments/:comment_id
Delete a bill comment.

List bill comments & history

GET  /bills/:bill_id/comments

Get the complete history and comments of a bill.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "comment_id": "460000000042065",
      "bill_id": "460000000042035",
      "description": "Payment of €31,25 made.",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "date": "2013-09-11",
      "date_description": "35 days ago",
      "time": "4:48 PM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": ""
    },
    {
      "comment_id": "460000000042039",
      "bill_id": "460000000042035",
      "description": "Bill created for €31,25.",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "date": "2013-09-11",
      "date_description": "35 days ago",
      "time": "4:47 PM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": ""
    }
  ]
}

Add comment

POST  /bills/:bill_id/comments

Add a comment for a bill.

Sample Request

{
  "description": "Payment of €31,25 made"
}

Sample Response

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

Delete a comment

DELETE  /bills/:bill_id/comments/:comment_id

Delete a bill comment.

Sample Response

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