Tồn kho sản phẩm
Lấy thông tin tồn kho sản phẩm
HTTP Request
[GET] /api/v6.1/product/inventories
Query Parameters
Filtering
| Fields | Support | Type | Description |
|---|---|---|---|
| id | eq,in | integer | Định danh |
| product_id | eq,in | integer | Định danh sản phẩm |
Sort
| Sort (field) | Direction |
|---|---|
| id | asc,desc |
Limit & Offset
| Type | Description | |
|---|---|---|
| Limit | integer | Lấy bao nhiêu bản ghi |
| Offset | integer | Bỏ qua bao nhiêu bản ghi |
Example
HTTP Request
GET api/v6.1/product/inventories HTTP/1.1
Host: example.getflycrm.com
Status
200 OK
Response
{
"data": [
{
"id": 1,
"product_id": 101,
"product_code": "SP001",
"product_name": "Sản phẩm A",
"quantity": 150,
"warehouse_name": "Kho chính"
}
],
"has_more": false,
"offset": 0,
"limited": 20
}
Số lượng tồn kho
HTTP Request
[GET] /api/v6.1/product/quantity
Query Parameters
Filtering
| Fields | Support | Type | Description |
|---|---|---|---|
| product_id | eq,in | integer | Định danh sản phẩm |
Example
HTTP Request
GET api/v6.1/product/quantity?filtering[product_id]=101 HTTP/1.1
Host: example.getflycrm.com
Status
200 OK
Response
{
"quantity": 150
}
Sản phẩm trong kho
HTTP Request
[GET] /api/v6.1/product/store_quantity
Query Parameters
Filtering
| Fields | Support | Type | Description |
|---|---|---|---|
| product_id | eq,in | integer | Định danh sản phẩm |
| warehouse_id | eq,in | integer | Định danh kho |
Limit & Offset
| Type | Description | |
|---|---|---|
| Limit | integer | Lấy bao nhiêu bản ghi |
| Offset | integer | Bỏ qua bao nhiêu bản ghi |
Example
HTTP Request
GET api/v6.1/product/store_quantity HTTP/1.1
Host: example.getflycrm.com
Status
200 OK
Response
{
"data": [
{
"product_id": 101,
"product_name": "Sản phẩm A",
"warehouse_id": 1,
"warehouse_name": "Kho chính",
"quantity": 100
}
],
"has_more": false,
"offset": 0,
"limited": 20
}
Xem thêm
- Kho: danh sách kho, báo cáo tồn theo thời điểm, phiếu nhập/xuất/chuyển/kiểm kho, thẻ kho (
/api/v6.1/...).