Read Annotations by Document Version and Type

GET https://{{vaultDNS}}/api/{{version}}/objects/documents/:{doc_id}/versions/:{major_version}/:{minor_version}/annotations

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

Retrieve annotations from a specific document version. You can retrieve all annotations or choose to retrieve only certain annotation types.

You must have View Content permission on the specified document version.

On SUCCESS, the response includes a list of annotations of the specified type(s) for the document version.

Request

$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v24.2/objects/documents/47/versions/0/1/annotations?annotation_types=document_link__sys,note__sys

Response

{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "document_version_id__sys": "47_0_1",
            "modified_by_user__sys": "1003079",
            "id__sys": "15",
            "placemark": {
                "y_coordinate__sys": 474.32,
                "coordinates__sys": [
                    481.01,
                    474.32,
                    598.37,
                    474.32,
                    481.01,
                    363.04,
                    598.37,
                    363.04
                ],
                "type__sys": "rectangle__sys",
                "height__sys": 111.28,
                "width__sys": 117.36,
                "x_coordinate__sys": 481.01,
                "page_number__sys": 1,
                "style__sys": "rectangle_solid__sys"
            },
            "created_by_user__sys": "1003079",
            "comment__sys": "Make this green.",
            "created_date_time__sys": "2023-06-26T19:59:41.000Z",
            "modified_date_time__sys": "2024-03-04T18:47:43.000Z",
            "title__sys": "",
            "type__sys": "note__sys",
            "tag_names__sys": [
                "CholeCap"
            ],
            "state__sys": "open__sys",
            "reply_count__sys": 0,
            "color__sys": "yellow_light__sys"
        },
        {
            "document_version_id__sys": "47_0_1",
            "modified_by_user__sys": "1003079",
            "references": [
                {
                    "document_version_id__sys": "7_1_0",
                    "type__sys": "document__sys",
                    "annotation__sys": "21"
                }
            ],
            "id__sys": "22",
            "placemark": {
                "y_coordinate__sys": 491.46,
                "coordinates__sys": [
                    349.48,
                    491.46,
                    408.54,
                    491.46,
                    349.48,
                    454.25,
                    408.54,
                    454.25
                ],
                "type__sys": "rectangle__sys",
                "height__sys": 37.21,
                "width__sys": 59.06,
                "x_coordinate__sys": 349.48,
                "page_number__sys": 1,
                "style__sys": "rectangle_solid__sys"
            },
            "created_by_user__sys": "1003079",
            "comment__sys": "",
            "created_date_time__sys": "2024-03-04T18:51:54.000Z",
            "modified_date_time__sys": "2024-03-04T18:52:16.000Z",
            "title__sys": "",
            "type__sys": "document_link__sys",
            "state__sys": "open__sys",
            "color__sys": "blue_dark__sys"
        }
    ],
    "responseDetails": {
        "offset": 0,
        "limit": 500,
        "size": 2,
        "total": 2
    }
}

Request Params

KeyDatatypeRequiredDescription
limitnullPaginate the results by specifying the maximum number of records per page in the response. This can be any value between 1 and 500. If omitted, defaults to 500. Values greater than 500 are ignored.
offsetnullThis parameter is used to paginate the results. It specifies the amount of offset from the first record returned. Vault returns 200 records per page by default. If you are viewing the first 200 results (page 1) and want to see the next page, set this to offset=201.
annotation_typesnullThe type(s) of annotations to retrieve. For example, note__sys,anchor__sys. If omitted, Vault returns all annotations.
pagination_idnullA unique identifier used to load requests with paginated results.

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring
Acceptstring