All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

Comments Management

The Corastone platform currently supports associating comments with specific assets. Comments can provide information to each of the parties involved in the life cycle of the asset. Comments can also remain internal to the commenting organization.

Endpoints

Add Comment

Getters

Get Comment Details

Get Comment History

AM/FA/Inv - Get Comment Details

Details

/external/v1/comment

Synopsis

AM/FA/Inv - Add Comment

Details

/external/v1/comment

Synopsis

AM/FA/Inv - Get Comment History

Details

/external/v1/comment/history

Synopsis

Get Comment Details

get

This route is used to retrieve the details of an comment, given a set of search filters.

This endpoint can be called by applications with access to scope "readComments".

Authorizations
Query parameters
pageSizenumberOptional

The number of rows being retrieved. Must be a positive integer.

offsetnumberOptional

The offset (i.e. row start index). Must be a positive integer (or 0).

assetIdsFilterstringOptional

The comma delimited list of asset ids to filter the comment records. Up to 50 records can be provided. Each record should not exceed 12 characters.

Example: USCCWSF01I00,USCCWSF01I01
assetCorrelationIdsFilterstringOptional

The comma delimited list of asset correlation ids to filter the comment records. Up to 50 records can be provided. Each record should not exceed 100 characters.

Example: 1234,5678,7890
assetCorrelationOrgIdstring · max: 12Optional

The organization identifier linked to the correlation ids provided in the "assetCorrelationIdsFilter" property. If not provided the organization id will be inferred from the access token.

commentIdsFilterstringOptional

The comma delimited list of comment ids to filter the comment records. Up to 250 records can be provided. Each record should not exceed 16 characters.

Example: USCCWSF01I00,USCCWSF01I01
Responses
200
Successfully retrieved the Comment details
application/json
400
The following error codes can be returned: - GN0002 - GN0004 - GN0005 Please refer to the error code dictionary for the details of each error code.
application/json
401
The following error codes can be returned: - AU0001 Please refer to the error code dictionary for the details of each error code.
application/json
403
The following error codes can be returned: - AU0002 Please refer to the error code dictionary for the details of each error code.
application/json
get
GET /external/v1/comment HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "extraData": {
    "externalId": "123456789",
    "some": "Custom Property"
  },
  "commentId": "US9QICOMMENT1",
  "message": "This is a comment",
  "status": "broadcast",
  "viewOrgs": [
    "US9QIORG1",
    "US9QIORG2"
  ],
  "fileIds": [
    "US9QIFILE1",
    "US9QIFILE2"
  ],
  "organization": {
    "orgId": "TEST1234",
    "name": "Test Organization"
  },
  "associatedEntities": {
    "assetIds": [
      "US9QIASSET1",
      "US9QIASSET2"
    ]
  }
}

Add Comment

post

This route is used to add a comment associated to entities. This action can be broadcast to all the counterparties that have access to these entities.

This will trigger an asynchronous process which can be monitored using the "Transactions API" endpoints.

This endpoint can be called by applications with access to scope "manageComments".

Authorizations
Body
transactionDataall ofRequired

This property contains the transactional data information

Example: {"signer":{"email":"[email protected]","name":"John Doe"},"extraData":{"someCustom":"property to be shared"}}
broadcastToCounterpartybooleanOptional

This property defines if the comment information will be sent to all counterparties.

Default: falseExample: true
counterpartiesstring[]Optional

This property contains the counterparties that will receive the comment information. It is optional.

If not provided it will be sent to all counterparties that are entitled to the entity this comment is related to.

Example: ["ORG1","ORG2"]
bookedCommentIdstring · max: 16Optional

This is the booked unique identifier of the comment. It is optional.

Example: USS3JKS01I00SW24
messagestring · max: 3000Optional

This property contains the comment message. It is optional. Should be provided if no documents are attached.

Example: an example comment message
associatedEntitiesall ofRequired

The list of entities to associate to the comment

