Lista recenzji produktu
Wprowadzenie
Pobierz listę recenzji wskazanego produktu:
Punkt końcowy API
bash
POST /product/v1/reviewListTreść żądania
| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
filter | object | Nie | Parametry filtra |
orderby | array | Nie | Parametry sortowania |
page | integer | Nie | Domyślnie: 1 |
pagesize | integer | Nie | Domyślnie: 10 |
Opcjonalne parametry filter
| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
product_id | string | Tak | ID produktu |
Opcjonalne parametry orderby
| Pole | Wymagane | Opis |
|---|---|---|
rating | Nie | Ocena |
review_id | Nie | ID recenzji |
Przykład żądania
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
}'Treść odpowiedzi
data.list
| Pole | Typ | Opis |
|---|---|---|
review_id | string | ID recenzji |
uid | string | ID użytkownika |
sku_id | string | ID SKU |
sku_specification | string | Specyfikacja SKU |
rating | int | Ocena |
digg_count | int | Liczba polubień |
content | string | Treść komentarza |
create_time | timestamp | Czas utworzenia |
data.total
| Pole | Typ | Opis |
|---|---|---|
total | string | Rekordy łącznie |
Przykład odpowiedzi
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"
}