Thống kê tồn — Theo sản phẩm
Báo cáo tồn kho theo từng sản phẩm.
Trả về số liệu tồn kho gộp theo sản phẩm; type = actual hoặc remain.
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
GET | /api/v1/shops/{shop_id}/inventory_analytics/inventory_by_product | Tồn kho theo sản phẩm |
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 |
start_date | truy vấn | integer | Có | Từ ngày (Unix) |
end_date | truy vấn | integer | Có | Đến ngày (Unix) |
type | truy vấn | string | Có | actual hoặc remain |
Kiểm thử tại chỗ
GET
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/inventory_analytics/inventory_by_productKiể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
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
}
}
}Trả về số liệu tồn kho gộp theo sản phẩm; type = actual hoặc remain.
Endpoint
| Method | Endpoint | Mô tả |
|---|---|---|
GET | /api/v1/shops/{shop_id}/inventory_analytics/inventory_by_product | Tồn kho theo sản phẩm |
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 |
start_date | truy vấn | integer | Có | Từ ngày (Unix) |
end_date | truy vấn | integer | Có | Đến ngày (Unix) |
type | truy vấn | string | Có | actual hoặc remain |
Kiểm thử tại chỗ
GET
https://pos.hitechcloud.vn/api/v1/shops/{shop_id}/inventory_analytics/inventory_by_productKiể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
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
}
}
}