Update Multiple Document Templates
Update uo to 500 document templates in your Vault.
PUT
/api/{version}/objects/documents/templatesHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json or text/csv |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body ParametersTo update document templates, prepare a CSV or JSON input file. You can update the following fields on document templates:
| Name | Description |
|---|---|
name__v | Include the name of an existing document template. |
new_name | Change the name of an existing document template. |
label__v | Change the label of an existing document template. This is the name users will see among the available binder templates in the UI. |
active__v | Set to true or false to indicate whether or not the document templates should be set to active, i.e., available for selection when creating a document. |
Convert Basic Document Template to Controlled Document Template
Section link for Convert Basic Document Template to Controlled Document TemplateTo convert a basic document template to a controlled document template, specify the Template Document. Vault will automatically update is_controlled__v on this template to true.
It is not possible to convert a controlled document template into a basic document template.
Request
Section link for Requestcurl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
--data-binary @"C:\Vault\Templates\update_document_templates.csv" \
https://myvault.veevavault.com/api/v21.2/objects/documents/templatesResponse
Section link for Response{
"responseStatus":"SUCCESS",
"data":[
{
"responseStatus":"SUCCESS",
"name":"claim_document_template__c"
},
{
"responseStatus":"SUCCESS",
"name":"clinical_study_document_template__c"
},
{
"responseStatus":"FAILURE",
"errors":[
{
"type":"INVALID_DATA",
"message":"Error message describing why this template was not created."
}
]
}
]
}