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

Phiếu nhập kho

Domain InventorySheetInchỉ đọc (GET).


1. Danh sách phiếu nhập

1.1. Thông tin API

  • Endpoint: /api/v6/inventory_sheet_ins
  • Method: GET
  • Authentication: X-API-KEY

1.2. Filtering

TrườngHỗ trợKiểuMô tả
ideqintegerID phiếu
sheet_codeeqstringMã chứng từ
account_ideq, emptyintegerKhách hàng
account_nameeq, containsstringTên KH
store_ideqintegerKho nhập
user_ideqintegerUser
sheet_statuseq, inintegerTrạng thái
order_ideq, emptyintegerLiên kết đơn
purchase_order_codeeq, containsstringMã đơn mua
has_accountingeqintegerHạch toán
sheet_dateeq, gte, lte, betweendate / datetimeNgày phiếu
current_and_under_user_departmenteqintegerPhòng ban
valid_user_departmentismixedPhòng ban hợp lệ
inventory_product_ideqintegerSP trên dòng
inventory_product_nameeq, containsstringTên SP
inventory_product_codeeq, containsstringMã SP
(các inventory_product_* + custom field SP)Theo domain

Lọc lồng: sub_account.

  • searchsheet_code.

1.4. Sorting

TrườngHướng
idasc, desc

1.5. Fields

1.6. Pagination

limit, offset.

1.7. Response mẫu (danh sách)

{
"data": [
{
"id": 1200,
"sheet_code": "PNK/2026/0001",
"sheet_date": "2026-03-15",
"store_id": 1,
"store_name": "Kho chính",
"sheet_status": 2
}
],
"has_more": false,
"offset": 0,
"limited": 50,
"sorted": { "id": "DESC" }
}

1.8. Ví dụ curl

curl -g --location 'https://example.getflycrm.com/api/v6/inventory_sheet_ins?fields=id,sheet_code,sheet_date,store_id,store_name,sheet_status&filtering[store_id]=1&limit=50' \
--header 'X-API-KEY: <your_api_key>'

2. Chi tiết phiếu nhập

2.1. Thông tin API

  • Endpoint: /api/v6/inventory_sheet_ins/{id}
  • Method: GET
  • Path: {id} — ID phiếu (số nguyên dương).

2.2. Query

  • fields — CSV (giống danh sách). Response thường có sheet_details khi collector nạp dòng phiếu.

2.3. Response mẫu (rút gọn)

{
"id": 1200,
"sheet_code": "PNK/2026/0001",
"sheet_date": "2026-03-15",
"store_id": 1,
"store_name": "Kho chính",
"account_name": "Công ty ABC",
"sheet_details": [
{
"product_id": 101,
"product_code": "SP001",
"product_name": "Sản phẩm mẫu",
"quantity": 10,
"unit_name": "Cái"
}
]
}

2.4. Ví dụ curl

curl --location 'https://example.getflycrm.com/api/v6/inventory_sheet_ins/1200?fields=id,sheet_code,sheet_date,store_name,account_name,sheet_details' \
--header 'X-API-KEY: <your_api_key>'

3. Ghi chú

  • v6.1: GET /api/v6.1/inventory_sheet_in?inventory_sheet_in_id= hoặc inventory_sheet_in_code=Phiếu nhập kho v6.1.