Skip to content

Get Delivery Locations

Description

取得外送地點清單,包含地點名稱及對應的外送費用。

Resource

GET /v1/delivery/locations

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Query Parameters

Name Type Description
store_id string 門市代碼

Request Example

GET /v1/delivery/locations?store_id=000030

Response

{
  "delivery_locations": [
    {
      "location_id": "L001",
      "location_name": "台北市信義區",
      "extra_delivery_fee": 50
    },
    {
      "location_id": "L002",
      "location_name": "新北市板橋區",
      "extra_delivery_fee": 80
    },
    {
      "location_id": "L003",
      "location_name": "台北市大安區",
      "extra_delivery_fee": 60
    }
  ]
}

Response Body Parameters

Name Type Description
delivery_locations DeliveryLocation[] 外送地點清單

Response Body Parameters - DeliveryLocation

Name Type Description
location_id string 外送地點ID
location_name string 外送地點名稱
extra_delivery_fee integer 外送費用(元)

Error Response

缺少必填參數 (400)

{
  "message": "缺少必填欄位 門市編號"
}

查無資料 (404)

{
  "message": "門市 000030 查無外送地點設定"
}

設定格式錯誤 (400)

{
  "message": "外送地點設定格式錯誤"
}