OData 查詢參數
訂單列表、組織信用紀錄列表、產品列表支援 OData v4 query parameters。使用列表 API 時,請用 $top 控制單次取回筆數,並用 $skip 取得下一頁資料。
資訊
列表 endpoint 的單次回傳上限為 100 筆。若要同步完整資料,請用 $skip 與 $top 分頁取得。
Supported Parameters
| Field | Type | Required | Description |
|---|---|---|---|
$filter | string | No | 依 endpoint 允許欄位篩選。支援函數:contains()、cast()、any()、all()。 |
$orderby | string | No | 依 endpoint 允許欄位排序。 |
$skip | integer | No | 要跳過的資料筆數。最小值 0。 |
$top | integer | No | 要取回的資料筆數。最小值 1,最大值 100。 |
Allowed Fields
| Endpoint | $filter Fields | $orderby Fields |
|---|---|---|
GET /platform/order | id, order_number, payment_type, order_status, payment_status, create_date_time | payment_type, order_status, payment_status, create_date_time |
GET /platform/organization/credit/record | quantity, type, create_date_time | quantity, type, create_date_time |
GET /platform/product | id, price, main_product_category, product_category, dynamic_probability, increase_speed | price, min, max, order_no |
Example
curl "https://api.guo-guo.com/platform/product?\$top=20&\$skip=0&\$orderby=price" \
-H "x-api-key: <private_key>"