WMS - InventoryPhiếu nhập/xuất kho
Lấy chi tiết dòng hàng của phiếu
Lấy toàn bộ dòng hàng (ProductReceiptDetail) của một phiếu nhập/xuất kho
Endpoint
GET /v1/productreceiptdetails/receipt/:receipt_id
Quyền:
inventory.view. Giá vốn (item_unit_cost,uom_unit_cost) chỉ trả về khi người dùng có quyềnproduct.viewcost, ngược lại trả về0. Người dùng chỉ được phân quyền trên một số kho chỉ xem được phiếu thuộc các kho đó.
Path Parameters
| Tên | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
receipt_id | int | Có | ID của phiếu nhập/xuất |
Response Schema
HTTP 200 - JSON Object
| Trường | Kiểu | Mô tả |
|---|---|---|
total | int | Số dòng trả về |
currentpage | int | Luôn là 1 |
limit | int | Số dòng tối đa trả về (5000) |
items | array | Mảng ProductReceiptDetail Object, sắp xếp theo id tăng dần |
Error Codes
| HTTP | Code | Mô tả |
|---|---|---|
| 403 | error_role_not_available | Người dùng không có quyền inventory.view |
| 404 | (not found) | Không tìm thấy phiếu, phiếu không thuộc công ty hoặc thuộc kho mà người dùng không được phân quyền |
Ví dụ Response
{
"total": 1,
"currentpage": 1,
"limit": 5000,
"items": [
{
"id": 567,
"company_id": 1,
"creator_id": 101,
"product_id": 200,
"product_variant_id": 201,
"product_receipt_id": 12345,
"sku": "SP001",
"item_type": 1,
"item_serial_number": "",
"item_option_value_id_list": [],
"item_quantity_initial": 50,
"item_quantity": 50,
"item_quantity_signed": 50,
"item_unit_cost": 10000,
"item_date_deleted": 0,
"is_catch_weight": 0,
"uom_id": 1,
"uom_name": "Cái",
"uom_factor": 1,
"uom_quantity_initial": 50,
"uom_quantity": 50,
"uom_unit_cost": 10000,
"order_detail_id": 0,
"order_detail_type": 0,
"bundle_identifier": "",
"bundle_promotion_id": 0,
"bundle_promotion_product_id": 0,
"bundle_promotion_multiplier": 0,
"bundle_index": 0,
"bundle_allocation_rule": "",
"bundle_discount_allocated": 0,
"bundle_promotion_name": "",
"bundle_promotion_type": 0,
"weight_sale_mode": 0,
"weight_preset_id": "",
"weight_preset_name": "",
"weight_preset_factor": 0,
"pricing_type": 0,
"catch_counting_initial": 0,
"catch_counting": 0,
"catch_counting_signed": 0,
"date_created": 1678888888,
"date_modified": 1678888888,
"date_fulfilled": 0,
"error": "",
"product_receipt": null
}
]
}