24/7 Support: 800.608.6482

Navigation


ProductImage_Add

This function allows you to add a new image to a product.

Note: The file must first exist on the server at the path specified before calling this function. Use FTP to upload the file to the server or the Miva admin. You can also upload a base64 encoded version of the image by using provision_store and using the Image_Add function. See example at the bottom of this page.

Request Body Parameters

Product_ID Type:
Number
Title:
Product Id
Product Id to assign Image to
Filepath Type:
String
Title:
File Path
Relative file path to the image (relative to mm5 folder). The file must first exist on the server before calling this funciton.
ImageType_ID Type:
Number
Title:
Image Type ID
The Id of the Image type you want to assign to the image. Pass 0 to not assign an image type.

Response Parameters

success boolean value for if the request was successfull

Example Request

Example Response

Example of Image_Add to send base64 encoded Image via API

Error Responses

error code
MER-DBE-IMG-00001
error message
Image filepaths must be local and relative to the Base Directory for Graphics
  Order number not found.
error code
EOF
error message
Record not found: MER-DBP-PRD-00017
  description
Product Id not found

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept

Copyright © 1997 – 2023 Miva©, Miva Merchant©, MivaPay©, MivaCon©, Camp Miva ℠, Miva, Inc. All Rights Reserved.