Update Document Version
Update editable field values on a specific version of a document. See also Update Single Document.
/api/{version}/objects/documents/{doc_id}/versions/{major_version}/{minor_version}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
X-VaultAPI-MigrationMode | When set to true, Vault relaxes field validation to support document migration. You must have the Document Migration permission to use this header. Learn more about Document Migration Mode. |
X-VaultAPI-NoTriggers | If set to true and Document Migration Mode |
About Document Migration Mode
Section link for About Document Migration ModeWith the X-VaultAPI-MigrationMode header, Vault relaxes field validation to support document migration.
When this header is set to true, Vault:
- Does not enforce requiredness validation on document fields.
- Does not enforce Dynamic Reference Constraint (DRC) validation.
- Does not send notifications.
Additionally, developers can:
- Manually set the document number.
- Set lookup field values directly. Vault recalculates a lookup field only when you update one of its source fields.
- Set
created_by__v,document_creation_date__v,last_modified_by__v, andversion_modified_date__v.
You must have the Vault Owner Actions: Document Migration permission to use this header. Learn more about Document Migration Mode
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{doc_id} | The document id field value. |
{major_version} | The document major_version_number__v field value. |
{minor_version} | The document minor_version_number__v field value. |
Body Parameters
Section link for Body ParametersIn the body of the request, add any editable field values that you wish to update as name-value pairs. To remove existing field values, include the field name and set its value to null.
To find your Vault’s editable document fields, Retrieve All Document Fields configured on documents. Editable fields will have editable:true.
Object reference fields support object reference notation, which lets you specify a related object record by a unique field value instead of by record ID.
Request
Section link for Requestcurl -X PUT -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "language__v=English" \
-d "product__v=1357662840171" \
-d "audience__c=consumer__c" \
https://myvault.veevavault.com/api/v26.3/objects/documents/534/versions/2/0Response
Section link for Response{
"responseStatus": "SUCCESS",
"id": 534
}Response Details
Section link for Response DetailsOn SUCCESS, Vault updates field values for the specified version of the document and returns the ID of the updated document.