Top

Comments & History

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

List invoice comments & history

GET  /invoices/:invoice_id/comments

Get the complete history and comments of an invoice.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "comment_id": "460000000052057",
      "invoice_id": "460000000045021",
      "description": "Attachment added",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:55 PM",
      "transaction_id": "",
      "transaction_type": "invoice"
    },
    {
      "comment_id": "460000000052025",
      "invoice_id": "460000000045021",
      "description": "Invoice updated",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Updated",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:49 PM",
      "transaction_id": "",
      "transaction_type": "invoice"
    },
    {
      "comment_id": "460000000050189",
      "invoice_id": "460000000045021",
      "description": "Credit of $12.00 applied from CN-00003",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:48 PM",
      "transaction_id": "460000000050185",
      "transaction_type": "creditnote_invoice"
    },
    {
      "comment_id": "460000000050169",
      "invoice_id": "460000000045021",
      "description": "Payment of $25.00 recorded",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:46 PM",
      "transaction_id": "460000000050165",
      "transaction_type": "invoice_payment"
    },
    {
      "comment_id": "460000000050147",
      "invoice_id": "460000000045021",
      "description": "Payment of $225.00 recorded",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:46 PM",
      "transaction_id": "460000000050143",
      "transaction_type": "invoice_payment"
    },
    {
      "comment_id": "460000000050131",
      "invoice_id": "460000000045021",
      "description": "Invoice marked as sent",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Updated",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:46 PM",
      "transaction_id": "",
      "transaction_type": "invoice"
    },
    {
      "comment_id": "460000000045025",
      "invoice_id": "460000000045021",
      "description": "Invoice created",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-09-19",
      "date_description": "27 days ago",
      "time": "4:04 PM",
      "transaction_id": "",
      "transaction_type": "invoice"
    }
  ]
}

Add comment

POST  /invoices/:invoice_id/comments

Add a comment for an invoice.

Request attributes

payment_expected_date string
[yyyy-MM-dd]
Date the payment is expected for the invoice.
show_comment_to_clients boolean Boolean to show the comments to contacts in portal.

Sample Request

{
      "description": "Attachment added",
      "payment_expected_date": "",
      "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  /invoices/:invoice_id/comments/:comment_id

Update an existing comment of an invoice.

Request attributes

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

Sample Request

{
  "description": "Attachment added",
  "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": "460000000052057",
    "invoice_id": "460000000045021",
    "description": "Attachment added",
    "commented_by_id": "460000000024003",
    "commented_by": "John David",
    "date": "2013-10-03",
    "date_description": "13 days ago",
    "time": "4:55 PM",
    "comment_type": "system"
  }
}

Delete a comment

DELETE  /invoices/:invoice_id/comments/:comment_id

Delete an invoice comment.

Sample Response

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