# uploadOrderDocument - Upload order document Description Use this API to upload a document for an order or its related entities (e.g. returns). Call Frequency Recommended usage: On each new document on the order Maximum usage: On each new document on the order Endpoint: POST /v1/orders/{channel_order_id}/documents Security: Bearer ## Path parameters: - `channel_order_id` (string, required) Order identifier from the channel Example: "COMMERCIAL_ID-A" ## Request fields (multipart/form-data): - `file` (string, required) The document file to upload. Maximum file size: 10 MB. Supported formats are : - PDF - JPEG - PNG - CSV - `metadata` (object, required) - `metadata.channel_document_id` (string, required) The channel document ID, it must be unique in the channel. - `metadata.channel_type` (string) Channel-specific document type. This field is optional and should be provided when type is CHANNEL_SPECIFIC. It allows connectors to store the original document type from the marketplace. - `metadata.entity` (object) Entity this document is associated with. - `metadata.entity.id` (string, required) The id of the entity (e.g. returnId for type : RETURN) this document is associated with. - `metadata.entity.type` (string, required) Type of entity this document is associated with. Enum: "RETURN" - `metadata.filename` (string, required) Name of the document (only this field counts as the file name). - `metadata.type` (string, required) Type of the document Enum: "RETURN_LABEL", "CUSTOMER_INVOICE", "DELIVERY_SLIP", "SHIPMENT_DELIVERY_SLIP", "CHANNEL_SPECIFIC" - `origin` (object, required) - `origin.channel_id` (string, required) Unique identifier of the sales channel - `origin.channel_store_id` (string, required) Store identifier on the sales channel. ## Response 400 fields (application/json): - `code` (string, required) Error code (immutable) - `errors` (array) - `errors.extensions` (object) Free map where you find additional context data to better describe the error - `errors.field` (string) JsonPath to the field where the error occurred - `errors.message` (string, required) Literal string error item description (Please do not base your error handling on this field since it is subject to change) - `message` (string, required) Literal string error description (Please do not base your error handling on this field since it is subject to change) ## Response 204 fields