# OR74 - Upload documents to attach to an order Documents filenames must be distinct. Only documents of the following types are supported: csv, doc, xls, xlsx, ppt, pdf, odt, ods, odp, txt, rtf, png, jpg, gif, zpl, mov, mp4. An order can have a maximum of 50 documents. In the API output we include only documents with errors. All other documents are successfully uploaded. For system document types, there are specific restrictions : SYSTEM_DELIVERY_BILL/SYSTEM_SHIPMENT_DELIVERY_BILL : restricted to operator role. SYSTEM_MESSAGE_ATTACHMENT : cannot be directly uploaded to an order. Call FrequencyRecommended usage: At each document upload on an orderMaximum usage: At each document upload on an order Endpoint: POST /api/orders/{order_id}/documents ## Path parameters: - `order_id` (string, required) The identifier of the order ## Query parameters: - `shop_id` (integer) Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used. ## Request fields (multipart/form-data): - `files` (array, required) The files to be uploaded. Use multipart/form-data with name 'files'. The file names must contain only US-ASCII characters. - `order_documents` (object, required) The list of documents to be uploaded details - `order_documents.order_documents` (array, required) - `order_documents.order_documents.entity` (object) Document entity - `order_documents.order_documents.entity.id` (string, required) Document entity ID - `order_documents.order_documents.entity.type` (string, required) Document entity Enum: "RETURN" - `order_documents.order_documents.file_name` (string, required) File name - `order_documents.order_documents.type_code` (string, required) Document type code ## Response 200 fields (application/json): - `errors_count` (integer) The number of documents in an error state - `order_documents` (array, required) Lists of error reports associated to each document in an error state - `order_documents.errors` (array, required) Errors about the input object - `order_documents.errors.code` (string, required) Error code - `order_documents.errors.field` (string, required) Name of the field on the input object. Can be composed, e.g.: address.zip_code - `order_documents.errors.message` (string, required) Error message