Sản phẩm — Cập nhật

Cập nhật thông tin sản phẩm và biến thể.

Xem Markdown

Cập nhật một sản phẩm theo product_id.

Endpoint

MethodEndpointMô tả
PUT/api/v1/shops/{shop_id}/products/{product_id}Cập nhật sản phẩm

Tham số

Tham sốVị tríKiểuBắt buộcMô tả
shop_idđường dẫnstringCóID cửa hàng
product_idđường dẫnstringCóID sản phẩm
namethânstringKhôngTên sản phẩm

Kiểm thử tại chỗ

PUThttps://pos.hitechcloud.vn/api/v1/shops/{shop_id}/products/{product_id}

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 (PUT)
curl -X PUT "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/products/prod_5001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "product": {
    "name": "Ao thun premium",
    "retail_price": 249000
  }
}'
Phản hồi mẫu
{
  "status": "success",
  "data": {
    "id": "prod_5001",
    "name": "Ao thun premium"
  }
}