Update Product
This API helps you update the information of an existing product in the system, based on the product-id provided in the URL.
You only need to pass the fields you want to change in the request body — fields not passed will keep their current value.
Endpoint
🔗Endpoint Staging
PATCH https://staging-manage.api.miniai.vn/api/external/v1/products/{product-id}
Example
https://staging-manage.api.miniai.vn/api/external/v1/products/68c93dba802d36826bc45c9c
🔗Endpoint Production
PATCH https://manage-api.miniap.vn/api/external/v1/products/{product-id}
Path Params
| Parameter | Type | Required | Description |
|---|---|---|---|
product-id | string | Bắt buộc | ID of the product to update |
Request Body
- Request Body
{
"shopId": "64204a17a5a97a86f12e1f0a",
"name": "Product name (updated)",
"slug": "ten-san-pham-da-cap-nhat",
"aliasName": "Internal reference name",
"description": "New product description",
"price": 25000,
"originPrice": 20000,
"categoryId": "685ba1be4792d338d2ec3cbe",
"status": "active",
"vat": 5,
"images": [
"https://dmcl0k8mc5oht.cloudfront.net/64204a17a5a97a86f12e1f0a/e888246f-2647-42f1-9d89-53eacdb7bf64.webp"
],
"itemSku": "Sku",
"barcode": "12344"
}
| Field | Type | Required | Description |
|---|---|---|---|
shopId | string | Bắt buộc | ID of the shop that owns the product |
name | string | Tùy chọn | Product name |
slug | string | Tùy chọn | Friendly (SEO) URL path of the product |
aliasName | string | Tùy chọn | Internal reference name |
description | string | Tùy chọn | Product description |
price | number | Tùy chọn | Selling price |
originPrice | number | Tùy chọn | Original price |
categoryId | string | Tùy chọn | Product category ID |
status | string | Tùy chọn | Product status: active or inactive |
vat | number | Tùy chọn | VAT tax (%) |
images | array<string> | Tùy chọn | List of product image URLs |
itemSku | string | Tùy chọn | Product's shared SKU code |
barcode | string | Tùy chọn | Product barcode |
Note
- Only
shopIdis required, all other fields are optional — only send the fields you want to change. - If
slugis not passed, or the product doesn't currently have aslug, the system will automatically generate a newslugbased onname. - This API is only used to update general product information. Updating variants (SKU/variants) requires using the dedicated product variants API.
Response
- Response
{
"success": true,
"message": "success",
"data": {
"_id": "68c93dba802d36826bc45c9c",
"type": "product",
"name": "Product name (updated)",
"description": "New product description",
"search": "ten san pham da cap nhat sku 12344",
"images": [
"https://dmcl0k8mc5oht.cloudfront.net/64204a17a5a97a86f12e1f0a/e888246f-2647-42f1-9d89-53eacdb7bf64.webp"
],
"subItemsGroupIds": [],
"price": 25000,
"originPrice": 20000,
"configs": [],
"tags": "",
"hashtags": [],
"canBook": false,
"shopId": "64204a17a5a97a86f12e1f0a",
"collectionIDs": [],
"status": "active",
"totalRating": 0,
"totalReview": 0,
"reservedQuantity": 0,
"totalQuantity": 0,
"isNullSortOrder": true,
"isCustomerInquiry": false,
"platform": "mini_app",
"brandProductIds": [],
"fakeReviewIds": [],
"comboItems": [],
"createdAt": "2025-09-16T10:36:42.809Z",
"updatedAt": "2025-09-16T11:02:10.221Z",
"__v": 0,
"customPriceId": null,
"slug": "ten-san-pham-da-cap-nhat",
"updatedBy": "64204a17a5a97a86f12e1f0a",
"virtualSold": 0,
"aliasName": "Internal reference name",
"barcode": "12344",
"categoryId": "685ba1be4792d338d2ec3cbe",
"itemSku": "Sku",
"vat": 5,
"id": "68c93dba802d36826bc45c9c"
}
}