---
title: "v2-downloadOrderDocuments - Download documents from an order"
method: GET
path: "/v2/orders/{order_id}/documents"
tags: ["Orders"]
---

# v2-downloadOrderDocuments - Download documents from an order

`GET /v2/orders/{order_id}/documents`

## Request

- Base URL: `https://miraklconnect.com/api`
- URL: `https://miraklconnect.com/api/v2/orders/{order_id}/documents`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mirakl/apis/mirakl-connect-apis/docs/v2/orders/:order_id/documents/get.ts> (a function with typed inputs; its response is checked against the schema)

<div class="extension-title">Description</div>

Use this API to download documents from an order.


<div class="api-description-extension">
<div class="extension-title">Call Frequency</div>

<div class="recommended-call-frequency">Recommended usage: On each order where we want to retrieve its documents</div>
<div class="max-call-frequency">Maximum usage: On each order where we want to retrieve its documents</div>
</div>

## Path parameters

- `order_id` string, required

## Query parameters

- `types` string[]
- `document_ids` string[]

## Response `200`

The requested document(s).

Always returns a ZIP archive.

The ZIP archive contains all matching documents with their original filenames (sorted by most recent first). For example, if <code>01JYGX2Z4V9KQ8RD3TCE5MHW7N</code> contains 3 documents the ZIP archive structure will be as follows:
<pre> <code>
  01JYGX2Z4V9KQ8RD3TCE5MHW7N_documents_1679996082000.zip
  ├── return_label.pdf
  ├── customer_invoice.pdf
  └── customer_invoice(1).pdf
</code> </pre>
Note: In case of multiple documents with the same name, a suffix (e.g. (1), (2), etc.) is added to the filenames in the ZIP archive to ensure uniqueness.

## Other responses

- `400`: Invalid or unsupported document type filter.
- `404`: Documents could not be retrieved because the order does not exist, no documents were found on this order, or when using <code>document_ids</code> filter, none of the requested documents exist or belong to the order.

---

[API](https://skmtc.dev/mirakl/apis/mirakl-connect-apis.md) - [All operations](https://skmtc.dev/mirakl/apis/mirakl-connect-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/mirakl/apis/mirakl-connect-apis/revisions/c0527a972b89?raw)
