Import Document Version Annotations from PDF
Load annotations from a PDF to Vault. This is equivalent to the Import Annotations action in the Vault document viewer UI. The file must be a PDF created by exporting annotations for the specified version of the same document through either the Export Annotations action in the Vault UI or the Export Document Version Annotations as PDF endpoint. You must have a role on the document that includes the Annotate permission.
POST
/api/{version}/objects/documents/{doc_id}/versions/{major_version}/{minor_version}/annotations/fileFile Upload
Section link for File UploadTo upload the file, use the multi-part attachment with the file component "file={file_name}". The maximum allowed file size is 4GB. Vault truncates annotations that exceed the following character limits:
- Note annotations: Subject (in Header) limited to 32,000 characters
- Note, Line, and Reply annotations: Comment limited to 32,000 characters
Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | multipart/form-data |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{doc_id} | The document id field value. |
{major_version} | The document major_version_number__v field value. |
{minor_version} | The document minor_version_number__v field value. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "file=document2016.pdf" \
https://myvault.veevavault.com/api/v25.2/objects/documents/548/versions/2/1/annotations/fileResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "OK",
"replies": 0,
"failures": 0,
"new": 0
}Response Details
Section link for Response DetailsOn SUCCESS, Vault uploads the file and its annotations.