---
title: "uploadOrderDocument - Upload order document"
method: POST
path: "/v1/orders/{channel_order_id}/documents"
tags: ["Orders"]
---

# uploadOrderDocument - Upload order document

`POST /v1/orders/{channel_order_id}/documents`

## Request

- Base URL: `https://miraklconnect.com/api/channel-platform`
- URL: `https://miraklconnect.com/api/channel-platform/v1/orders/{channel_order_id}/documents`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/docs/v1/orders/:channel_order_id/documents/post.ts> (a function with typed inputs; its response is checked against the schema)

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

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

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

<div class="recommended-call-frequency">Recommended usage: On each new document on the order</div>
<div class="max-call-frequency">Maximum usage: On each new document on the order</div>
</div>

## Path parameters

- `channel_order_id` string, required

## Request body `multipart/form-data`

- object
  - `file` string, 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>
  - `metadata` UploadOrderDocumentMetadata, required
    - `channel_document_id` string, required: The channel document ID, it must be unique in the channel.
    - `channel_type` string: Channel-specific document type. This field is optional and should be provided when type is <code>CHANNEL_SPECIFIC</code>. It allows connectors to store the original document type from the marketplace.
    - `entity` object: Entity this document is associated with.
      - `id` string, required: The id of the entity (e.g. <code>returnId</code> for type : <code>RETURN</code>) this document is associated with.
      - `type` string, required: Type of entity this document is associated with. Enum: `"RETURN"`
    - `filename` string, required: Name of the document (only this field counts as the file name).
    - `type` string, required: Type of the document Enum: `"RETURN_LABEL"`, `"CUSTOMER_INVOICE"`, `"DELIVERY_SLIP"`, `"SHIPMENT_DELIVERY_SLIP"`, `"CHANNEL_SPECIFIC"`
  - `origin` DocumentOriginRequest, required
    - `channel_id` string, required: Unique identifier of the sales channel
    - `channel_store_id` string, required: Store identifier on the sales channel.
    - `sub_channel_code` string: Code of the sub-channel on which the document was uploaded.

## Response `204`

No Content

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis.md) - [All operations](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/revisions/5fe2e95ce715?raw)
