Tồn kho — Cập nhật một biến thể
Cập nhật tồn kho của một biến thể theo từng kho.
Cập nhật số lượng tồn của một biến thể ở một hoặc nhiều kho.
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
POST | /api/v1/shops/{shop_id}/variations/{variation_id}/update_quantity | Cập nhật tồn một biến thể |
Tham số
| Tham số | Vị trí | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
shop_id | đường dẫn | string | Có | ID cửa hàng |
variation_id | đường dẫn | string | Có | ID biến thể |
variations_warehouses | thân | object[] | Có | Danh sách {warehouse_id, remain_quantity} |
Kiểm thử tại chỗ
POST
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/variations/{variation_id}/update_quantityKiểm thử tại chỗNhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.
Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/variations/var_1001/update_quantity" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"variations_warehouses": [
{
"warehouse_id": "wh_main",
"remain_quantity": 62
}
]
}'Phản hồi mẫu
{
"status": "success",
"data": {
"variation_id": "var_1001",
"warehouse_id": "wh_main",
"remain_quantity": 62
}
}Cập nhật số lượng tồn của một biến thể ở một hoặc nhiều kho.
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
POST | /api/v1/shops/{shop_id}/variations/{variation_id}/update_quantity | Cập nhật tồn một biến thể |
Tham số
| Tham số | Vị trí | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
shop_id | đường dẫn | string | Có | ID cửa hàng |
variation_id | đường dẫn | string | Có | ID biến thể |
variations_warehouses | thân | object[] | Có | Danh sách {warehouse_id, remain_quantity} |
Kiểm thử tại chỗ
POST
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/variations/{variation_id}/update_quantityKiểm thử tại chỗNhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.
Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/variations/var_1001/update_quantity" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"variations_warehouses": [
{
"warehouse_id": "wh_main",
"remain_quantity": 62
}
]
}'Phản hồi mẫu
{
"status": "success",
"data": {
"variation_id": "var_1001",
"warehouse_id": "wh_main",
"remain_quantity": 62
}
}