Skip to content

Download the file of a specific document template.

GET/api/{version}/objects/documents/templates/{template_name}/file
NameDescription
Acceptapplication/json (default) or application/xml For this request, the Accept header controls only the error response. On SUCCESS, the response is a file stream (download).
NameDescription
{template_name}The document template name__v field value.
curl -X GET -H "Authorization: {SESSION_ID}" \ https://myvault.veevavault.com/api/v17.1/objects/documents/templates/claim_document_template__c/file
Content-Type: application/octet-stream;charset=UTF-8 Content-Disposition: attachment;filename="claim_document_template__c.pdf"

On SUCCESS, Vault retrieves the document template file.

The HTTP Response Header Content-Type is set to application/octet-stream. The HTTP Response Header Content-Disposition contains a filename component which can be used when naming the local file. When retrieving templates with very small file size, the HTTP Response Header Content-Length is set to the size of the template file. Note that for template downloads of larger file sizes, the Transfer-Encoding method is set to chunked and the Content-Length is not displayed.