POST Comment Txn
The transaction comment operation will add a comment against the transaction specified in the query.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/txn/comment
Request body
The POST request must contain a JSON structure describing the txn comment. To support multiple parameters, this API uses HTTP Content Type: application/json.
The available query attributes are listed below. All attributes are optional except where otherwise indicated.
caution
If you specify an invalid request attribute, a 400 Bad Request HTTP status code is returned.
| Attribute | Description | 
|---|---|
params | MapRequired. A map containing the comment attributes.  | 
Supported comment attributes
The supported comment attributes are listed below.
caution
If you specify an invalid cancel attribute, a 400 Bad Request HTTP status code is returned.
| Attribute | Description | 
|---|---|
header | StringThe header/title of the comment.  | 
message | StringRequired. The message/body of the comment. message cannot be empty. | 
submitKey | StringRequired. The submit key property of the transaction to add a comment to.  | 
parent | StringRequired (if this comment is a reply to another comment). The parent comment oid. | 
Response
If successful (that is, the comment was successfully added and no errors occurred during the execution of the API), this operation returns a response with a HTTP 200 OK status code.
Error messages
| Error key | Error | HTTP status code | 
|---|---|---|
accessDenied | The user does not have access to transaction specified by the submitKey | 400 Bad Request | 
internalError | Please see Error Log ID {number} | 500 Internal Server Error | 
messageNotSpecified | The comment message is not specified. | 400 Bad Request | 
parentNotExist | The parent comment specified does not exist. | 400 Bad Request | 
submitKeyNotSpecified | submitKey not specified | 400 Bad Request | 
txnNotFound | The transaction specified by the submitKey was not found | 400 Bad Request | 
unableToResolvePortal | Unable to resolve portal from request | 400 Bad Request | 
Error responses
| HTTP status code | Description | 
|---|---|
400 Bad Request | Bad request or request parameter. Check error message for details. | 
404 Not Found | Ensure the URL endpoint is entered correctly. | 
500 Internal Server Error | Exception occurred in txn comment. Contact administrator. | 
Example
Ensure you specify Content-Type: application/json.
POST /workspaces/secure/api/v1/txn/comment HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
    "params": {
        "header": "Adding comments to transactions",
        "message": "this is an example to a comment",
        "submitKey": "15d071280b92c867f86975b9cd2e8765",
        "parent": "1"
    }
}