Top

Comments & History

List vendor credit comments & history
GET /vendorcredits/:vendor_credit_id/comments
Get history and comments of a vendor credit.
Add a comment
POST /vendorcredits/:vendor_credit_id/comments
Add a comment to an existing vendor credit.
Delete a comment
DELETE /vendorcredits/:vendor_credit_id/comments/:comment_id
Delete a vendor credit comment.

List vendor credit comments & history

GET  /vendorcredits/:vendor_credit_id/comments

Get history and comments of a vendor credit.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "success",
      "comments": [
        {
          "comment_id": "3000000003157",
          "vendor_credit_id": "3000000002045",
          "description": "Vendor credits refunded for $13.00.",
          "commented_by_id": "3000000000741",
          "commented_by": "rajdeep.a",
          "comment_type": "system",
          "date": "2014-08-29",
          "date_description": "9 minutes ago",
          "time": "12:18 AM",
          "operation_type": "Added",
          "transaction_id": "3000000003151",
          "transaction_type": "vendor_credit_refund"
        },
        {
          "comment_id": "3000000002063",
          "vendor_credit_id": "3000000002045",
          "description": "Vendor credits created for $100.00",
          "commented_by_id": "3000000000741",
          "commented_by": "rajdeep.a",
          "comment_type": "system",
          "date": "2014-08-28",
          "date_description": "about an hour ago",
          "time": "10:51 PM",
          "operation_type": "Added",
          "transaction_id": "",
          "transaction_type": "vendor_credit"
        }
      ]
    }

Add a comment

POST  /vendorcredits/:vendor_credit_id/comments

Add a comment to an existing vendor credit.

Request attributes

description string
[2000]
Description for the refund recorded.

Sample Request

{
      "description": "Credits applied to Bill 1"
    }

Sample Response

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

Delete a comment

DELETE  /vendorcredits/:vendor_credit_id/comments/:comment_id

Delete a vendor credit comment.

Sample Response

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