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

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

#