Magidoc

documentAdd
Mutation

Add or attach a document to any allowed entity (note: consider to use DocumentAttach for 'attach' action). Must only receive one of either file or document_id in input.

Arguments

#

description

Optional description to update the document with.

file

Non-null

Used when uploading a new document or file in a multipart request that does not exist in the system already. Supported file types: text/comma-separated-values, application/x-pdf, text/x-pdf, application/excel, image/png, image/bmp, text/svg, image/heif, text/svg-xml, application/vnd.oasis.opendocument.presentation, image/x-bmp, application/x-tar, application/tif, application/x-autocad, image/x-ms-bmp, image/x-tif, application/postscript, image/heic-sequence, application/acad, image/dxf, application/vnd.ms-excel, application/rtf, application/x-tif, image/x-dxf, application/x-rar, image/x-tiff, application/x-acad, application/x-dxf, image/heic, image/gif, image/svg, image/x-eps, text/plain, application/x-rar-compressed, application/jpg, text/pdf, application/vnd.ms-powerpoint, application/vnd.oasis.opendocument.text, application/eps, application/x-rtf, image/svg+xml, application/x-eps, image/jpg, image/tiff, image/x-dwg, drawing/x-dwg, application/pdf, application/x-jpg, application/zip, application/acrobat, drawing/x-dwf, text/x-comma-separated-values, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.slideshow, application/dxf, application/vnd.pdf, application/x-tiff, image/tif, application/x-dwg, drawing/dwg, application/gzip, image/heif-sequence, application/vnd.oasis.opendocument.spreadsheet, application/vnd.ms-word, application/x-gzip, image/eps, application/gzipped, text/x-csv, image/webp, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/csv, text/rtf, image/jpeg, application/tiff, application/svg+xml, application/dwg, application/gzip-compressed, application/msword, application/x-csv, image/vnd.dwg, application/vnd.openxmlformats-officedocument.presentationml.presentation, pplication/vnd.rar, text/csv, application/x-zip-compressed.

relatedObjectId

ID !
Non-null

Target instance ID to attach a document to; currently supports Product, ProductVariant, Seller and User IDs.

Response

#

Returns DocumentAdd .

Example

#