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.

documentId

Used when attaching an existing document in the system to a new instance.

file

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

ids

[ ID !]

List of instance IDs to attach a document to, currently supports Product, ProductVariant, Seller, and User IDs.

relatedObjectId

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

Response

#

Returns DocumentAdd .

Example

#