InvoiceComment

The InvoiceComment object represents a comment added to an invoice. Comments are reusable pieces of text that are printed on invoices and typically include important or noteworthy information for store staff or the customer. Examples would be a store’s return policy for special orders or notes on extended warranty.

Add a Comment to an Invoice


POST /invoicing/invoice/comment/add


This endpoint adds a pre-defined comment to an existing invoice. A comment can’t be added to EPASS without an invoice to add it to.

Payload

Required Fields

The following fields are the absolute minimum fields that should be required to add a comment to an invoice.

Field Type Description
InvoiceCode string Must be a valid Invoice Code.
CommentCode string Must be a valid Comment Code.
UserCreated string Must be a valid User Code that is not Obsolete. If not provided it will use the Login User.

CommentCode

If a valid CommentCode is provided then the following values will be defaulted from the Comment. You can override any of the values that would come from the Comment simply by providing your own value.

Key Value
CommentDesc Comment -> Description
UpdateHistory Comment -> History

Sample: Adding a Comment to an Invoice

 POST /invoicing/invoice/comment/add 
{
    "tripNo": null,
    "commentCode": "No Refunds.",
    "commentDesc": null,
    "inPackage": null,
    "invoiceCode": "11234",
    "updateHistory": null
}
 {
    "success": true,
    "warning": false,
    "httpStatusCode": 201,
    "generalMessage": null,
    "exceptionMessage": null,
    "keys": [
        {
            "table": "InvoiceComment",
            "keys": [
                {
                    "key": "ID",
                    "fields": [
                        {
                            "fieldName": "ID",
                            "fieldValue": 1234567
                        }
                    ]
                }
            ]
        },
        {
            "table": "InvoiceAddress",
            "keys": [
                {
                    "key": "ID",
                    "fields": [
                        {
                            "fieldName": "ID",
                            "fieldValue": 1234567
                        }
                    ]
                }
            ]
        }
    ],
    "messages": [],
    "warnings": []
}
 {
    "success": false,
    "message": "One or more of the fields has an invalid or missing value.",
    "lastException": null,
    "recordId": 0,
    "code": null,
    "httpStatusCode": 422,
    "messageDetails": [
        "CommentCode does not exist."
    ]
}