OVIRO LogoOVIRO
WMS - InventoryLịch sử nhập/xuất theo Serial/IMEI

Thêm bản ghi Serial/IMEI

Tạo mới một bản ghi lịch sử nhập/xuất theo Serial/IMEI

Endpoint

POST /v1/productreceiptdetailserials

Quyền: inventory.view

Request Payload

JSON Object Payload:

{
    "product_receipt_id": 200,
    "product_receipt_detail_id": 300,
    "product_id": 50,
    "product_variant_id": 75,
    "warehouse_id": 1,
    "direction": 3,
    "quantity": 1,
    "quantity_signed": 1,
    "serial_code": "IMEI-352789104562831",
    "match_status": 1,
    "match_origin_id": 0,
    "status": 1,
    "note": "Nhập kho từ đơn mua hàng PO-2024-001",
    "date_match_checked": 0
}
TrườngKiểuBắt buộcMô tả
product_receipt_idintID phiếu nhập/xuất kho
product_receipt_detail_idintID chi tiết phiếu nhập/xuất kho
product_idintID sản phẩm
product_variant_idintID biến thể sản phẩm
warehouse_idintID kho
directionintHướng nhập/xuất (Xem constant DIRECTION_*)
quantityintSố lượng
quantity_signedintSố lượng có dấu (âm nếu xuất, dương nếu nhập)
serial_codestringMã Serial/IMEI (không được để trống)
match_statusintTrạng thái đối soát (Xem constant MATCH_STATUS_*)
match_origin_idintID bản ghi gốc để đối soát
statusintTrạng thái (Xem constant STATUS_*)
notestringGhi chú
date_match_checkedintNgày kiểm tra đối soát (Unix timestamp)

Lưu ý: Các trường company_idcreator_id được hệ thống tự động gán từ thông tin phiên đăng nhập khi tạo mới.

Response Schema

HTTP 201 - JSON Object

Xem ProductReceiptDetailSerial Object Schema.

Error Codes

HTTPCodeMô tả
422error_serial_code_requiredMã Serial/IMEI không được để trống
422error_status_not_existGiá trị trạng thái không hợp lệ
422error_direction_not_existGiá trị hướng nhập/xuất không hợp lệ
500(dynamic)Lỗi hệ thống

On this page