**Source URL:** https://limited.veevavault.dev/sitevault/vault-api/api-reference/23.3/documents/retrieve-documents/download-document-file.md

# Download Document File



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

## Headers {#headers}

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

## URI Path Parameters {#uri-path-parameters}

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

## Query Parameters {#query-parameters}

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

## Request {#request}

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

```
</CodeExample>

## Response {#response}

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

```
</CodeExample>

## Response Details {#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](/sitevault/vault-api/api-reference/23.3/documents/retrieve-documents/retrieve-document-version)  
**Next:** [Download Document Version File](/sitevault/vault-api/api-reference/23.3/documents/retrieve-documents/download-document-version-file)