**Source URL:** https://limited.veevavault.dev/medical/vault-api/api-reference/25.3/documents/retrieve-documents/download-document-file

# Download Document File

<Endpoint path="/api/{version}/objects/documents/{doc_id}/file" method="GET" />

## Headers

<FieldTable>
| Name | Description |
| --- | --- |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## URI Path Parameters

<FieldTable>
| Name | Description |
| --- | --- |
| `{doc_id}` | The document `id` field value. |
</FieldTable>

## Query Parameters

<FieldTable>
| Name | Description |
| --- | --- |
| `lockDocument` | Set to `true` to Check Out this document before retrieval. If omitted, defaults to `false`. |
</FieldTable>

## Request

<CodeExample title="">
```bash
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v15.0/objects/documents/534/file?lockDocument=false > file
```
</CodeExample>

## Response

<CodeExample title="">
```bash
Content-Type: application/octet-stream;charset=UTF-8
Content-Disposition: attachment;filename="CholeCap-Presentation.pptx"
```
</CodeExample>

## Response Details

On `SUCCESS`, Vault retrieves the latest version of the source file from the document. 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. Note that for most downloads (larger file sizes), the `Transfer-Encoding` method is set to `chunked` and the `Content-Length` is not displayed.

---

**Previous:** [Retrieve Document Version Text](/medical/vault-api/api-reference/25.3/documents/retrieve-documents/retrieve-document-version-text)  
**Next:** [Download Document Version File](/medical/vault-api/api-reference/25.3/documents/retrieve-documents/download-document-version-file)