Product_Update
#
Description#
This function is used to update a product in Miva. All parameters are optional.
Request Body Parameters#
Parameter |
Type | Description |
---|---|---|
product_id Edit_Product Product_Code Product_SKU |
Number String String String |
ID Number of product Product code string Product code string Product SKU string |
product_code |
String | Product Code of the product to update. This is a unique value in Miva. |
product_sku |
String | Product SKU of the product to update. If a non-unique value is passed to this parameter, it will generate an “Ambiguous product SKU” error. |
product_name |
String | Product Name |
product_description |
String | Product Description. Full HTML description allowed. |
product_canonical_category_code |
String | The canonical category is used to populate the breadcrumbs and category tree when no category code is present. |
product_alternate_display_page |
String | Alternate Page template to use when rendering this product |
product_page_title |
String | The Title Tag for this product. |
product_thumbnail |
String | Product Thumbnail. This field is depreciated. Images should be uploaded using ProductImage_Add |
product_image |
String | Product Fullsize Image. This field is depreciated. Images should be uploaded using ProductImage_Add |
product_price |
Number | Product Price. This is the price the product will be purchased at. |
product_cost |
Number | Product Cost. Used for reporting and certain types of discounts (markup from cost) |
product_weight |
Number | Product Weight |
product_Inventory |
Number | Current inventory count available for the product. Updating this value does not take into account stock held in open baskets |
product_taxable |
Boolean | true or false value depending on if a product is taxable. |
product_active |
Boolean | true or false value depending on if a product is active |
customfield_values |
Object | An object containing a customfields object with custom order fields to update. See examples. |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
boolean | boolean value for if the request was successful |
Example Request#
{
"Store_code": "beta",
"Function": "Product_Update",
"Edit_Product": "Test",
"Product_Code": "new_product_code",
"Product_SKU": "555182",
"Product_Name": "Hello WOrld",
"Product_Description": "ddddd",
"Product_Alternate_Display_Page": "ABUS",
"Product_Page_Title": "eeeee",
"Product_Thumbnail": "graphics/en-US/someimage_thumbnail.jpg",
"Product_Image": "graphics/en-US/someimage.jpg",
"Product_Price": 5.29,
"Product_Cost": 1.27,
"Product_Weight": 3.58,
"Product_Inventory": 26,
"Product_Taxable": true,
"Product_Active": true,
"CustomField_Values": {
"customfields": {
"automated_checkbox": true,
"automated_imageupload": "graphics/en-US/somecustomfieldimage.jpg",
"automated_text": "fffff",
"automated_textarea": "ggggg",
"automated_dropdown": "bbbbb",
"automated_multitext": ["hhhhh", "iiiii"]
}
}
}
Update Inventory#
{
"Store_code": "beta",
"Function": "Product_Update",
"Product_SKU": "555185",
"Product_Inventory": 50
}
Example Response#
{
"success": 1
}
Example Error Response#
{
"success": 0,
"error_code": "MER-JSN-00018",
"error_message": "Invalid value for field 'Product_Canonical_Category_Code': Category 'aaaaa' not found",
"validation_error": true,
"error_field": "Product_Canonical_Category_Code",
"error_field_message": "Category 'aaaaa' not found"
}
Error Responses#
Error Code | Error Message | Error Description |
---|---|---|
MER-JSN-PRD-00013 | Product not found | Product Code sent in Edit_Product field does not exist. |
MER-JSN-PRD-00014 | Product not found | Product Code sent in Product_Code does not exist. |
#Error# | Unable to load product | One of Edit_Product , Product_ID , Product_Code , or Product_SKU must be specified. |
MER-JSN-PRD-00072 | Ambiguous product SKU | Two or more products share the same product SKU. |