# 配送訂單
# API-3.3.3 訂單估算
POST /order/takeaway/estimates
接口類型 | 請求接口 |
用途 | 在訂單創建前,查詢訂單的使用產品、完成時間等估算。 |
注意:Zeek 平台在不同城市採用不同方式向商家收取運費,目前配送模式只適用於香港地區,所以請先向當地的 Zeek 團隊查詢。
# 關於配送模式:短途送、標準外賣、長途送、全城送
在外賣配送中,Zeek 平台會利用配送距離(餐廳至用戶的距離)及配送容量來決定該訂單使用哪種配送模式( 短途送 / 標準外賣 / 長途送 / 全城送 )。 Zeek 平台會為不同配送模式會自動指派對應的配送員來配送。
以下是配送容量和指派配送員的對應表:
配送容量 | 接單工種 | 拼單 |
---|---|---|
小包 | 所有工種可接單 | 可以拼單 |
保溫袋 | 所有工種可接單 | 步兵只限取一單,不能拼單 |
保溫箱 | 電單車和 Van 可接單 | 電單車只限取一單,不能拼單 |
超過一個保溫箱 | 只有 Van 可接單 | 可以拼單 |
以下是在不同配送距離和容量組合下的配送模式:
距離 / 容量 | 小包 | 保溫袋 | 保溫箱 | 超過一個保溫箱 |
---|---|---|---|---|
短距離 | 短途送 | 短途送 | 標準外賣 | 長途送 |
中距離 | 標準外賣 | 標準外賣 | 標準外賣 | 長途送 |
長距離 | 長途送 | 長途送 | 長途送 | 長途送 |
全城距離 | 全城送 | 全城送 | 全城送 | 全城送 |
在實際使用中,Zeek 平台使用開發者傳入的訂單金額換算為配送容量,再跟據以上的對應表轉換為配送模式。以下是其中一個例子,說明在Zeek 平台內的訂單金額和配送容量轉換表:
金額下限(包含) | 金額上限 (不含) | 對應配送容量 |
---|---|---|
0 | 200 | 小包 |
200 | 500 | 保溫袋 |
500 | 1000 | 保溫箱 |
1000 | 無上限 | 超過一個保溫箱 |
# 使用說明
當用戶在商家的App下單時,透過調用這個接口,以協助計算商家向用戶收取的運費。這裡有兩種使用場景:
場景 1 - 在用戶選擇菜單前
- 在用戶進入商家 App 時,一般 App 都會向獲取用戶的地理位置。
- 獲取用戶地理位置後,調用這個接口。調用時只需要傳入用戶位置 (
recipient.location
),接口會返回報價表,即是一至多組報價(quotations
)。 - 開發者把報價表暫存在 App 中。
- 每組報價包含在 Zeek 平台指定的配送模式(
mode
)下,對應的訂單總金額範圍(min_product_total_price
、max_product_total_price
) 。 - 然後用戶在下單介面中點餐,隨著菜單項目的增減,訂單金額變動。
- 在每次變動時,對接方系統利用換算表找出該訂單金額對應的配送模式。
- 得出配送模式,對接方系統跟據其系統內的邏輯,從配送模式換算出收取用戶的配送費,向用戶顯示。
場景 2 - 在用戶準備 checkout 付款前
- 用戶選擇的菜單已經確定,訂單金額也確定。
- 對接方系統再次調用本接口,此時傳入用戶位置及訂單總金額(
total_price
), 接口只會返回一組報價。 - 對接方系統跟據其系統內的邏輯,從配送模式換算出收取用戶的配送費,向用戶顯示。
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
client_merchant_id | string | Y | - | 對接方系統的店鋪ID | |
schedule_type | int | N | 0 | 是否預約單 | 0 : 即時單2 : 預約單(使用預約送達時間) |
schedule_time | string | N* | - | 預約時間 | - 當schedule_type 不是 0 時,這個字段是必需傳入的。- schedule_type = 2 : 需要在此輸入預約送達時間。 系統會按內部邏輯發布訂單,在預定完成送達。時間值需要為當前時間30分鐘後至7天內。- 例子: 2018-07-24 18:54:07 |
recipient.address | string(255) | N * | - | 用戶地址 | - 等同user_address - 請參考如何傳入用戶位置和地址 |
recipient.location | string | Y * | - | 用戶位置座標 | - 等同user_location - 請參考如何傳入用戶位置和地址 |
product.total_price | float | N | - | 用戶訂單總金額 | - 單位:元 - 請輸入用戶購買商品的總金額,不包括折扣、稅項和運費。 - 請參考以上的接口描述。 - 特別注意: 如果傳入的 total_price 是 0 的話,會視為沒有傳入。 |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"client_merchant_id": "STORE-123",
"schedule_type": 1,
"schedule_time": "2020-02-24 18:54:00",
"recipient":{
"location": "22.3902837102,114.0042115195",
},
"product": {
"total_price": 193
}
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
quotations | array | 報價 | 請參考以上的接口描述。 |
quotations[].quotation_id | string | Quotation ID | 用來記錄本次估算的唯一ID |
quotations[].mode | string | 配送模式 | - 返回以下其中之一: SHORT_RANGE (短途送)STANDARD (標準外賣)LONG_DISTANCE (長途送)CITY_WIDE (全城送)- 配送模式和商家的配置相關,請與 Zeek 團隊查詢所在的城市支持哪些配送模式。 |
quotations[].min_product_total_price | float | 最小訂單總金額 | - 金額範圍包含此數值。 - 單位:元 |
quotations[].max_product_total_price | float / null | 最大訂單總金額 | - 金額範圍不包括此數值。 - 當此值為無限時,返回 null 。- 單位:元 |
quotations[].delivery_fee | float / null | 配送費 | 這裡只提供配送費的參考。實際配送費根據 Zeek 和 商家的服務合約條款計算。 |
quotations[].predicted_quote_time | int | 預計完成時間 | - 請參考預計完成時間 (Quote time) - 單位:分鐘 |
quotations[].predicted_quote_time_range | string | 預計完成時間範圍 | - 例子:"30-40" |
quotations[].direct_distance | int | 商家與用戶的直線距離 | - 單位 : 米 |
quotations[].travel_distance | int | 商家與用戶的配送距離 | - 單位 : 米 |
例子:
{
"error": 0,
"data": {
"quotations" : [
{
"quotation_id": "q-fd-1-1583313293",
"mode" : "SHORT_RANGE",
"min_product_total_price": 0,
"max_product_total_price": 200,
"delivery_fee": 10.5,
"predicted_quote_time": 30,
"predicted_quote_time_range": "30-55",
"direct_distance": 500,
"travel_distance": 650
},
{
"quotation_id": "q-fd-1-1583313293",
"mode" : "STANDARD",
"min_product_total_price": 200,
"max_product_total_price": 750,
"delivery_fee": 10.5,
"predicted_quote_time": 30,
"predicted_quote_time_range": "30-55",
"direct_distance": 500,
"travel_distance": 650
},
{
"quotation_id": "q-fd-1-1583313293",
"mode" : "LONG_DISTANCE",
"min_product_total_price": 750,
"max_product_total_price": null,
"delivery_fee": 10.5,
"predicted_quote_time": 30,
"predicted_quote_time_range": "30-55",
"direct_distance": 500,
"travel_distance": 650
}
]
}
}
# API-3.3.1 訂單創建
POST /order/takeaway/create
接口類型 | 請求接口 |
用途 | 創建配送訂單。只有當用戶在配送範圍內時,才能創建訂單。 |
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
client_merchant_id | string | Y | - | 對接方系統的店鋪ID | - 參考FAQ - 什麼是 client merchant id?在創建訂單時,需要傳入店鋪地址嗎? |
client_order_id | string(128) | Y | - | 對接方系統的訂單號 | - 即是對接方系統內的訂單號(或稱流水號)。 - 當 merchant_order_id 的值為空時,不容許傳入非數字字符到client_order_id 。相反,開發者可以傳入包含非數字的字符。 |
merchant_order_id | string(64) | N | - | 取餐碼 / 第三方訂單號 | - 注意:必須是4位數字。 - 一般使用為取餐碼。在Zeek 配送員 App 上,會顯示這個取餐碼。當配送員到達店鋪時,店員應該使用這個取餐碼來核對配送員。 - 假若 merchant_order_id 為空時,系統會截取 client_order_id 的尾四位作為取餐碼,但Zeek 團隊仍然建議開發者傳入merchant_order_id 。- 本參數的另一個用途是:當商家/餐廳連接對接方系統作訂單管理時,此參數代表商家/餐廳自家系統內的訂單號。 - 參考FAQ - 什麼是取件碼 (pickup code) |
order_time | int | Y | - | 用戶下單時間 | 秒級時間戳 |
delivery_type | string | N | "ZEEK_DELIVERY" | 配送或自取方式 | - "ZEEK_DELIVERY" :由 Zeek 配送- "SELF_PICKUP" : 由用戶自行提取 |
is_appoint | int | N | 0 | 是否是預約單 | 0 : 即時單2 : 預約單(使用預約送達時間) |
appoint_time | string | N* | - | 預約時間 | - 當is_appoint 不是 0 時,這個字段是必需傳入的。- is_appoint = 2 : 需要在此輸入預約送達時間。 系統會按內部邏輯發布訂單,在預定完成送達。時間值需要為當前時間30分鐘後至7天內。- 例子: 2018-07-24 18:54:07 |
remark | string(1024) | N | "" | 訂單備註 | - 對配送員的特別提示,例如 "到達前台時請致電給用戶" - 在配送專員 App 中顯示 |
merchant_remark | string(1024) | N | "" | 商家備註 | - 商家內部使用的提示 - 不會在配送專員 App 中顯示 |
cod_type | int | N | 0 | 代收貨款類型 | 0 : 無指定,配送員跟據商家打印的單據指示收款1 : 貨到付款。用戶在下單時未支付,配送員在取餐時先向餐廳支付,在送達時向用戶收取現金。2 : 用戶已經在線上支付(例如信用卡),配送員不用收款。3 : 貨到付款。用戶在下單時未支付,配送員在送達時以壓印信用卡(刮卡)方式向用戶收取款項。 |
receive | obj | Y | - | 收貨人信息 | 詳見receive 結構 |
order_detail | obj | Y | - | 訂單詳情 | 詳見order_detail 結構 |
receive
結構體
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
user_name | string(64) | Y | - | 用戶名稱 | |
user_phone | string(32) | Y | - | 用戶電話 | 不包括國家碼,例子:"91234567" |
user_phone_country_code | string(5) | N | 參考備注 | 用戶電話國家碼 | - 例子: "852" - 按"系統級參數"中傳入的 region 值,使用該地區的國家碼為默認值。- 例如當 region 是 "SG" 時,默認值是 "65" 。 |
user_address_id | string | N * | "" | 用戶地址ID | - 使用時,需要輸入由 Zeek 提供的地址 ID,例如 "SF2.5972" 。- 請參考如何傳入用戶位置和地址 |
user_address | string(255) | Y | - | 用戶地址 | 請參考如何傳入用戶位置和地址 |
user_location | string | Y * | "" | 用戶位置座標 | 請參考如何傳入用戶位置和地址 |
order_detail
結構體
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
total_price | int | Y | - | 用戶訂單總金額 | - 單位:分 (1 元 = 100 分) - 請輸入用戶購買商品的總金額,不包括折扣、稅項和運費。 |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"client_merchant_id": "STORE-123",
"client_order_id": "201806121528793155",
"merchant_order_id": "1234",
"is_appoint": 2,
"appoint_time": "2018-07-24 18:54:07",
"order_time": 1528793155,
"remark": "Please dial the customer when arrive reception",
"merchant_remark": "",
"cod_type": 2,
"receive":{
"user_name":"Guiying Yao",
"user_phone":"63632752",
"user_phone_country_code": "65",
"user_location": "22.3902837102,114.0042115195",
"user_address":"#12-456, Woodlands, Singapore, 730779"
},
"order_detail":{
"total_price": 200
}
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 | |
order_url | string | 訂單 URL | - 在一些指定對接中,可以直接把這個 URL 生成二維碼。 - 二維碼可以用作配送員搶單用途。 |
direct_distance | int | 商家與用戶的直線距離 | - 單位 : 米 |
travel_distance | int | 商家與用戶的配送距離 | - 單位 : 米 |
predicted_accept_time | int | 預計接單時間 | - 單位:分鐘 |
predicted_accept_time_range | string | 預計接單時間範圍 | - 例子:"30-40" |
predicted_showup_time | int | 預計到店時間 | - 單位:分鐘 |
predicted_showup_time_range | string | 預計到店時間範圍 | - 例子:"30-40" |
predicted_delivery_time | int | 預計送達時間 | - 單位:分鐘 |
predicted_delivery_time_range | string | 預計送達時間範圍 | - 例子:"30-40" |
requested_pickup_time | int | 開始工作時間 | 秒級時間戳 |
requested_delivery_time | int | 要求送達時間 | 秒級時間戳 |
例子:
{
"error": 0,
"data": {
"order_id": "FD20180615080181522",
"client_order_id": "15104092022333",
"order_url":"https://ap1-track.zeek.one/FD20180615080181522",
"direct_distance": 500,
"travel_distance": 650,
"predicted_accept_time": 5,
"predicted_accept_time_range": "5-10",
"predicted_showup_time": 20,
"predicted_showup_time_range": "20-30",
"predicted_delivery_time": 40,
"predicted_delivery_time_range": "40-60",
"requested_pickup_time": 1655189860,
"requested_delivery_time": 1655189860
}
}
# API-3.3.2 訂單取消
POST /order/takeaway/cancel
接口類型 | 請求接口 |
用途 | - 取消配送訂單 - 開發者只能在訂單未完成之前取消訂單。 - 在配送員到店前 / 後取消訂單會帶來不同訂單狀態,請參考訂單狀態碼 |
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
order_id | string(128) | Y | - | Zeek 平台訂單號 | |
client_merchant_id | string | Y | - | 對接方系統的店鋪ID | |
cancel_reason | string(255) | N | "" | 取消原因 | |
user_code | string(4) | N | "0000" | 員工編號 | 格式為四位數字,例如:"1234" |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"order_id": "FD20180615080181522",
"client_merchant_id": "STORE-123",
"cancel_reason": "Requested by customer",
"user_code": "1223"
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 |
例子:
{
"error": 0,
"data": {
"order_id": "FD20180615080181522",
"client_order_id": "14570817752333"
}
}
# API-3.4.1 訂單查詢
POST /order/takeaway/info
接口類型 | 請求接口 |
用途 | 查詢訂單信息 |
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
order_id | string(128) | Y | - | Zeek 平台訂單號 | |
client_merchant_id | string | Y | - | 對接方系統的店鋪ID |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"order_id": "FD20180615080181522",
"client_merchant_id": "STORE-123"
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 | |
order_url | string | 訂單 URL | - 在一些指定對接中,可以直接把這個 URL 生成二維碼。 - 二維碼可以用作配送員搶單用途。 |
delivery_type | string | 配送或自取方式 | |
brand_id | int | 品牌 ID | |
brand_key | string | 品牌標籤 | |
merchant_location | string | 商家位置 | |
user_location | string | 用戶位置 | |
direct_distance | int | 商家與用戶的直線距離 | - 單位 : 米 |
travel_distance | int | 商家與用戶的配送距離 | - 單位 : 米 |
addtime | int | 創建訂單時間 | 秒級時間戳 |
appointment_time | int | 預約時間 | 秒級時間戳 |
name | string | 訂單標題 | |
remark_text | string | 備註 | |
merchant_remark | string | 商家備注 | |
partner_name | string | 配送員姓名 | |
partner_phone | string | 配送員電話號 | |
partner_carno | string | 配送員車牌 | |
order_status | int | 訂單狀態 | |
cancel_code | string | 訂單取消碼 | 參考 訂單取消碼 |
cancel_user | string | 取消訂單員工編號 | |
cancel_type | string | 取消類型 | |
cancel_reason | string | 取消原因 | |
cancel_time | int | 取消時間 | 秒級時間戳 |
actual_done_time | int | 訂單完成時間 | 秒級時間戳 |
requested_pickup_time | int | 開始工作時間 | 秒級時間戳 |
requested_delivery_time | int | 要求送達時間 | 秒級時間戳 |
lastmodify | int | 最後更新時間 | 秒級時間戳 |
例子:
{
"error": 0,
"data": {
"order_id": "FD2019010484047222",
"client_order_id": "201901041133245454",
"order_url":"https://ap1-track.zeek.one/FD2019010484047222",
"delivery_type": "ZEEK_DELIVERY",
"brand_id": 22,
"brand_key": "abc-brand",
"merchant_location": "22.3902837102,114.0042115195",
"user_location": "22.3902837102,114.0042115195",
"direct_distance": 500,
"travel_distance": 650,
"addtime": 1510733606,
"appointment_time": 1510733606,
"name": "ABC restaurant delivery",
"remark_text": "Please dial the customer when arrive reception",
"merchant_remark": "",
"partner_name": "Zhihao Shi",
"partner_phone": "62988967",
"partner_carno": "AB1234",
"order_status": 9025,
"cancel_code": "7002",
"cancel_user": "Peter Cheung",
"cancel_type": "Other",
"cancel_reason": "Requested by customer",
"cancel_time":1510733606,
"actual_done_time": 1510733606,
"requested_pickup_time": 1655189860,
"requested_delivery_time": 1655189860,
"lastmodify": 1510733606
}
}
# API-3.4.4 訂單查詢 - 以用戶電話查詢
POST /order/takeaway/info_by_phone
接口類型 | 請求接口 |
用途 | 查詢訂單信息, 以用戶電話查詢 |
# 4.9.1 請求參數 (Request)
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
user_phone | string(32) | Y | - | 用戶電話 | |
user_phone_country_code | string(5) | N | 參考備注 | 用戶電話國家碼 | - 例子: "852" - 按"系統級參數"中傳入的 region 值,使用該地區的國家碼為默認值。- 例如當 region 是 "SG" 時,默認值是 "65" 。 |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"user_phone_country_code": "852",
"user_phone": "12345678"
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 | |
order_url | string | 訂單 URL | - 在一些指定對接中,可以直接把這個 URL 生成二維碼。 - 二維碼可以用作配送員搶單用途。 |
delivery_type | string | 配送或自取方式 | |
brand_id | int | 品牌 ID | |
brand_key | string | 品牌標籤 | |
merchant_location | string | 商家位置 | |
user_location | string | 用戶位置 | |
direct_distance | int | 商家與用戶的直線距離 | - 單位 : 米 |
travel_distance | int | 商家與用戶的配送距離 | - 單位 : 米 |
addtime | int | 創建訂單時間 | 秒級時間戳 |
appointment_time | int | 預約時間 | 秒級時間戳 |
name | string | 訂單標題 | |
remark_text | string | 備註 | |
merchant_remark | string | 商家備注 | |
partner_name | string | 配送員姓名 | |
partner_phone | string | 配送員電話號 | |
partner_carno | string | 配送員車牌 | |
order_status | int | 訂單狀態 | |
cancel_code | string | 訂單取消碼 | 參考 訂單取消碼 |
cancel_user | string | 取消訂單員工編號 | |
cancel_type | string | 取消類型 | |
cancel_reason | string | 取消原因 | |
cancel_time | int | 取消時間 | 秒級時間戳 |
actual_done_time | int | 訂單完成時間 | 秒級時間戳 |
requested_pickup_time | int | 開始工作時間 | 秒級時間戳 |
requested_delivery_time | int | 要求送達時間 | 秒級時間戳 |
lastmodify | int | 最後更新時間 | 秒級時間戳 |
例子:
{
"error": 0,
"data": {
"order_id": "FD2019010484047222",
"client_order_id": "201901041133245454",
"order_url":"https://ap1-track.zeek.one/FD2019010484047222",
"delivery_type": "ZEEK_DELIVERY",
"brand_id": 22,
"brand_key": "abc-brand",
"merchant_location": "22.3902837102,114.0042115195",
"user_location": "22.3902837102,114.0042115195",
"direct_distance": 500,
"travel_distance": 650,
"addtime": 1510733606,
"appointment_time": 1510733606,
"name": "ABC restaurant delivery",
"remark_text": "Please dial the customer when arrive reception",
"merchant_remark": "",
"partner_name": "Zhihao Shi",
"partner_phone": "62988967",
"partner_carno": "AB1234",
"order_status": 9025,
"cancel_code": "7002",
"cancel_user": "Peter Cheung",
"cancel_type": "Other",
"cancel_reason": "Requested by customer",
"cancel_time":1510733606,
"actual_done_time": 1510733606,
"requested_pickup_time": 1655189860,
"requested_delivery_time": 1655189860,
"lastmodify": 1510733606
}
}
# API-3.9.1 訂單狀態更新回調
POST 由開發者提供
接口類型 | 回調接口 |
用途 | 當訂單狀態更新時,Zeek 平台調用由開發者提供的回調接口,實時通知。 |
# 請求失敗處理
當 Zeek 平台調用回調接口,收到的回應不是成功時,平台會判斷為通知失敗,此時平台會定期重新發起通知,通知頻率為15/15/30/180/1800/1800/1800/1800/3600 秒。
# 接口授權
Zeek 平台會以授權和簽名 的方式,在接口傳入簽名,所以開發者需要以同樣的方式去驗證簽名。
# 請求參數
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string(128) | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 | |
timestamp | int | 狀態觸發時間戳 | |
order_status | int | 訂單狀態 | 請參考訂單狀態碼 |
status_desc | string | 狀態描述文字 | |
partner.partner_name | string | 配送員姓名 | |
partner.partner_phone | string | 配送員電話號 | |
partner.partner_location | string | 配送員位置 | |
cancel.cancel_reason | string | 取消訂單原因 | |
cancel.code | string | 訂單取消碼 | 參考 訂單取消碼 |
cancel.cancel_user | string | 取消訂單員工 | |
cancel.cancel_time | string | 取消時間 | |
predicted_accept_time | int | 預計接單時間 | - 單位:分鐘 - 如果配送員已接單,Zeek 平台將會傳入 null 。 |
predicted_accept_time_range | string | 預計接單時間範圍 | - 例子:"30-40" - 如果配送員已接單,Zeek 平台將會傳入 null 。 |
predicted_showup_time | int | 預計到店時間 | - 單位:分鐘 - 如果配送員已到店,Zeek 平台將會傳入 null 。 |
predicted_showup_time_range | string | 預計到店時間範圍 | - 例子:"30-40" - 如果配送員已到店,Zeek 平台將會傳入 null 。 |
predicted_delivery_time | int | 預計送達時間 | - 單位:分鐘 - 如果訂單已完成,Zeek 平台將會傳入 null 。 |
predicted_delivery_time_range | string | 預計送達時間範圍 | - 例子:"30-40" - 如果訂單已完成,Zeek 平台將會傳入 null 。 |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"order_id": "FD20180615080181522",
"client_order_id": "201808076580818698",
"timestamp": 1533609085,
"order_status": 9015,
"status_desc": "Delivery in progress",
"partner": {
"partner_name": "Zhihao Shi",
"partner_phone": "62988967",
"partner_location": "22.3902837102,114.0042115195"
},
"cancel": {
"cancel_reason": "Requested by customer",
"code": "7002",
"cancel_user": "0000",
"cancel_time": "1625572417"
},
"predicted_accept_time": 5,
"predicted_accept_time_range": "5-10",
"predicted_showup_time": 10,
"predicted_showup_time_range": "10-20",
"predicted_delivery_time": 30,
"predicted_delivery_time_range": "30-50"
}
}
# 返回結果
開發者需要在回調接口返回以下格式數據。
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
error | int | 錯誤碼 | 調用成功時返回0 |
err_msg | string | 錯誤訊息文字 |
{
"error": 0,
"err_msg": "",
}
# API-3.5.1 配送員位置
POST /tasker/takeaway/position_latest
接口類型 | 請求接口 |
用途 | 查詢配送員即時位置 |
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
order_id | string(128) | Y | - | Zeek 平台訂單號 | |
client_merchant_id | string | Y | - | 對接方系統的店鋪ID |
例子:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"order_id": "FD20180615080181522",
"client_merchant_id": "STORE-123"
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
order_id | string | Zeek 平台訂單號 | |
client_order_id | string | 對接方系統的訂單號 | |
partner_name | string | 配送員姓名 | |
partner_location | string | 配送員位置 | |
upload_time | int | 最後更新時間 | 秒級時間戳 |
predicted_delivery_time | int | 預計送達時間 | - 單位:分鐘 - 訂單完成後返回 -1 |
predicted_delivery_time_range | string | 預計送達時間範圍 | - 例子:"30-40" |
例子:
{
"error": 0,
"data": {
"order_id": "FD20180615080181522",
"client_order_id": "14570817752333",
"partner_name": "Zhihao Shi",
"partner_location": "22.3902837102,114.0042115195",
"upload_time":1510733606,
"predicted_delivery_time": 30,
"predicted_delivery_time_range": "30-60"
}
}
# API-3.5.2 配送員軌跡
POST /tasker/takeaway/position_track
接口類型 | 請求接口 |
Usage | 查詢某一訂單的配送員位置路徑 |
# 請求參數
名稱 | 類型 | 是否必須 | 默認值 | 說明 | 備註 |
---|---|---|---|---|---|
order_id | string(128) | Y | - | Zeek 平台訂單號 | |
client_merchant_id | string | Y | - | 對接方系統的店鋪ID | |
page | int | Y | - | 頁數 | |
pagesize | int | N | 20 | 每頁數據量 | 最大值: 500 |
Example:
{
"auth": {
// 驗證字段
},
"data": {
"meta":{
// 語言和地區設定
},
"order_id": "FD20180615080181522",
"client_merchant_id": "STORE-123",
"page": 1,
"pagesize": 30
}
}
# 返回結果
名稱 | 類型 | 說明 | 備註 |
---|---|---|---|
data | array | 配送員位置(多個) | |
data[].partner_location | string | 配送員位置 | |
data[].upload_time | int | 最後更新時間 | 秒級時間戳 |
{
"error": 0,
"data": [
{
"partner_location": "22.3902837102,114.0042115195",
"upload_time": 1510409202
},
{
"partner_location": "22.3902837102,114.0042115195",
"upload_time": 1510409202
}
],
"pageinfo": {
"total": 3,
"pagecount": 2,
"pagesize": 2,
"curpage": 1
}
}