Skip to main content

Phiếu đếm

Mô tả​

Các API hỗ trợ:

API​


GET /api/countingTickets​

Danh sách phiếu đếm:

Tham số query:

Tên trườngKiểu dữ liệuMô tảBắt buộc
namestringTên phiếuKhông
created_fromstringyyyy-MM-dd'T'HH:mm:ssKhông
created_tostringyyyy-MM-dd'T'HH:mm:ssKhông
pageintegerTrangKhông
sizeintegerSố bản ghi trên trangKhông
sortstringTên trường sắp xếpKhông
orderstringasc / descKhông

GET /api/countingTickets?page=1&size=10

result là mảng phiếu đếm: id, code, name, total_quantity, source, source_id, warehouse_id, zone_id, area_id, surplus, strange, created_at, created_by, updated_at, updated_by.

Response Body
{
"code": 200,
"message": "Success",
"result": [
{
"id": "{uuid}",
"code": "IVT_13102026_103000",
"name": "Đếm 1",
"total_quantity": 2,
"source": "counting_ticket",
"source_id": null,
"warehouse_id": "{uuid}",
"zone_id": null,
"area_id": null,
"surplus": 0,
"strange": 0,
"created_at": "2026-10-13T09:00:00",
"created_by": "merchant_user",
"updated_at": null,
"updated_by": null
}
],
"page": 1,
"page_size": 20,
"total": 1
}

POST /api/countingTickets​

Tạo phiếu đếm theo danh sách EPC/RFID.

Request Body​

Tên trườngKiểu dữ liệuMô tảBắt buộc
namestringTên phiếu (tối đa 150)Có
sourcestringinventory_in_ticketinventory_out_ticket
source_idstringId phiếu nguồnKhông
warehouse_idstringId kho (tối đa 36)Có
zone_idstringId zoneKhông
area_idstringId vị tríKhông
tagsobject[]Danh sách thẻCó
tags[].epcstringEPC/RFID (tối đa 128)Có
tags[].merchant_product_idstringMã hàng hóa (encode)Không
tags[].merchant_product_detail_idstringMã mẫu / SKUKhông

POST /api/countingTickets

Request Body
{
"name": "Đếm 1",
"warehouse_id": "{uuid}",
"tags": [{ "epc": "E2801191A50300683..." }]
}
Response Body
{
"code": 200,
"message": "Success",
"result": true
}

DELETE /api/countingTickets/{id}​

Xóa phiếu đếm.

DELETE /api/countingTickets/\{id\}

Response Body
{
"code": 200,
"message": "Success",
"result": true
}

GET /api/countingTickets/{id}/countingTicketDetails​

Chi tiết dòng phiếu đếm:

Tham số query:

Tên trườngKiểu dữ liệuMô tảBắt buộc
product_idstringLọc theo sản phẩmKhông
pageintegerTrangKhông
sizeintegerSố bản ghi / trangKhông

GET /api/countingTickets/\{id\}/countingTicketDetails?page=1&size=50

Không có product_id: gom theo hàng cha, thêm has_variants, variant_count. Có product_id: thêm product_detail_id. rfid là chuỗi các mã, cách nhau bởi dấu phẩy.

Response Body
{
"code": 200,
"message": "Success",
"result": [
{
"product_id": "{uuid}",
"product_detail_id": null,
"merchant_product_id": "408798",
"rfid": "E280…",
"product_name": "Andie Shirt",
"category": "Ready",
"quantity": 2,
"price": 500000,
"col_1": null,
"col_2": null,
"col_3": null,
"col_4": null,
"col_5": null,
"col_6": null,
"col_7": null,
"col_8": null,
"col_9": null,
"col_10": null,
"has_variants": false,
"variant_count": 0
}
],
"page": 1,
"page_size": 50,
"total": 1
}