Skip to main content

Vị trí

Mô tả

Các API hỗ trợ:

API


GET /api/inventoryPositions

Lấy danh sách các vị trí.

GET /api/inventoryPositions

Response Body
{
"code": 200,
"message": "Thành công",
"result": [
{
"id": "47110cc6-d13e-42ba-b61d-7fdf116a7d80",
"code": "warehouse_1",
"name": "Kho 1",
"description": "Mô tả kho 1",
"level": 1,
"parent_id": null
},
{
"id": "5ee7c007-2ec6-4675-abc4-7e3ee756e0d9",
"code": "zone_1",
"name": "Khu vực 1",
"description": null,
"level": 2,
"parent_id": "47110cc6-d13e-42ba-b61d-7fdf116a7d80"
},
{
"id": "5f96aae5-09d3-45a9-a18a-7a9368924884",
"code": "area_1",
"name": "Vị trí 1",
"description": null,
"level": 3,
"parent_id": "5ee7c007-2ec6-4675-abc4-7e3ee756e0d9"
},
{
"id": "25b1dcb8-d841-405e-8eff-28c2c93cafca",
"code": "warehouse_2",
"name": "Kho 2",
"description": "Mô tả kho 2",
"level": 1,
"parent_id": null
}
]
}

POST /api/inventoryPositions

Tạo mới vị trí.

Request Body

  • code: (string) Mã vị trí.

  • name: (string) Tên vị trí.

  • description: (string) Mô tả.

  • level: (array) Cấp bậc. Bao gồm 1 (Kho) | 2 (Khu vực) | 3 (Vị trí).

  • parent_id: (string) Mã vị trí cha.

Request Body
{
"code": "area_1",
"name": "Vị trí 1",
"description": "Vị trí 1",
"level": 3,
"parent_id": "bb919080-7e41-45ae-9498-0a3ed701c9ef"
}

POST /api/inventoryPositions


PUT /api/inventoryPositions/{id}

Cập nhật vị trí.

Request Body

  • name: (string) Tên vị trí.

  • description: (string) Mô tả.

Request Body
{
"name": "Vị trí 1",
"description": "Vị trí 1"
}

PUT /api/inventoryPositions/25b1dcb8-d841-405e-8eff-28c2c93cafca