POST
/

Use this API to update comment annotations in a document within an organization. Additional filters can be applied using location IDs, annotation IDs, or user IDs.

Endpoint

POST https://updatecommentannotations.api.velt.dev/

Headers

x-velt-api-key
string
required

Your API key.

x-velt-auth-token
string
required

Body Example

Params

data
object
required

Example Requests

1. Update all comment annotations by organizationId and documentId

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

2. Update comment annotations by organizationId, documentId and locationIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "locationIds": [
      "locationx"
    ],
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

3. Update annotations by organizationId, documentId, locationIds and userIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "locationIds": [
      "locationx"
    ],
    "userIds": [
      "yourUserId"
    ],
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

4. Update comment annotations by organizationId, documentId and userIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "userIds": [
      "yourUserId"
    ],
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

5. Update comment annotations by organizationId, documentId and annotationIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "annotationIds": [
      "yourAnnotationId1",
      "yourAnnotationId2"
    ],
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

6. Update comment annotations by organizationId, documentId, locationIds and annotationIds

{
  "data": {
    "organizationId": "yourOrganizationId",
    "documentId": "yourDocumentId",
    "locationIds": [
      "locationx"
    ],
    "annotationIds": [
      "yourAnnotationId1",
      "yourAnnotationId2"
    ],
    "updatedData" : {
      "status": {
        "type": "ongoing"
      }
    }
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Annotations updated successfully.",
    "data": [
      "yourAnnotationId1",
      "yourAnnotationId2",
      "yourAnnotationId3",
      "yourAnnotationId4",
      "yourAnnotationId5",
      "yourAnnotationId6",
      "yourAnnotationId7"
    ]
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}