Skip to content

S31 - Download documents for one or multiple shops

Request

Description
  • It is mandatory to specify either the shop_ids or the document_ids.
  • If a list of document identifiers is specified only these documents are downloaded.
    • If more than one document id is specified, the documents will be wrapped in a ZIP archive
    • If only one document id is specified the document will not be zipped
  • If no document identifiers is specified, all the shop documents will be downloaded.
    Use a list of shop document type codes to retrieve specific types from your shop.
    In this case, the output of the API will always be a ZIP archive even if there is only one document to retrieve.

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:


documents-timestamp.zip
|__ shop_id/
|   |__ image.png
|   |__ image(1).png
|   |__ foo.txt

Returns a 404 if at least one document id or one document type code is invalid

Call Frequency
Maximum usage: After each S30 call, when you want to download documents from a store
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_SHOP_DOCUMENT_READ)
Query
document_idsstring

A list of document identifiers (separated by a comma). It is mandatory to specify either the shop_ids or the document_ids

type_codesstring

A list of document type codes (separated by a comma)

shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

curl -i -X GET \
  'https://your-instance.mirakl.net/api/shops/documents/download?document_ids=string&type_codes=string&shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/octet-stream
string, (binary)
Response
string