Update Annotations

PUT https://{{vaultDNS}}/api/{{version}}/objects/documents/annotations/batch

https://developer.veevavault.com/api/24.2/#UpdateMultipleAnnotations

Update up to 500 existing annotations.

Prepare a JSON-formatted list of annotation objects. Each object must contain the idsys, documentversionid_sys, and the annotation field(s) to be updated. For more details about annotation fields, see Read Annotations by Document Version and Type.

On SUCCESS, the response includes the document version ID, global version ID, and ID and version of updated annotations. See Create Annotations for details. Annotations that did not update successfully are reported with an error message.

Request

$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '[
   {
       "id__sys": "58",
       "document_version_id__sys": "1_0_1",
       "comment__sys": "Updated comment from api"
   },
   {
       "id__sys": "54",
       "document_version_id__sys": "1_0_1",
       "color__sys": "yellow_light__sys"
   }
]'
https://myvault.veevavault.com/api/v24.2/objects/documents/annotations/batch

Response

{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "responseStatus": "SUCCESS",
            "document_version_id__sys": "1_0_1",
            "global_version_id__sys": "123456_1_1",
            "id__sys": "58"
        },
        {
            "responseStatus": "SUCCESS",
            "document_version_id__sys": "1_0_1",
            "global_version_id__sys": "123456_1_1",
            "id__sys": "54"
        }
    ]
}

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring
Content-Typestring
Acceptstring