Skip to content

Delete a specific version of multiple documents, including the version's source file and viewable rendition.

  • The maximum input file size is 1GB.
  • The values in the input must be UTF-8 encoded.
  • CSVs must follow the standard format.
  • The maximum batch size is 500.
DELETE/api/{version}/objects/documents/versions/batch
NameDescription
Content-Typetext/csv or application/json
Acceptapplication/json (default) or text/csv

Create a CSV or JSON input file.

NameDescription
idThe system-assigned document ID of the document to delete.
external_id__vOptional: Instead of id, you can use this user-defined document external ID.
major_version_number__vMajor version number of the document version to remove.
minor_version_number__vMinor version number of the document version to remove.
NameDescription
idParamIf you're identifying documents in your input by their external ID, add idParam=external_id__v to the request endpoint.
Download Input File
curl -X DELETE -H "Authorization: {SESSION_ID}" \ -H "Content-Type: text/csv" \ -H "Accept: text/csv" \ --data-binary @"C:\Vault\Documents\delete_document_versions.csv" \ https://myvault.veevavault.com/api/v18.2/objects/documents/versions/batch
{ "responseStatus": "SUCCESS", "data": [ { "responseStatus": "SUCCESS", "id": 771, "external_id__v": "ALT-DOC-0771", "major_version_number__v": 0, "minor_version_number__v": 2 }, { "responseStatus": "SUCCESS", "id": 772, "external_id__v": "CHO-DOC-0772", "major_version_number__v": 0, "minor_version_number__v": 2 }, { "responseStatus": "SUCCESS", "id": 773, "external_id__v": "GLU-DOC-0773", "major_version_number__v": 1, "minor_version_number__v": 0 }, { "responseStatus": "FAILURE", "errors": [ { "type": "INVALID_DATA", "message": "Error message describing why this document version was not deleted." } ] } ] }