Skip to main content

Edit Product

Update product information

Edit product by ID

HTTP Request

PUT /api/v3/products/ID
Where ID is the product ID

Body

ParameterTypeDefaultRequireDescription
product_codestringProduct code, if not provided, a new one will be automatically added, no duplicate check is performed
product_namestringyesProduct name
descriptionstringProduct description
short_descriptionstringShort product description
cover_pricefloatSelling price, this is the default price of the product
discountintProduct discount. For example 5%, 10%
price_wholesalefloatWholesale price, if not available, do not provide
discount_wholesaleintWholesale discount
price_onlinefloatOnline selling price
discount_onlineintOnline discount
saleoff_pricefloatSale off price
unit_idintUnit of measurement, please refer to the Unit API
category_idintProduct category, please refer to the Product Category API
origin_idintProduct origin
manufacturer_idintManufacturer
custom_fieldsarrayAdditional defined information about the product, please refer to the example for the data structure
{
"product": {
"product_code": "SP00001",
"product_name": "New product added from API",
"description": "This is a long description",
"short_description": "This is a short description",
"cover_price": "200000",
"discount": 5,
"price_wholesale": 160000,
"discount_wholesale": 10,
"price_online": 185000,
"discount_online": 0,
"saleoff_price": 180000,
"unit_id": 2,
"category_id": 4,
"origin_id": 5,
"manufacturer_id": 5
},
"custom_fields": {
"brand": "From Japan",
"warranty": "10 years",
"power_output": "200"
}
}

Edit product by code

HTTP Request

PUT /api/v3/products
Where PRODUCT_CODE is the product code

Body

ParameterTypeDefaultRequireDescription
product_codestringProduct code, if not provided, a new one will be automatically added, no duplicate check is performed
product_namestringyesProduct name
descriptionstringProduct description
short_descriptionstringShort product description
cover_pricefloatSelling price, this is the default price of the product
discountintProduct discount. For example 5%, 10%
price_wholesalefloatWholesale price, if not available, do not provide
discount_wholesaleintWholesale discount
price_onlinefloatOnline selling price
discount_onlineintOnline discount
saleoff_pricefloatSale off price
unit_idintUnit of measurement, please refer to the Unit API
category_idintProduct category, please refer to the Product Category API
origin_idintProduct origin
manufacturer_idintManufacturer
custom_fieldsarrayAdditional defined information about the product, please refer to the example for the data structure
{
"product_code": "PRODUCT_CODE",
"product": {
"product_code": "SP00001",
"product_name": "New product added from API",
"description": "This is a long description",
"short_description": "This is a short description",
"cover_price": "200000",
"discount": 5,
"price_wholesale": 160000,
"discount_wholesale": 10,
"price_online": 185000,
"discount_online": 0,
"saleoff_price": 180000,
"unit_id": 2,
"category_id": 4,
"origin_id": 5,
"manufacturer_id": 5
},
"custom_fields": {
"brand": "From Japan",
"warranty": "10 years",
"power_output": "200"
}
}