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

Kiểm tra Tồn kho

Lấy ra số lượng tồn kho theo mã sản sản phẩm hoặc theo id sản phẩm

Tổng sản phẩm tồn​

Lấy ra số lượng của một sản phẩm trong tất cả các kho

HTTP Request​

[GET] /api/v6/products/quantity

Example​

HTTP Request

GET api/v6/products/quantity HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json

Status

200 OK

Response

{
"total_quantity": 299
}

Tổng sản phẩm tồn theo kho​

Lấy ra số lượng của một sản phẩm trong từng kho

HTTP Request​

[GET] /api/v6/products/store_quantity

Example​

HTTP Request

GET api/v6/products/store_quantity HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json

Status

200 OK

Response

{
"data": [
{
"id": 2,
"store_name": "Kho Phèo",
"total_quantity": 299
}
],
"offset": 0,
"limited": false,
"sorted": {
"id": "DESC"
}
}

Tồn kho theo sản phẩm​

Trả về danh sách các sản phẩm tồn tại tất cả các kho

HTTP Request​

[GET] /api/v6/products/inventories

Query Parameters​

Fields​

FieldsTypeDescription
idintegerĐịnh danh
product_idintegerĐịnh danh sản phẩm
product_codestringMã sản phẩm
product_namestringTên sản phẩm
cover_pricefloatGiá sản phẩm
quantityintegerSố lượng
cover_imagestringẢnh sản phẩm

Filtering​

FieldsSupportTypeDescription
product_ideq,inintegerĐịnh danh sản phẩm
product_nameeq,containsstringTên sản phẩm
product_codeeqstringMã 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/products/inventories HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json

Status

200 OK

Response

{
"data": [
{
"product_id": 21,
"product_code": "SP0021",
"product_name": "sữa rửa mặt",
"cover_price": 800,
"quantity": 1,
"cover_image": "https://xxx.getflycrm.com/assets/images/no-product.jpg"
}
],
"has_more": false,
"offset": 0,
"limited": 1
}

Xem thêm​

  • Kho: danh sách kho, báo cáo tồn, phiếu nhập/xuất/chuyển/kiểm kho, thẻ kho (/api/v6/...).