Skip to main content

Encode RFID (mobile)

Mô tả​

API ghi / áp dụng RFID cho mobile. Các API hỗ trợ:

API​


POST /api/ecodes/info​

Lấy thông tin để ghi tag RFID.

Request Body​

Tên trườngKiểu dữ liệuMô tảBắt buộc
merchant_product_idstringMã hàng hóaKhông
old_rfidstring[]RFID cũ (nếu ghi đè)Không
is_write_chipbooleanGhi chipKhông
is_rewritebooleanEncode lại. Bỏ qua kiểm tra RFID đang activeKhông

POST /api/ecodes/info

Request Body
{
"merchant_product_id": "000009",
"old_rfid": [],
"is_write_chip": true,
"is_rewrite": false
}

result.items là danh sách tag cần ghi.

Tên trườngKiểu dữ liệuMô tả
idstringId lịch sử encode
old_rfidstringRFID cũ
rfidstringEPC mới
product_serialintegerSerial
Response Body
{
"code": 200,
"message": "Success",
"result": {
"items": [
{
"id": "{encode-id}",
"old_rfid": null,
"rfid": "E280…",
"product_serial": 1
}
]
}
}

POST /api/ecodes/apply/batch​

Áp dụng kết quả encode vào tồn kho theo lô.

Request Body​

Tên trườngKiểu dữ liệuMô tảBắt buộc
warehouse_idstringId khoCó
is_increase_inventorybooleanCó tăng tồn khi applyKhông
itemsobject[]Danh sách kết quả encodeKhông
items[].idstringId bản ghi encodeCó (trong từng item)

POST /api/ecodes/apply/batch

Request Body
{
"warehouse_id": "{uuid}",
"is_increase_inventory": true,
"items": [{ "id": "{encode-id}" }]
}
Response Body
{
"code": 200,
"message": "Success",
"result": true
}