Create Single Document Version
POST https://{{vaultDNS}}/api/{{version}}/objects/documents/:{doc_id}
https://developer.veevavault.com/api/20.2/#create-single-document-version
To create a new draft version from the existing document in the vault, include createDraft=latestContent in the input as shown in Request 1 below. This does not require uploading a file. For example, you want to create version 0.2 from the existing version 0.1. This is analogous to using the Create Draft action in the UI.
To create a new draft version by uploading and replacing the document source file, include the createDraft=uploadedContent in the input as shown in Request 2 below. This requires uploading a new source file. To upload the file, use the multi-part attachment with the file component file={file_name}
. The maximum allowed file size is 4GB. For example, you want to create version 0.2 but do not want to use the existing version 0.1. This is analogous to using the Upload New Version action in the UI.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
suppressRendition | null | Set to true to suppress automatic generation of the viewable rendition. If omitted, defaults to false |
Request Body
[{"name"=>"createDraft", "value"=>"latestContent", "datatype"=>"string"}, {"name"=>"createDraft", "value"=>"uploadedContent", "datatype"=>"string"}, {"name"=>"file", "value"=>nil, "datatype"=>"null"}, {"name"=>"description__v", "value"=>"", "datatype"=>"null"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string | ||
Accept | string |