**Source URL:** https://limited.veevavault.dev/safety/vault-api/api-reference/22.3/documents/document-attachments/download-all-document-attachments.md

# Download All Document Attachments



Downloads the latest version of all attachments from the document.

<Endpoint path="/api/{version}/objects/documents/{doc_id}/attachments/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>

## Request {#request}

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

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
Content-Type: application/octet-stream;charset=UTF-8
Content-Disposition: attachment;filename="Document VV-02839 (v0.1) - attachments.zip"

```
</CodeExample>

## Response Details {#response-details}

On SUCCESS, Vault retrieves the latest version of all attachments from the document. The attachments are packaged in a ZIP file with the file name: `Document {document number} (v. {major version}.{minor version}) - attachments.zip`.

The HTTP Response Header Content-Type is set to `application/zip`. The HTTP Response Header `Content-Disposition` contains a filename attribute which can be used when naming the local file.
When downloading attachments with very small file size, the HTTP Response Header `Content-Length` is set to the size of the attachment. Note that for most attachment downloads (larger file sizes), the `Transfer-Encoding` method is set to `chunked` and the `Content-Length` is not displayed.



---

**Previous:** [Download Document Version Attachment Version](/safety/vault-api/api-reference/22.3/documents/document-attachments/download-document-version-attachment-version)  
**Next:** [Download All Document Version Attachments](/safety/vault-api/api-reference/22.3/documents/document-attachments/download-all-document-version-attachments)