Thống kê tồn — Theo sản phẩm

Báo cáo tồn kho theo từng sản phẩm.

Xem Markdown

Trả về số liệu tồn kho gộp theo sản phẩm; type = actual hoặc remain.

Endpoint

MethodEndpointMô tả
GET/api/v1/shops/{shop_id}/inventory_analytics/inventory_by_productTồn kho theo 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
start_datetruy vấnintegerCóTừ ngày (Unix)
end_datetruy vấnintegerCóĐến ngày (Unix)
typetruy vấnstringCóactual hoặc remain

Kiểm thử tại chỗ

GEThttps://pos.hitechcloud.vn/api/v1/shops/{shop_id}/inventory_analytics/inventory_by_product

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
Query
cURL mẫu
curl -X GET "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/inventory_analytics/inventory_by_product?start_date=1761868800&end_date=1761955200&type=remain" \
  -H "Authorization: Bearer YOUR_API_KEY"
Phản hồi mẫu
{
  "status": "success",
  "data": [
    {
      "product_id": "prod_5001",
      "remain": 180
    }
  ],
  "meta": {
    "pagination": {
      "total": 42,
      "page_size": 20,
      "page_number": 1,
      "total_pages": 3,
      "has_more": true
    }
  }
}