รายการรีวิวสินค้า
บทนำ
รับรายการรีวิวสำหรับสินค้าที่ระบุ:
เอนด์พอยต์ API
bash
POST /product/v1/reviewListเนื้อความคำขอ
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
filter | object | ไม่ | พารามิเตอร์ตัวกรอง |
orderby | array | ไม่ | พารามิเตอร์การจัดเรียง |
page | integer | ไม่ | ค่าเริ่มต้น: 1 |
pagesize | integer | ไม่ | ค่าเริ่มต้น: 10 |
พารามิเตอร์ตัวเลือกของ filter
| ฟิลด์ | ประเภท | จำเป็น | คำอธิบาย |
|---|---|---|---|
product_id | string | ใช่ | ID สินค้า |
พารามิเตอร์ตัวเลือกของ orderby
| ฟิลด์ | จำเป็น | คำอธิบาย |
|---|---|---|
rating | ไม่ | คะแนน |
review_id | ไม่ | ID รีวิว |
ตัวอย่างคำขอ
bash
curl 'https://openapi.fastmoss.com/product/v1/reviewList' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxxxxxxx' \
--data '{
"filter": {
"product_id": "1729448464509734958"
},
"orderby": {
"field": "rating",
"order": "desc"
},
# "orderby": {
# "field": "review_id",
# "order": "desc"
# },
"page": 1,
"pagesize": 10
}'เนื้อความการตอบกลับ
data.list
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
review_id | string | ID รีวิว |
uid | string | ID ผู้ใช้ |
sku_id | string | ID SKU |
sku_specification | string | ข้อมูลจำเพาะ SKU |
rating | int | คะแนน |
digg_count | int | จำนวนถูกใจ |
content | string | เนื้อหาความคิดเห็น |
create_time | timestamp | เวลาที่สร้าง |
data.total
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
total | string | จำนวนรายการทั้งหมด |
ตัวอย่างการตอบกลับ
json
{
"code": 0,
"data": {
"list": [
{
"review_id": "7354810045655336747",
"sku_id": "1729448464509800494",
"sku_specification": "Item: Default",
"rating": 5,
"digg_count": 0,
"content": "",
"create_time": 1712425181310
},
],
"total": "3809"
},
"message": "success",
"timestamp": 1743573480,
"request_id": "efd631c4-92cf-5d27-4f41-de09f20dd714"
}