Edit Product
Prod Env
{{subdomain}}/api2
Prod Env
{{subdomain}}/api2
PUT
{{subdomain}}/api2
Last modified:2025-04-20 12:10:30
Maintainer:Not configured
id
: Product ID (required)name
(string): Product namedescription
(string): Product descriptionunit_price
(number): Selling price per unittax1
(integer): Primary tax IDtax2
(integer): Secondary tax IDsupplier_id
(integer): ID of the supplierbrand
(string): Brand nametags
(string): Comma-separated tagsbuy_price
(number): Purchase price per unitproduct_code
(string): Unique product identifier/codetrack_stock
(integer): Stock tracking (0: disabled, 1: enabled)stock_balance
(number): Stock quantitylow_stock_thershold
(number): Low stock alert thresholdbarcode
(string): Product barcodeavailabe_online
(integer): Online availability (0: no, 1: yes)category_id
(integer): Product category IDis_active
(integer): Status (0: inactive, 1: active)custom_fields
(object): Custom field values{
"result": "success",
"code": 200,
"data": {
"Product": {
"id": 1,
// Updated product fields...
}
},
"message": "Product updated successfully"
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT '{{subdomain}}/api2/api2/products/{{id}}.json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"Product": {
"name": "Premium Widget Pro",
"unit_price": 249.99,
"description": "Updated high-quality premium widget for professional industrial applications",
"low_stock_thershold": 25,
"stock_balance": 120,
"custom_fields": {
"warranty_period": "3 years",
"certification": "ISO 9001, CE"
}
}
}'
Response Response Example
200 - Success Response
{
"result": "success",
"code": 200,
"data": {
"Product": {
"id": 1,
"name": "Premium Widget Pro",
"unit_price": 249.99,
"description": "Updated high-quality premium widget for professional industrial applications",
"low_stock_thershold": 25,
"modified": "2023-03-24 09:15:22"
}
},
"message": "Product updated successfully"
}
Request
Body Params text/plain