Create Multiple Annotations
POST https://{{vaultDNS}}/api/{{version}}/objects/documents/annotations/batch
https://developer.veevavault.com/api/24.2/#CreateMultipleAnnotations
Create up to 500 annotations.
Prepare 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.
On SUCCESS
, the response includes a responseStatus
indicating whether each annotation object in the request body was successfully created.
Request
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '[
{
"type__sys": "note__sys",
"document_version_id__sys": "1_0_1",
"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": "2_0_1",
"placemark": {
"type__sys": "text__sys",
"page_number__sys": 2,
"text_start_index__sys": 10,
"text_end_index__sys": 15
},
"references": [
{
"type__sys": "document__sys",
"document_version_id__sys": "301_0_3",
"annotation__sys": "56"
},
{
"type__sys": "document__sys",
"document_version_id__sys": "4_0_1"
}
]
}
]'
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": "2_0_1",
"global_version_id__sys": "123456_2_2",
"id__sys": "59"
}
]
}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string | ||
Accept | string |