# Customer Wish List
# Get Customer Wish List
Sử dụng API này để lấy thông tin các sản phẩm mua sau, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"totalCnt": 1,
"items": [
{
"id": 2,
"customerId": 1,
"productId": 1,
"quantity": 10,
"deleted": false,
"createdBy": 1,
"updatedBy": null,
"createdAt": "2021-07-26T02:56:10.000Z",
"updatedAt": "2021-07-26T02:56:10.000Z",
"product": {
"id": 1,
"name": "Lưỡi cưa 001",
"slug": null,
"eic": null,
"mpn": null,
"uom": null,
"companyId": 0,
"supplierId": 1,
"description": null,
"content": null,
"specification": null,
"categoryId": 1,
"images": null,
"tags": null,
"price": 12000,
"supplierPrice": 11000,
"promotionCode": null,
"warrantyZone": null,
"shipMethodId": 1,
"specialRequest": null,
"rate": 0,
"brand": null,
"deleted": 0,
"createdBy": 0,
"updatedBy": null,
"startDate": null,
"endDate": null,
"upSellId": null,
"groupingId": null,
"crossSellIds": null,
"productCustomIds": null,
"variantTemplateTypeId": 0,
"createdAt": null,
"updatedAt": null
}
}
]
}
}
curl -X POST http://localhost:3000/customerWishList/ei/getList \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{}'
# Add New Customer Wish List
Sử dụng API này để khách hàng thêm sản phẩm vào wish list, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
productId | Number | ✔️ | |
quantity | Number | ✔️ |
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"totalCnt": 1,
"items": {
"deleted": false,
"updatedBy": null,
"id": 3,
"quantity": 15,
"productId": 1,
"customerId": 1,
"createdBy": 1,
"updatedAt": "2021-07-26T03:27:12.171Z",
"createdAt": "2021-07-26T03:27:12.171Z"
}
}
}
curl -X POST http://localhost:3000/customerWishList/ei/add \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"productId": 1,
"quantity": 15
}'
# Update Customer Wish List
Sử dụng API này để cập nhật số lượng của sản phẩm trong wish list, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
customerWishListId | Number | ✔️ | |
quantity | Number | ✔️ |
# Response
{
"status": true,
"messageCode": "",
"messageContent": "updated",
"data": {
"totalCnt": 0,
"items": {
"id": 1,
"customerId": 1,
"productId": 1,
"quantity": 12,
"deleted": false,
"createdBy": 1,
"updatedBy": 1,
"createdAt": "2021-07-26T02:23:04.000Z",
"updatedAt": "2021-07-26T02:49:04.000Z"
}
}
}
curl -X POST http://localhost:3000/customerWishList/ei/update \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"customerWishListId":"1",
"quantity":"12"
}'
# Remove Customer Wish List
Sử dụng API này để xóa wish list item, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
customerWishListId | Number | ✔️ |
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"totalCnt": 0,
"items": {
"id": 2,
"customerId": 1,
"productId": 1,
"quantity": 10,
"deleted": false,
"createdBy": 1,
"updatedBy": null,
"createdAt": "2021-07-26T02:56:10.000Z",
"updatedAt": "2021-07-26T02:56:10.000Z"
}
}
}
curl -X POST http://localhost:3000/customerWishList/ei/remove \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"customerWishListId":"2"
}'