Rankingi produktów – Najlepiej sprzedające się
Wprowadzenie
Pobierz najlepiej sprzedające się produkty. Obsługiwane funkcje:
- Obsługuje parametry filtra
- Obsługuje niestandardowe sortowanie wyników
Punkt końcowy API
bash
POST /product/v1/rank/topSellingTreść żądania
| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
filter | object | Nie | Parametry filtra |
orderby | object | Nie | Parametry sortowania |
page | integer | Nie | Numer strony, domyślnie: 1 |
pagesize | integer | Nie | Elementów na stronę, domyślnie: 10 |
page*pagesize<= 500
Zakres
pagesize[1, 100]
Opcjonalne wartości filter
| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
region | string | Nie | Kraj/region |
category_id | integer | Nie | Kategoria produktu |
date_info | object | Tak | Informacje o dacie, np. {'type': 'day', 'value': '2026-02-01'} |
Dostępne regiony:
['US', 'ID', 'GB', 'VN', 'TH', 'MY', 'PH', 'SG', 'ES', 'MX', 'DE', 'FR', 'PT', 'NL', 'BE', 'AT', 'PL', 'IT', 'BR', 'JP']
Opcjonalne wartości orderby
| Pole | Wymagane | Opis |
|---|---|---|
units_sold | Nie | Wielkość sprzedaży (malejąco) |
gmv | Nie | Przychód (malejąco) |
total_units_sold | Nie | Łączna wielkość sprzedaży (malejąco) |
total_gmv | Nie | Przychód łącznie (malejąco) |
growth_rate | Nie | Tempo wzrostu (malejąco) |
Przykład żądania
bash
curl 'https://openapi.fastmoss.com/product/v1/rank/topSelling' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxxxxxxx' \
--data '{
"filter": {
"region": "US",
"category_id": 2,
"date_info": {
"type": "day",
"value": "2026-02-01"
}
# "date_info": {
# "type": "week",
# "value": "2026-18"
# },
# "date_info": {
# "type": "month",
# "value": "2026-02"
# }
},
"orderby": [
{
"field": "gmv",
"order": "desc"
}
],
"page": 1,
"pagesize": 10
}'Treść odpowiedzi
data.total
- Typ: integer
- Opis: łączna liczba wyników
data.list
| Pole | Typ | Opis |
|---|---|---|
product_id | string | ID produktu |
title | string | Tytuł produktu |
region | string | Kraj/region |
cover | string | URL okładki produktu |
category | object | Kategoria produktu |
commission_rate | integer | Stawka prowizji |
real_price | string | Cena produktu |
units_sold | integer | Wielkość sprzedaży |
gmv | integer | Przychód |
total_units_sold | integer | Łączna wielkość sprzedaży |
total_gmv | integer | Przychód łącznie |
growth_rate | integer | Tempo wzrostu sprzedaży |
shop | object | Informacje o sklepie |
data.list.shop
| Pole | Typ | Opis |
|---|---|---|
seller_id | string | ID sklepu |
name | string | Nazwa sklepu |
avatar | string | URL okładki sklepu |
total_units_sold | integer | Łączna wielkość sprzedaży sklepu |
Przykład odpowiedzi
json
{
"code": 0,
"msg": "success",
"data": {
"total": 500,
"list": [
{
"product_id": "1729537665891078575",
"title": "33.81oz Glass Water Cup, Large Glass Cup with Lid & Straw, Drinking Cup for Home Office Use, Drinkware Gift Ideas, Kitchen Accessories",
"cover": "https://s.500fd.com/tt_product/16e26aec1fb94e3784665b5b2ecfe0e0~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg",
"real_price": "$10.94",
"region": "US",
"commission_rate": 1234,
"category": {
"l1": { "id": 123, "name": "test" }
},
"units_sold": 123,
"gmv": 123,
"total_units_sold": 123,
"total_gmv": 123,
"growth_rate": 123,
"shop": {
"seller_id": 123,
"name": "test",
"avatar": "xxx",
"total_units_sold": 123
}
}
]
}
}