Chuyển tới nội dung chính

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

FieldsSupportTypeDescription
ideq,inintegerĐịnh danh
product_ideq,inintegerĐịnh danh sản phẩm

Sort

Sort (field)Direction
idasc,desc

Limit & Offset

TypeDescription
LimitintegerLấy bao nhiêu bản ghi
OffsetintegerBỏ 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

FieldsSupportTypeDescription
product_ideq,inintegerĐị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

FieldsSupportTypeDescription
product_ideq,inintegerĐịnh danh sản phẩm
warehouse_ideq,inintegerĐịnh danh kho

Limit & Offset

TypeDescription
LimitintegerLấy bao nhiêu bản ghi
OffsetintegerBỏ 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/...).