---
title: "S31 - Download documents for one or multiple shops"
method: GET
path: "/api/shops/documents/download"
tags: ["Stores"]
---

# S31 - Download documents for one or multiple shops

`GET /api/shops/documents/download`

## Request

- Base URL: `https://your-instance.mirakl.net`
- URL: `https://your-instance.mirakl.net/api/shops/documents/download`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://auth.mirakl.net/authorize`
    - Token URL: `https://auth.mirakl.net/oauth/token`
- TypeScript: <https://skmtc.dev/mirakl/apis/mirakl-catalog-manager-apis/docs/api/shops/documents/download/get.ts> (a function with typed inputs; its response is checked against the schema)

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

        <ul>  <li><span class='red'>It is mandatory to specify either the <code>shop_ids</code> or the <code>document_ids</code>.</span></li>  <li>If a list of document identifiers is specified only these documents are downloaded.    <ul>      <li>If more than one document id is specified, the documents will be wrapped in a ZIP archive</li>      <li>If only one document id is specified the document will not be zipped</li>    </ul>  </li>  <li>    If a list of shop identifiers is specified, all documents from those shops are downloaded.<br/>    Use a list of shop document type codes to retrieve specific types from those shops.<br/>    In this case, the output of the API will always be a ZIP archive even if there is only one document to retrieve.  </li></ul><p>When documents are retrieved, they're wrapped into a ZIP archive except when only one document id is specified. The tree structure of this archive is as follow:</p><pre>
documents-timestamp.zip
|
|__ shop_id_x/
|   |__ foo.txt
|   |__ bar.txt
|   |__ baz.pdf
|
|__ shop_id_y/
|   |__ image.png
|   |__ image(1).png
</pre><p>Returns a <code>404</code> if at least one document id, one shop id or one document type code is invalid</p>

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

<div class="recommended-call-frequency">Recommended usage: After each S30 call, when you want to download documents from a store</div>
<div class="max-call-frequency">Maximum usage: After each S30 call, when you want to download documents from a store</div>
<div class="extension-title">Read More</div>

<ul><li><a href="https://help.mirakl.com/bundle/customers/page/topics/Mirakl/mmp/Operator/manage_docs/manage_order_and_seller_docs/manage_order_and_seller_documents.html">More context</a></li></ul></div>

## Query parameters

- `shop_ids` string
- `document_ids` string
- `type_codes` string

## Response `200`

OK

---

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