Get Delivery Threshold
Description
取得外送門檻條件,包含距離、最低消費金額及額外運費設定。
Resource
GET /v1/delivery/threshold
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| store_id | string | 門市代碼 |
Request Example
GET /v1/delivery/threshold?store_id=000030
Response
{
"delivery_thresholds": [
{
"distance_km": 5.0,
"min_amount": 300,
"extra_delivery_fee": 50
},
{
"distance_km": 8.0,
"min_amount": 500,
"extra_delivery_fee": 0
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| delivery_thresholds | DeliveryThreshold[] | 外送門檻條件列表 |
Response Body Parameters - DeliveryThreshold
| Name | Type | Description |
|---|---|---|
| distance_km | float | 配送距離(公里) |
| min_amount | integer | 最低消費金額(元) |
| extra_delivery_fee | integer | 額外運費(元),0表示免運費 |
Error Response
缺少必填參數 (400)
{
"message": "缺少必填欄位 門市編號"
}
查無資料 (404)
{
"message": "門市 A01 查無外送門檻設定"
}
設定格式錯誤 (400)
{
"message": "外送門檻設定格式錯誤"
}