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": "982000000567208",
      "invoice_id": "982000000567036",
      "description": "Payment of $16.34 recorded",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:38 AM",
      "transaction_id": "982000000567204",
      "transaction_type": "invoice_payment"
    },
    {
      "comment_id": "982000000567196",
      "invoice_id": "982000000567036",
      "description": "Payment of $10.57 recorded",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:38 AM",
      "transaction_id": "982000000567192",
      "transaction_type": "invoice_payment"
    },
    {
      "comment_id": "982000000567180",
      "invoice_id": "982000000567036",
      "description": "Credit of $12.20 applied from CN-00001",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:37 AM",
      "transaction_id": "982000000567172",
      "transaction_type": "creditnote_invoice"
    },
    {
      "comment_id": "982000000567182",
      "invoice_id": "982000000567036",
      "description": "Credit of $10.23 applied from CN-00002",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:37 AM",
      "transaction_id": "982000000567174",
      "transaction_type": "creditnote_invoice"
    },
    {
      "comment_id": "982000000567168",
      "invoice_id": "982000000567036",
      "description": "Invoice marked as sent",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Updated",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:35 AM",
      "transaction_id": "",
      "transaction_type": "invoice"
    },
    {
      "comment_id": "982000000567040",
      "invoice_id": "982000000567036",
      "description": "Invoice created",
      "commented_by_id": "982000000554041",
      "commented_by": "John David",
      "comment_type": "system",
      "operation_type": "Added",
      "date": "2013-11-18",
      "date_description": "yesterday",
      "time": "2:13 AM",
      "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.

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.

Sample Request

{
  "description": "Payment of $16.34 recorded",
  "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": "982000000567208",
    "invoice_id": "982000000567036",
    "description": "Payment of $16.34 recorded",
    "commented_by_id": "982000000554041",
    "commented_by": "John David",
    "date": "2013-11-18",
    "date_description": "yesterday",
    "time": "2:38 AM",
    "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."
}