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

relatedObjectId

ID !
Non-null

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

Response

#

Returns DocumentAdd .

Example

#