Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small programs Small programs use cancelOrder


May 19, 2021 WeChat Mini Program Development Document



immediateDelivery.cancelOrder

This interface should be called on the server side, as detailed in the Service Side API.

Cancel the delivery order interface

The request address

POST https://api.weixin.qq.com/cgi-bin/express/local/business/order/cancel?access_token=ACCESS_TOKEN

Request parameters

Property Type The default Required Description
access_token string Is The interface calls the credentials
shopid string Is Merchant id, appkey assigned by the distribution company
shop_order_id string Is The ID that uniquely identifies the order and is generated by the merchant
shop_no string Is Merchant store number, if there is only one store, flash delivery shop_no required, the value of the store id
delivery_sign string Is A check string description encrypted with appSecret provided by the distribution company
delivery_id string Is Courier company ID
waybill_id string Whether Delivery order id
cancel_reason_id number Is Cancel the reason ID
cancel_reason string Whether The reason for the cancellation

cancel_reason_id legal value of the information

Value Description The lowest version
1 No mailing is required for the time being
2 The price is not right
3 The order information is incorrect and the order is re-ordered
4 The rider's pick-up was not timely
5 Rider delivery is not timely
6 Other reasons (if you select 6, you need to fill in the cancellation reason, otherwise you don't need to fill in)

Returns a value

Object

Property Type Description
errcode number Error code, when errcode is 0 or does not exist also need to see resultcode
errmsg string The error description
resultcode number The error code returned by the capacity
resultmsg string The error description returned by the capacity
deduct_fee number Deduction of the default payment (in yuan), accurate to the score
desc string Description

Use the scene

Call this interface to request cancellation orders to the distribution company, and the cancel rules of each home are as follows:

Distribution company Cancel rule
SF Tongcheng urgently sent Any node can cancel the delivery order before delivery
Flicker Any node can cancel the delivery order before delivery
US group distribution Any node can cancel the delivery order before delivery
Dada Call before picking up the goods

An example of a request

{
   "shopid": "123456",
   "shop_order_id": "123456",
   "waybill_id": "123456",
   "delivery_id": "123456",
   "cancel_reason_id": 1,
   "cancel_reason": "",
   "delivery_sign": "123456",
   "shop_no": "shop_no_111"
}

Return an example of the data

{
  "resultcode": 0,
  "resultmsg": "ok",
  "deduct_fee": 5,
  "desc": "blabla"
}