這將刪除頁面 "Home"
。請三思而後行。
API Address: https://yyjobs-api-dev.guabean.com/swagger
接口文档地址:https://yyjobs-api-dev.guabean.com/swagger
Accept:application/x.yyjobs-api.v1+json
所有接口都必须增加header Accept:application/x.yyjobs-api.v1+json
Authorization
header must use Bearer xxxxxx
.所有需要Authorization
header 的接口值必须为 Bearer xxxxxx
Use the API POST
/api/third-part/auth/login
Input email address to get the token. (The token expires after 24 hours)
使用/api/third-part/auth/login
接口填写邮箱密码获取token (token 有效期24小时)
field | require | type | description |
---|---|---|---|
true | string | ||
password | true | string |
Use the API POST
/api/third-part/order
to send order info to YY.
使用/api/third-part/order
发布订单
field | require | type | description |
---|---|---|---|
order_number | true | string | Third-party platform order number.unique |
zip_code | true | string | |
address | true | string | Customer details address |
lng | true | string | |
lat | true | string | |
reservation_delivery_time | false | string | If this parameter is empty, it means calling the rider for delivery immediately. |
amount | false | float | If this parameter is empty or is 0, it means that the order is paid online. |
{
"status": "success",
"data": {
"id": "202106041429495",
"order_number": "KFC2015764",
"zip_code": "409051",
"lng": "103.819836",
"lat": "1.352083",
"address": "Marina Bay Sands Singapore",
"amount": 0,
"reservation_delivery_time": "",
"estimate_assign_rider_seconds":3000,
"created_at": "2021-06-04 14:32:08"
},
"code": 200,
"message": "order post successful"
}
Use the API GET
/api/third-part/order/{id}
to get the order status.
field | require | type | description |
---|---|---|---|
id | true | string | YY platform order id |
{
"status": "success",
"data": {
"id": "202106041429495",
"order_status": 1,
"deliver_status": 3,
"message":"The rider has arrived at the store.",
"time": "2021-06-04 14:45:22",
"eta": "2021-06-04 15:08:00",
"eta_to_store": "",
"eta_to_customer": "",
"rider":{
"lng": "103.819836",
"lat": "1.352083",
}
},
"code": 200,
"message": "get order successful"
}
order_status
1:Active (进行中订单)
2:Cancelled (已取消的订单)
3:Finished (完成的订单)
deliver_status
1:Pending Assigned (待匹配骑手)
2:Rider Assigned (已匹配骑手,等待抵达商家)
3:Arrived at outlet (已经抵达商家,待取货)
4:Food Picked Up (已取货,待送达)
5:Arrived at Customer's Place (已到达客户地址,待确认)
6:Order Delivered (已确认)
7:Order Completed (骑手已收款完成订单)
Use the API GET
/api/rider
{
"status": "success",
"data": [
{
"id": 222,
"full_name": "Muhammad taufiq bin Mohamed sukaimi",
"gender": "Male",
"phone": "+65 90583321",
"lng": "103.9081550118",
"lat": "1.324636844975"
},
{
"id": 1029,
"full_name": "Muhammad bin Zakeri",
"gender": "Male",
"phone": "+65 87485407",
"lng": "103.8613982066",
"lat": "1.3268864989329"
},
{
"id": 1158,
"full_name": "MOHD SADRUDDIN BINAZMAN",
"gender": "Male",
"phone": "+65 87541085",
"lng": "103.83256667085",
"lat": "1.3554653744305"
}
],
"code": 200,
"message": "success"
}
Use the API POST
/api/rider/{rider_id}/assign/{order_id}
{
"status": "success",
"data": true,
"code": 200,
"message": "assigning..."
}
這將刪除頁面 "Home"
。請三思而後行。