Skip to main content

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

ParameterTypeRequiredDescription
product-idstringBắt buộcID of the product to update

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"
}
FieldTypeRequiredDescription
shopIdstringBắt buộcID of the shop that owns the product
namestringTùy chọnProduct name
slugstringTùy chọnFriendly (SEO) URL path of the product
aliasNamestringTùy chọnInternal reference name
descriptionstringTùy chọnProduct description
pricenumberTùy chọnSelling price
originPricenumberTùy chọnOriginal price
categoryIdstringTùy chọnProduct category ID
statusstringTùy chọnProduct status: active or inactive
vatnumberTùy chọnVAT tax (%)
imagesarray<string>Tùy chọnList of product image URLs
itemSkustringTùy chọnProduct's shared SKU code
barcodestringTùy chọnProduct barcode
Note
  • Only shopId is required, all other fields are optional — only send the fields you want to change.
  • If slug is not passed, or the product doesn't currently have a slug, the system will automatically generate a new slug based on name.
  • This API is only used to update general product information. Updating variants (SKU/variants) requires using the dedicated product variants API.

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"
}
}