Example: {"assetIds":["US9QIASSET1","US9QIASSET2"]}
Responses
201
Successfully added (or, if the action is being broadcast, triggered the addition of) the comment.
application/json
400
The following error codes can be returned: - GN0002 - CM0001 - CM0004 - CM0007 - CM0008 - CM0009 Please refer to the error code dictionary for the details of each error code.
application/json
401
The following error codes can be returned: - AU0001 Please refer to the error code dictionary for the details of each error code.
application/json
403
The following error codes can be returned: - AU0002 Please refer to the error code dictionary for the details of each error code.
application/json
404
The following error codes can be returned: - IS0009 - AS0001 - CM0002 - CM0006 Please refer to the error code dictionary for the details of each error code.
application/json
409
The following error codes can be returned: Please refer to the error code dictionary for the details of each error code.
application/json
post
POST /external/v1/comment HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 710

{
  "transactionData": {
    "signer": {
      "email": "[email protected]",
      "name": "John Doe"
    },
    "extraData": {
      "someCustom": "property to be shared"
    }
  },
  "broadcastToCounterparty": true,
  "counterparties": [
    "ORG1",
    "ORG2"
  ],
  "bookedCommentId": "USS3JKS01I00SW24",
  "message": "an example comment message",
  "associatedEntities": {
    "assetIds": [
      "US9QIASSET1",
      "US9QIASSET2"
    ]
  },
  "documents": [
    {
      "uploadData": {
        "type": "IdentityVerification",
        "extension": "pdf",
        "name": "John Doe ID",
        "link": "https://test-storage.s3.amazonaws.com/some-id.pdf",
        "correlationData": [
          {
            "broadcastToCounterparty": true,
            "correlationId": "123245573717",
            "origin": "Identifies file on backoffice",
            "extraData": {
              "some": "Custom Property"
            }
          }
        ]
      },
      "extraData": {
        "someCustom": "property to be shared"
      }
    }
  ]
}
{
  "processData": {
    "processId": "2159457f-0167-4e93-a969-9cf0db05e0bf",
    "orchestrationId": "2159457f-0167-4e93-a969-9cf0db05e0bf"
  }
}

Get Comment History

get

This route is used to retrieve the history data entries of comments given a set of filters such as blockchain details or comment identifiers.

The history entries will reflect the state of the comments on a particular block on the ledger.

This endpoint returns paginated data. Up to 250 can be extracted per call.

This endpoint can be called by applications with access to scope "readComments".

Authorizations
Query parameters
pageSizenumberOptional

The number of rows being retrieved. Must be a positive integer.

offsetnumberOptional

The offset (i.e. row start index). Must be a positive integer (or 0).

blockNumbernumber · max: 2147483647Optional

The block number where the action was recorded on the ledger.

Example: 350
transactionIdstring · max: 500Optional

The transaction id where the action was recorded on the ledger.

Example: 456789OIJHGFCVGHJKLKJHGF67JHPattern: ^[a-zA-Z0-9-]*$
channelNamestring · max: 20Optional

The name of the channel where the action was recorded on the ledger.

Example: OG123Pattern: ^[a-zA-Z0-9-]*$
commentIdsFilterstringOptional

The comma delimited list of comment ids to filter the comment records. Up to 250 records can be provided. Each record should not exceed 16 characters.

Example: USCCWSF01I00,USCCWSF01I01
Responses
200
Successfully retrieved the Comment history
application/json
400
The following error codes can be returned: - GN0002 - GN0004 - GN0005 Please refer to the error code dictionary for the details of each error code.
application/json
401
The following error codes can be returned: - AU0001 Please refer to the error code dictionary for the details of each error code.
application/json
403
The following error codes can be returned: - AU0002 Please refer to the error code dictionary for the details of each error code.
application/json
get
GET /external/v1/comment/history HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "timestamp": "2024-09-12T00:00:00.000Z",
    "blockNumber": 350,
    "transactionId": "456789OIJHGFCVGHJKLKJHGF67JH",
    "channelName": "OG123",
    "event": "Created",
    "update": {
      "commentId": "US9QICOMMENT1",
      "message": "This is a comment",
      "status": "broadcast",
      "viewOrgs": [
        "US9QIORG1",
        "US9QIORG2"
      ],
      "fileIds": [
        "US9QIFILE1",
        "US9QIFILE2"
      ],
      "associatedEntities": {
        "assetIds": [
          "US9QIASSET1"
        ]
      },
      "organization": {
        "orgId": "TEST1234",
        "name": "Test Organization"
      }
    },
    "signerData": {
      "email": "[email protected]",
      "name": "John Doe"
    },
    "extraData": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "organization": {
      "name": "Test Organization",
      "orgId": "TEST1234"
    }
  }
]