Danh sách PO
Mô tả
Các API hỗ trợ:
-
GET /poTickets: Lấy danh sách các phiếu po.
-
GET /poTickets/{id}: Lấy chi tiết 1 phiếu po.
-
POST /poTickets: Tạo mới phiếu po.
-
PUT /poTickets/{id}: Cập nhật phiếu po.
-
DELETE /poTickets/{id}: Xóa phiếu po.
API
GET /api/poTickets
Lấy danh sách các phiếu po, hỗ trợ các tham số filter sau:
| Tên trường | Kiểu dữ liệu | Mô tả |
|---|---|---|
| code | string | Mã phiếu |
| merchant_product_id | string | Mã hàng hóa |
| created_from | string | Từ ngày |
| created_to | string | Đến ngày |
| status | string | Trạng thái |
| sort | integer | Tên trường sắp xếp |
| order | integer | Thứ tự sắp xếp |
| page | integer | Trang |
| size | integer | Số bản ghi trên trang |
Trạng thái bao gồm: moi | dang_in | da_in
GET /api/poTickets?page=1&size=10&sort=code&order=asc&code=po&merchant_product_id=&status=&created_from=2024-01-01T10%3A00%3A00Z&created_to=2025-01-01T10%3A00%3A00Z
{
"code": 200,
"message": "Success",
"result": [
{
"id": "96366315-a7f2-469c-97e5-0b51f2b0d740",
"code": "0321_po",
"name": "0321_po",
"created_at": "2024-03-21T06:52:28.000Z",
"status": "da_in",
"total_quantity": 1,
"total_quantity_not_printed": 0
}
],
"page": 1,
"page_size": 10,
"total": 1
}
GET /api/poTickets/{id}
Lấy chi tiết 1 phiếu po.
GET /api/poTickets/96366315-a7f2-469c-97e5-0b51f2b0d740
{
"code": 200,
"message": "Thành công",
"result": [
{
"id": "af15d96d-acf5-4f0c-b223-eb82ded87081",
"product_id": "d529573a-f87c-4233-a917-13ad74349f35",
"merchant_product_id": "408799",
"name": "Andie Relaxed Shirt_2775TAND-ALFL",
"category": "Ready to wear",
"price": 5000999.0,
"quantity": 1,
"is_printed": 1,
"col_1": "",
"col_2": "",
"col_3": "",
"col_4": "",
"col_5": null,
"col_6": null,
"col_7": null,
"col_8": null,
"col_9": null,
"col_10": null
}
]
}
POST /api/poTickets
Tạo mới phiếu po.
Request Body
-
code: (string) Mã phiếu. -
name: (string) Tên phiếu. -
poTicketDetails: (array) Danh sách sản phẩm. -
merchant_product_id: (string) Mã hàng hóa. -
quantity: (int) Số lượng.
{
"code": "ticket code",
"name": "Ticket name",
"poTicketDetails": [
{
"merchant_product_id": "393547",
"quantity": 1
},
{
"merchant_product_id": "393548",
"quantity": 3
}
]
}
POST /api/poTickets
PUT /api/poTickets/{id}
Cập nhật phiếu po.
Request Body
-
code: (string) Mã phiếu. -
name: (string) Tên phiếu. -
poTicketDetails: (array) Danh sách sản phẩm. -
merchant_product_id: (string) Mã hàng hóa. -
quantity: (int) Số lượng.
{
"code": "ticket code",
"name": "Ticket name",
"poTicketDetails": [
{
"merchant_product_id": "393547",
"quantity": 1
},
{
"merchant_product_id": "393548",
"quantity": 3
}
]
}
PUT /api/poTickets/5e649b94-a657-4b2f-b1d7-3a9606c73006
DELETE /poTickets/{id}
Xóa phiếu po.
DELETE /api/poTickets/5e649b94-a657-4b2f-b1d7-3a9606c73006