Skip to content

DR74 - Upload accounting documents

Request

Description

Documents filenames must be distinct.

If several formats are required for a document request, they must all be uploaded at once.

A maximum of 50 documents can be uploaded simultaneously.

Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMIN
ROLE_PARTNER_CUSTOMER_ACCOUNTING...
)
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
documents_inputobjectrequired

Information about documents to be uploaded

filesArray of strings, (binary)required

The files to be uploaded. Use multipart/form-data with name 'files'. The file names must contain only US-ASCII characters.

curl -i -X POST \
  https://your-instance.mirakl.net/api/document-request/documents/upload \
  -H 'Content-Type: multipart/form-data' \
  -F 'documents_input="{\"requests\":[{\"document_number\":\"string\",\"due_date\":\"2023-03-28T09:34:42Z\",\"files\":[{\"format\":\"PDF\",\"name\":\"string\"}],\"issue_date\":\"2023-03-28T09:34:42Z\",\"request_id\":\"string\",\"total_amount_excluding_taxes\":0,\"total_tax_amount\":0}]}";type=application/json' \
  -F 'files=@path/to/file'

Responses

OK

Bodyapplication/json
requestsArray of objectsrequired

Details of the documents for each request as they were sent

Response
{ "requests": [ { … }, { … }, { … } ] }