Create Single Document Version
Add a new draft version of an existing document. You can choose to either use the existing source file, or a new source file. These actions will increase the document’s minor version number. This is analogous to using the Create Draft action in the UI.
POST
/api/{version}/objects/documents/{doc_id}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | multipart/form-data |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{doc_id} | The document id field value. |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
createDraft=latestContent | Create a new draft version from the existing document in the Vault. This does not require uploading a file. This is analogous to the Copy file from current version option in the Create Draft UI. |
createDraft=uploadedContent | Create a new draft version by uploading the document source file. This requires uploading a new source file with an additional file body parameter. The maximum allowed file size is 4GB. This is analogous to the Upload a new file option in the Create Draft UI. |
file | Optional:
|
Query Parameters
Section link for Query ParametersRequest : Copy file from current version
Section link for Request : Copy file from current versioncurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "createDraft=latestContent" \
https://myvault.veevavault.com/api/v17.2/objects/documents/534Request : Upload a new file & Suppress rendition
Section link for Request : Upload a new file & Suppress renditioncurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "file=CholeCap-Presentation.pptx" \
-F "createDraft=uploadedContent" \
https://myvault.veevavault.com/api/v17.2/objects/documents/534?suppressRendition=trueResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "New draft successfully created.",
"major_version_number__v": 0,
"minor_version_number__v": 2
}