Skip to content

รายการรีวิวสินค้า

บทนำ

รับรายการรีวิวสำหรับสินค้าที่ระบุ:

เอนด์พอยต์ API

bash
    POST /product/v1/reviewList

เนื้อความคำขอ

ฟิลด์ประเภทจำเป็นคำอธิบาย
filterobjectไม่พารามิเตอร์ตัวกรอง
orderbyarrayไม่พารามิเตอร์การจัดเรียง
pageintegerไม่ค่าเริ่มต้น: 1
pagesizeintegerไม่ค่าเริ่มต้น: 10

พารามิเตอร์ตัวเลือกของ filter

ฟิลด์ประเภทจำเป็นคำอธิบาย
product_idstringใช่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_idstringID รีวิว
uidstringID ผู้ใช้
sku_idstringID SKU
sku_specificationstringข้อมูลจำเพาะ SKU
ratingintคะแนน
digg_countintจำนวนถูกใจ
contentstringเนื้อหาความคิดเห็น
create_timetimestampเวลาที่สร้าง

data.total

ฟิลด์ประเภทคำอธิบาย
totalstringจำนวนรายการทั้งหมด

ตัวอย่างการตอบกลับ

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"
}