Skip to content

Create or add document versions in bulk.

  • Your Vault must be in Migration Mode.
  • The maximum CSV 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.
POST/api/{version}/objects/documents/versions/batch
NameDescription
Content-Typetext/csv
Acceptapplication/json (default) or text/csv
NameDescription
fileThe filepath of your source files.
idThe system-assigned document ID of the document to add the versions to.
external_id__vOptional: Instead of id, you can use this user-defined document external ID.
name__vEnter a name for the new document. This may be the same name as the existing document/version or a different name.
type__vEnter the name of the document type to assign to the new document.
subtype__vEnter the name of the document subtype (if one exists on the document type).
classification__vEnter the name of the document classification (if one exists on the document subtype).
lifecycle__vEnter the name of the document lifecycle to assign to the new document. This may be the same lifecycle as the existing document/version or a different lifecycle.
major_version_number__vEnter the major version number to assign to the new document version. This must be a version that does not yet exist on the document being updated.
minor_version_number__vEnter the minor version number to assign to the new document. This must be a version that does not yet exist on the document being updated.
status__vEnter a status for the new document, e.g., Draft, In Review, Approved, etc.
product__vExample: This is an example object reference field. To assign value for this field type, include either the document field name product__v or the document field name plus the name field on the object product__v.name__v.
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 POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: text/csv" \ -H "Accept: text/csv" \ --data-binary @"C:\Vault\Documents\add_document_versions.csv" \ https://myvault.veevavault.com/api/v19.1/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 added." } ] } ] }