Create Multiple Annotations
Create up to 500 annotations.
POST
/api/{version}/objects/documents/annotations/batchHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or text/csv |
Content-Type | application/json |
Body Parameters
Section link for Body ParametersPrepare a JSON-formatted list of annotation objects, each containing a list of annotation properties and their values. For more details about annotation fields, see Read Annotations by Document Version and Type.
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '[
{
"type__sys": "note__sys",
"document_version_id__sys": "1001_0_1",
"external_id__sys": "12345",
"color__sys": "orange_dark__sys",
"comment__sys": "hello world",
"placemark": {
"type__sys": "sticky__sys",
"page_number__sys": 1,
"x_coordinate__sys": 50.5,
"y_coordinate__sys": 25.5
}
},
{
"type__sys": "document_link__sys",
"document_version_id__sys": "1001_0_1",
"placemark": {
"type__sys": "text__sys",
"page_number__sys": 1,
"text_start_index__sys": 10,
"text_end_index__sys": 15
},
"references": [
{
"type__sys": "document__sys",
"document_version_id__sys": "301_0_4",
"annotation__sys": "104"
},
{
"type__sys": "document__sys",
"document_version_id__sys": "601_0_1"
}
]
}
]'
https://myvault.veevavault.com/api/v25.2/objects/documents/annotations/batch \Response
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"document_version_id__sys": "1001_0_1",
"global_version_id__sys": "119899_1001_36",
"id__sys": "141"
},
{
"responseStatus": "SUCCESS",
"document_version_id__sys": "1001_0_1",
"global_version_id__sys": "119899_1001_36",
"id__sys": "142"
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes a responseStatus indicating whether each annotation object in the request body was successfully created. For successfully created annotations, the response also includes the following: