Thống kê tồn — Theo biến thể

Báo cáo tồn kho theo từng biến thể.

Xem Markdown

Trả về số liệu tồn kho theo biến thể trong khoảng thời gian; type = actual hoặc remain.

Endpoint

MethodEndpointMô tả
GET/api/v1/shops/{shop_id}/inventory_analytics/inventory_by_variationTồn kho theo biến thể

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_variation

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_variation?start_date=1761868800&end_date=1761955200&type=remain" \
  -H "Authorization: Bearer YOUR_API_KEY"
Phản hồi mẫu
{
  "status": "success",
  "data": [
    {
      "variation_id": "var_1001",
      "remain": 62,
      "warehouse_id": "wh_main"
    }
  ],
  "meta": {
    "pagination": {
      "total": 42,
      "page_size": 20,
      "page_number": 1,
      "total_pages": 3,
      "has_more": true
    }
  }
}