Sửa sản phẩm
Cập nhật thông tin một sản phẩm
Sửa sản phẩm theo Id
HTTP Request
[PUT] /api/v6/products/{id}
Query Parameters
| Parameter | Type | Nullable | Require | Description |
|---|---|---|---|---|
| product_name | string | Tên sản phẩm | ||
| product_code | string | Mã sản phẩm | ||
| product_vat | numeric | VAT sản phẩm | ||
| manufacturer_id | integer | yes | Nhà sản xuất | |
| short_description | string | Mô tả ngắn | ||
| description | string | Mô tả | ||
| is_affiliate | integer | Là sản phẩm liên kết | ||
| category_id | integer | yes | Danh mục sản phẩm | |
| origin_id | integer | yes | Nguồn gốc | |
| unit_id | integer | yes | Đơn vị tính | |
| cover_price | numeric | Giá bán lẻ | ||
| discount | numeric | Chiết khấu sản phẩm | ||
| price_wholesale | numeric | Giá bán buôn | ||
| discount_wholesale | numeric | Chiết khấu bán buôn | ||
| price_average_in | numeric | Giá mua | ||
| discount_in | numeric | Chiết khấu giá mua | ||
| price_online | numeric | Giá bán online | ||
| discount_online | numeric | Chiết khấu bán online | ||
| saleoff_price | numeric | Chiết khấu online | ||
| services | bool | Là sản phẩm dịch vụ | ||
| barcode | string | Mã Barcode | ||
| barcode_image | string | Ảnh Barcode | ||
| attributes | array | Thuộc tính | ||
| attributes.*.attribute_id | integer | yes | Định danh thuộc tính | |
| attributes.*.attribute_name | string | Tên thuộc tính | ||
| attributes.*.attribute_content | string | Nội dung thuộc tính | ||
| custom_fields | array | Trường tùy biến | ||
| removed_attachment_ids | integer[] | Sinh nhật liên hệ chính | ||
| removed_image_ids | integer[] | Sinh nhật liên hệ chính |
custom_fields có thể có thể lấy ở API danh sách custom fields