Comments Annotations
Get Comment Annotations
POST
/
Use this API to retrieve comment annotations from a document within an organization. Additional filters can be applied using location IDs, annotation IDs, or user IDs.
Endpoint
POST https://getcommentannotations.api.velt.dev/
Headers
x-velt-api-key
string
requiredYour API key.
x-velt-auth-token
string
requiredYour Auth Token.
Body Example
Params
data
object
requiredExample Requests
1. Get annotations by organizationId and documentId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId"
}
}
2. Get annotations by organizationId, documentId, and locationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
]
}
}
3. Get annotations by organizationId, documentId, locationIds, and userIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"userIds": [
"yourUserId"
]
}
}
4. Get annotations by organizationId, documentId, and userIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userIds": [
"yourUserId"
]
}
}
5. Get annotations by organizationId, documentId, and annotationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
]
}
}
6. Get annotations by organizationId, documentId, locationIds, and annotationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
]
}
}
7. Get annotations by documentId. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId"
}
}
8. Get annotations by documentId and locationIds. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
]
}
}
9. Get annotations by documentId and userIds. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId",
"userIds": [
"yourUserId"
]
}
}
10. Get annotations by documentId and annotationIds. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId",
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
]
}
}
11. Get annotations by documentId, locationIds, and userIds. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"userIds": [
"yourUserId"
]
}
}
12. Get annotations by documentId, locationIds, and annotationIds. This will work if the document was created without an organization.
{
"data": {
"documentId": "yourDocumentId",
"locationIds": [
"locationx"
],
"annotationIds": [
"yourAnnotationId1",
"yourAnnotationId2"
]
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "Annotations fetched successfully.",
"data": [
{
"annotationId": "yourAnnotationId",
"comments": [
{
"commentHtml": "<div>Hello</div>",
"commentId": 123456,
"commentText": "Comment text",
"from": {
"userId": "userId"
},
"status": "added",
"type": "text"
}
],
"from": {
"userId": "userId"
},
"type": "comment",
},
null // If annotation is not found
]
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
Was this page helpful?