PUT Product
Developing
PUT
{{url}}api/v1/admin/products/{id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'http://ecompulse.test/api/v1/admin/products/14' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"product_type_id": 1,
"warehouse_id": 1,
"sku": "P14",
"name": "iPhone 6S Moble",
"price": 235.00,
"cost": 200.00,
"main_category_id": 1,
"category_id": 12,
"sub_category_id": 7,
"open_stock": 12,
"tax_method_id": 2,
"tax_id": 3,
"discount": 20,
"weight_based_price": 0.00,
"attributes": [
{
"attribute_id": 1,
"attribute_values": [
"8GB",
"16GB"
]
},
{
"attribute_id": 4,
"attribute_values": [
"4K",
"16K"
]
}
],
"options": [
{
"option_id": 2,
"option_values": [
{
"label": "White",
"price": 0.00,
"type": 1,
"qty": 10
},
{
"label": "Blue",
"price": 2.00,
"type": 1,
"qty": 25
}
]
}
]
}'
Response Response Example
{
"status": "success",
"message": "Product updated successfully",
"data": {
"id": 14,
"sku": "P14",
"name": "iPhone 6S Moble",
"permalink": "iphone-6s-moble",
"price": "235.00",
"cost": "200.00",
"product_net_cost": "180.00",
"product_cost_tax": "10.80",
"product_net_price": "215.00",
"product_price_tax": "12.90",
"short_description": "",
"description": "",
"discount": 20,
"weight": null,
"weight_based_price": "0.00",
"meta_description": "",
"meta_keywords": null,
"product_tags": null,
"warehouse": {
"id": 1,
"name": "Warehouse 1"
},
"product_type": {
"id": 1,
"name": "Physical Product"
},
"main_category": {
"id": 1,
"name": "Electronics"
},
"category": {
"id": 12,
"name": "Phones"
},
"sub_category": {
"id": 7,
"name": "Apple"
},
"unit": null,
"brand": null,
"tax_method": {
"id": 2,
"name": "Exclusive"
},
"tax": {
"id": 3,
"name": "GST @6%",
"rate": "6.00",
"type": "Percent (%)"
},
"price_type": null,
"attributes": [
{
"id": 1,
"name": "Memory",
"values": [
"8GB",
"16GB"
]
},
{
"id": 4,
"name": "Resolution",
"values": [
"4K",
"16K"
]
}
],
"options": {
"id": 2,
"values": [
{
"label": "White",
"price": 0,
"price_type_id": 1,
"qty": 10
}
]
},
"re_order_level": null,
"add_to_stock": null,
"open_stock": 10,
"total_qty": 10,
"image": "http://shopyx.test/images/no_img.jpg",
"video": null,
"feature_status": 0,
"banner_status": 0,
"status": 1,
"reviews": null,
"gallery": null
}
}
Request
Path Params
id
integerÂ
required
Example:
14
Header Params
Accept
stringÂ
required
Example:
application/json
X-API-Key
stringÂ
required
Example:
{{key}}
Body Params application/json
Responses
Modified at 2024-05-27 19:03:55