Update a Product

OAuthScope

ZohoCommerce.items.UPDATE

 

HTTP Request

PUT https://commerce.zoho.com/store/api/v1/products/

 

Body Parameters

ParameterDescription
namestring: Name of the product.
urlstring: URL of the product.
variant_typestring: Give variant_type as "inventory" to track inventory stock for the product.
product_short_descriptionstring: Concise description of the product.
product_descriptionstring: Detailed description of the product.
show_in_storefrontboolean: When enabled, this shows the product in store.
attribute_name1, attribute_name2, attribute_name3string: Give attribute name for the product. You can add maximum of 3 attributes.
attribute_type1, attribute_type2, attribute_type3string: Give attribute type corresponding to the attribute name given. Two possible values are Text (default value) or Colour.
category_idlong: Give the unique category_id to map the category.
tagsarray: Give the list of tags for the product.
brandstring: Give the brand name for the product.
is_returnableboolean: Enable this if product can be returned by the customers.
is_featured boolean: Enable this if product is on sale.
seo_titlestring: Give title for SEO.
seo_keywordstring: Give SEO keywords for the product.
seo_descriptionstring: Give SEO description for the product.
specificationset_idlong: Give unique specification set ID to give specification details for the product.
specificationsarray: Give set of specification_id and specification_value_id.
specification_idlong: Give unique specification id that denotes the label.
specification_value_idlong: Give unique specification value id that denotes the value for the particular label
page_layout_idlong: Give unique page layout id corresponding to custom field details pertaining to a specific product.
variantsarray: Give list of all the variants for the product.
ratestring: Give selling price of the variant.
initial_stockstring: Give stock count for the variant. This field is MANDATORY if you pass variant_type as "inventory".
attribute_option_name1, attribute_option_name2, attribute_option_name3string: Give attribute values for the corresponding attributes. For eg: If attribute_name1 is SIZE then give attribute_option_name1 (eg: large,medium,..etc) with the corresponding values.
attribute_option_data1, attribute_option_data2, attribute_option_data3string: Give color code for the correspoding attributes. This field is only needed when you give attribute_type as colour.For eg: If attribute_type2 is Colour then give corresponding color code value in attribute_option_data2.
label_ratestring: Give retail price of the variant.
skustring: Give SKU for the variant.
document_idsarray: Give set of document_id of the iamges to map with variants.
custom_fieldsarray: Give set of custom_field values for the variant.
customfield_idlong: Give unique cusomfield id to denote the label.
valuestring: Give corresponding values for the label.
reorder_levelstring: Low stock limit for the variant below which will trigger an email remainder.
package_detailsarray: Give package details such as weight, width, height and length. This is used to calcuate shipping charges at the time of checkout.
heightstring: Give the package height.
weightstring: Give the package weight.
lengthstring: Give the package length.
widthstring: Give the package width
eanstring: Give EAN for the variant.
upcstring: Give UPC for the variant.
isbnstring: Give ISBN for the variant.
part_numberstring: Give MPN for the variant.
hsn_or_sacstring: Give HSN or SAC for the variant. For India only.
avatax_tax_codestring: Give Avalara tax code for the variant. For US only.

 

Request Example

Copiedcurl -i -X PUT \
-H "Authorization:Zoho-oauthtoken ***" \
-H "X-com-zoho-store-organizationid:682219181" \
-H "Content-Type:application/json" \
-d \
'{"is_returnable" : false,"is_featured" : true,"variants":[{"variant_id":"1706707000000561018","rate": "1600"}]}' \
'https://commerce.zoho.com/store/api/v1/products/1706707000000561016'

Success Response

Copied{
"code": 0,
"message": "Product Updated Successfully",
"product": {
"product_id": "1706707000000561016",
"account_id": "1706707000000000388",
"ancestor_categories": [
{
"parent_category_id": "null",
"category_id": "1706707000000068762",
"name": "Partywear",
"url": "partywear"
}
],
"attribute1": {
"name": "Size",
"options": [
{
"option_id": "1706707000000067341",
"option_name": "L"
}
],
"id": "1706707000000067329",
"type": "Text"
},
"attribute2": {
},
"attribute3": {
},
"show_in_storefront": true,
"show_in_pos": false,
"show_in_both": false,
"attribute_id1": "1706707000000067329",
"attribute_id2": "",
"attribute_id3": "",
"attribute_name1": "Size",
"attribute_name2": "",
"attribute_name3": "",
"attribute_type1": "Text",
"attribute_type2": "",
"attribute_type3": "",
"attributes": [
{
"id": "1706707000000067329",
"name": "Size",
"type": "text",
"options": [
{
"id": "1706707000000067341",
"name": "L",
"data": ""
}
]
}
],
"brand": "Remy",
"category_id": "1706707000000068762",
"category": {
"category_id": "1706707000000068762",
"category_name": "Partywear"
},
"description": "",
"product_description": "",
"product_short_description": "",
"documents": [
],
"has_variant": false,
"image_name": "",
"image_type": "",
"inventory_account_id": "1706707000000034001",
"is_taxable": true,
"is_returnable": false,
"manufacturer": "",
"name": "A-line Pink Dress",
"purchase_account_id": "1706707000000034003",
"seo_description": "",
"seo_keyword": "Pink-dress, A-line",
"seo_title": "A-line Pink dress",
"specifications": [
],
"specificationset_id": "",
"specificationset_name": "",
"tags": [
{
"tag_name": "Pink",
"tag_id": "1706707000000557078"
},
{...}
],
"product_tags": [
{
"tag_name": "Pink",
"tag_id": "1706707000000557078"
},
{...}
],
"page_layout_id": "",
"url": "a-line-pink-dress",
"variant_type": "inventory",
"variants": [
{
"variant_id": "1706707000000561018",
"attribute_id1": "1706707000000067329",
"attribute_id2": "",
"attribute_id3": "",
"attribute_name1": "Size",
"attribute_name2": "",
"attribute_name3": "",
"attribute_type1": "Text",
"attribute_type2": "",
"attribute_type3": "",
"attribute_option_id1": "1706707000000067341",
"attribute_option_id2": "",
"attribute_option_id3": "",
"attribute_option_name1": "L",
"attribute_option_name2": "",
"attribute_option_name3": "",
"attribute_option_data1": "",
"attribute_option_data2": "",
"attribute_option_data3": "",
"collect_variant_level_data": "",
"created_time": "2019-12-20T00:46:02-0700",
"description": "",
"ean": "",
"image_name": "",
"image_type": "",
"documents": [
],
"isbn": "",
"is_combo_product": false,
"is_linked_with_zohocrm": false,
"is_taxable": true,
"last_modified_time": "2019-12-20T03:33:33-0700",
"package_details": {
"length": "",
"width": "",
"height": "",
"weight": "",
"weight_unit": "lb",
"dimension_unit": "in"
},
"name": "A-line Pink Dress-L",
"part_number": "",
"product_type": "goods",
"purchase_description": "",
"purchase_rate": 0,
"rate": 1600,
"label_rate": 2199,
"reorder_level": 5,
"initial_stock": 25,
"initial_stock_rate": 1539,
"sku": "W005-51-120",
"source": "",
"status": "active",
"stock_on_hand": 25,
"actual_available_stock": 25,
"available_stock": 25,
"available_sale_stock": 25,
"custom_fields": [
],
"tax_exemption_id": "",
"upc": "",
"variant_type": "inventory"
}
],
"sales_channels": [
],
"source": "user",
"status": "active",
"tax_exemption_code": "",
"tax_exemption_id": "",
"is_featured": true,
"unit": ""
}
}
Use this API to update the product details.