Attach a new file (manual, brochure, price list, spec sheet) to product card, or replace an existing file.
To retrieve a list of files attached to a product, call getProducts and see the element "relatedFiles".
For an identical call which does not require the file
parameter to be base64-encoded, seee saveProductFile2.
Parameter name | Description | Possible value | Required |
---|---|---|---|
productFileID | Use productFileID to edit or replace an existing file. You may edit general information of the file (productID, name, fileTypeID, isInformationFile) or replace/update the file as well, as needed. | integer | |
productID | Product ID. For new files, this field is required. | integer | |
fileTypeID | File type ID. See getProductFileTypes. | integer | |
isInformationFile | A flag you can use for classification purposes (value: 0 or 1). | integer | |
name | A descriptive name for the file | string | |
file | Contents of the binary file, base64-encoded. If file content is missing, API returns error 1090. If it cannot be base64-decoded, API returns error 1091. |
Data | |
filename | File name. | string | |
url | Instead of uploading a file, it is possible to just provide a URL that points to the file in an external location (a content delivery network). This feature is for internal purposes only and NOT recommended for use! Must start with http:// or https://, otherwise API returns error 1015. |
string | |
hostingProvider | To be used with parameter "url". This should be a mutually-agreed classifier, identifying the CDN where the file is located. Must consist of letters and numbers only ([A-Za-z0-9]*), otherwise API returns error 1015. It cannot be used in conjunction with local files (API will return error 1013). |
string |
Field name | Type | Description |
---|---|---|
productFileID | integer | ID of the newly-created item |