Top

Comments & History

List credit note comments & history
GET /creditnotes/:creditnote_id/comments
Get history and comments of a credit note.
Add a comment
POST /creditnotes/:creditnote_id/comments
Add a comment to an existing credit note.
Delete a comment
DELETE /creditnotes/:creditnote_id/comments/:comment_id
Delete a credit note comment.

List credit note comments & history

GET  /creditnotes/:creditnote_id/comments

Get history and comments of a credit note.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "comments": [
    {
      "comment_id": "460000000050187",
      "creditnote_id": "460000000052003",
      "description": "Credits applied to invoice INV-00004",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:48 PM",
      "operation_type": "Added",
      "transaction_id": "460000000050185",
      "transaction_type": "creditnote_invoice"
    },
    {
      "comment_id": "460000000052007",
      "creditnote_id": "460000000052003",
      "description": "Creditnotes created",
      "commented_by_id": "460000000024003",
      "commented_by": "John David",
      "comment_type": "system",
      "date": "2013-10-03",
      "date_description": "13 days ago",
      "time": "4:47 PM",
      "operation_type": "Added",
      "transaction_id": "",
      "transaction_type": "credit_notes"
    }
  ]
}

Add a comment

POST  /creditnotes/:creditnote_id/comments

Add a comment to an existing credit note.

Request attributes

description string
[2000]
Description for the refund recorded.

Sample Request

{
  "description": "Credits applied to invoice INV-00004"
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Comments added.",
  "comment": {
    "comment_id": "460000000050187",
    "creditnote_id": "460000000052003",
    "description": "Credits applied to invoice INV-00004",
    "commented_by_id": "460000000024003",
    "commented_by": "John David",
    "date": "2013-10-03"
  }
}

Delete a comment

DELETE  /creditnotes/:creditnote_id/comments/:comment_id

Delete a credit note comment.

Sample Response

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