Phiếu nhập kho
Domain InventorySheetIn — chỉ đọ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ường | Hỗ trợ | Kiểu | Mô tả |
|---|---|---|---|
id | eq | integer | ID phiếu |
sheet_code | eq | string | Mã chứng từ |
account_id | eq, empty | integer | Khách hàng |
account_name | eq, contains | string | Tên KH |
store_id | eq | integer | Kho nhập |
user_id | eq | integer | User |
sheet_status | eq, in | integer | Trạng thái |
order_id | eq, empty | integer | Liên kết đơn |
purchase_order_code | eq, contains | string | Mã đơn mua |
has_accounting | eq | integer | Hạch toán |
sheet_date | eq, gte, lte, between | date / datetime | Ngày phiếu |
current_and_under_user_department | eq | integer | Phòng ban |
valid_user_department | is | mixed | Phòng ban hợp lệ |
inventory_product_id | eq | integer | SP trên dòng |
inventory_product_name | eq, contains | string | Tên SP |
inventory_product_code | eq, contains | string | Mã SP |
(các inventory_product_* + custom field SP) | Theo domain | — |
Lọc lồng: sub_account.
1.3. Search
search—sheet_code.
1.4. Sorting
| Trường | Hướng |
|---|---|
id | asc, desc |
1.5. Fields
fields— CSV (needed_info). Mặc định:id.- Bảng trường truy xuất: giống tài liệu Phiếu nhập kho v6.1 (mục 1.5).
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_detailskhi 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ặcinventory_sheet_in_code=— Phiếu nhập kho v6.1.