Skip to content

Update Multiple Document Attachment Descriptions

Update multiple document attachments in bulk with a JSON or CSV input file. This works for version-specific attachments and attachments at the document level. You can only update the latest version of an attachment.

  • The maximum input file size is 1GB.
  • The values in the input must be UTF-8 encoded.
  • CSVs must follow the standard RFC 4180 format, with some exceptions.
  • The maximum batch size is 500.
PUT/api/{version}/objects/documents/attachments/batch
NameDescription
Content-Typeapplication/json or text/csv
Acceptapplication/json (default) or text/csv or application/xml

Prepare a CSV or JSON input file.

NameDescription
id
conditional
The attachment ID to update. Not required if providing a unique field identifier (idParam) such as external_id__v.
external_id__v
conditional
Identify attachments by their external ID instead of regular id. You must also add the idParam=external_id__v query parameter.
description__v
required
Description of the attachment. Maximum 1,000 characters.
Download Input File
NameDescription
idParamIf you’re identifying attachments in your input by external id, add idParam=external_id__v to the request endpoint.
curl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
-H "Accept: text/csv" \
--data-raw 'id__sys,document_version_id__sys
58,1_0_1' \
https://myvault.veevavault.com/api/v26.1/objects/documents/attachments/batch
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "responseStatus": "SUCCESS",
            "id": 38,
            "version": 2
        }
    ]
}

On SUCCESS, the response gives the id and version of all successfully updated attachments.