Orders

v2-uploadOrderDocument - Upload a document for an order

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

Use this API to upload a document for an order or its related entities (e.g. returns).

Supported document types are :

  • <code>RETURN_LABEL</code>
  • <code>CUSTOMER_INVOICE</code>
<div class="api-description-extension"> <div class="extension-title">Call Frequency</div> <div class="recommended-call-frequency">Recommended usage: On each document upload</div> <div class="max-call-frequency">Maximum usage: On each document upload</div> </div>
post/v2/orders/{order_id}/documents

Request

Path parameters

order_idstring required

Order identifier in Mirakl Connect

Request body multipart/form-data

filestring binary required

The document file to upload.

Maximum file size: <code>10 MB</code>.

Supported formats are :

  • <code>PDF</code>
  • <code>JPEG</code>
  • <code>PNG</code>
  • <code>CSV</code>

Example request

{
  "metadata": {
    "returnLabel": {
      "externalValue": "schemas/examples/UploadReturnLabelOrderDocumentRequest.json",
      "summary": "Metadata for a <code>RETURN_LABEL</code> document"
    }
  }
}

Response

Accepted. The document upload request will be processed asynchronously.

action_idstring required

The unique identifier for the asynchronous action. It should be used with the v2-getActionStatus API to retrieve current action status and potential errors.

tracking_idstring

Deprecated: This field was previously used to obtain the action ID. It has been replaced by action_id and contains the same value. It is retained for backward compatibility.

Example response

{
  "action_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4",
  "tracking_id": "1ba5fc4b-c4fd-4251-880b-3052e301bbd4"
}

Changes

    • breaking

      request property // was restricted to a list of enum values

    • breaking

      request property / was restricted to a list of enum values

    • info

      added the new CUSTOMER_INVOICE enum value to the request property /

    • info

      added the new RETURN enum value to the request property //

    • info

      added the new RETURN_LABEL enum value to the request property /