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: application/vnd.oasis.opendocument.text, application/gzip-compressed, application/eps, application/x-csv, application/x-jpg, image/x-eps, application/x-dwg, application/csv, image/vnd.dwg, application/acad, image/heif, application/x-tar, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/svg, image/x-tiff, image/bmp, application/x-acad, text/x-csv, application/x-rtf, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/dwg, application/x-eps, text/comma-separated-values, application/vnd.ms-word, pplication/vnd.rar, application/x-tif, image/heic, drawing/x-dwg, text/rtf, image/svg+xml, application/x-autocad, application/x-rar-compressed, text/pdf, drawing/x-dwf, application/vnd.oasis.opendocument.presentation, image/dxf, application/x-pdf, application/tiff, image/webp, application/x-tiff, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/tif, application/vnd.ms-powerpoint, application/x-dxf, image/tiff, application/x-rar, image/x-dwg, text/x-comma-separated-values, application/svg+xml, image/jpeg, image/x-tif, image/tif, application/dxf, text/x-pdf, application/vnd.oasis.opendocument.spreadsheet, image/heic-sequence, application/excel, application/pdf, text/svg-xml, drawing/dwg, application/vnd.ms-excel, image/gif, application/msword, image/x-bmp, application/jpg, image/svg, image/jpg, image/heif-sequence, image/x-ms-bmp, image/x-dxf, application/gzip, image/eps, application/vnd.openxmlformats-officedocument.presentationml.slideshow, text/plain, application/acrobat, application/postscript, application/zip, application/x-zip-compressed, application/vnd.pdf, text/csv, application/gzipped, application/rtf, application/x-gzip, image/png.

relatedObjectId

ID !
Non-null

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

Response

#

Returns DocumentAdd .

Example

#