Skip to content

S32 - Upload business documents to associate with a shop

Request

Description

Document filenames must be distinct and there can be only one file per document type.
Only documents of the following types are supported: csv, doc, docx, gif, html, jpeg, latex, mp4, odp, odc, odg, ods, odt, pdf, png, pps, ppsx, ppt, pptx, quicktime, rtf, text, tiff, xls, xlsx, xml, zip
You can upload a maximum of 50 business documents for each shop. These documents are not order related documents.

Call Frequency
Maximum usage: 50 business documents per call
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_SHOP_DOCUMENT_WRITE)
Query
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.

Bodymultipart/form-data
filesArray of strings, (binary)required

Files to upload

shop_documentsobjectrequired

A descriptor associated to the files

curl -i -X POST \
  https://your-instance.mirakl.net/api/shops/documents \
  -H 'Content-Type: multipart/form-data' \
  -F 'files=@path/to/file' \
  -F 'shop_documents="{\"shop_documents\":[{\"file_name\":\"string\",\"type_code\":\"string\"}]}";type=application/json'

Responses

OK

Bodyapplication/json
documentsArray of objectsrequired

List of error reports associated to each document in an error state

errors_countinteger, (int32)

The number of documents in an error state

Response
{ "errors_count": 1, "shop_documents": [ { … } ] }