# Development must-read
# Merchant Access Preparation
- Mini Program for WeChat certification
- Launch event push, set event address: loginMini Program backgroundDevelopment ->Development settings ->Message push ->Enable
- Message encryption using safe mode, data format JSON
- Step 2 is not required if authorization is given to a third party
- In the distribution company registered account, and Mini Program background authorization binding
# Name interpretation
- appkey: Generally for businesses in the login distribution company after the distribution of the corresponding appkey value
- AppSecret: Generally for businesses in the login distribution company open flat distribution of the corresponding key
- Shopid: WeChat platform field, corresponding to the delivery company's app key
- shop_No: Merchants need to register the number of different stores in the distribution company system, such as the merchant's own store system has 100 stores, The number is 1-100, in the SF city system has registered the 100 stores, and in the city of SF registration number is 1 - 100, then the time to place an order pass shop_No = 1, that is, the number is 1. The delivery order under the store
- Shop: a field of the order request, the merchant information, will be displayed in the logistics notification message, as shown below
- Pick up code and receiving code for order request: pick up codes means that when the rider picks up goods at the merchant, the merchant shows the pick up yards, the rider can complete pick upThe delivery code means that when the rider delivers to the user, the user presents the delivery number and the rider completes the delivery. Merchants can open the platform of the distribution company to set whether you need to open the pickup code and the receipt code
# Calling api interface specification
- Encoding: UTF-8
- Data format: JSON
- Submission: POST
- The order needs to use the binding shopid and AppSecret, where shopid is the app key of the distribution company account, App Secret is the corresponding secret key of delivery company account
- The result code error code and the result msg error description are defined by the transportation side, the WeChat side is responsible for passing through, only the unified definition of code = 0 means success
- In addition to the encryption, decryption and signature of the platform itself, order-related requests also need to bring the delivery side signature._Sign, the signature rule is
- If the interface request has a field shop_order_id , then delivery _sign=SHA1(shopid + shop_order_id + AppSecret)Where the shopid corresponds to the app key on the capacity side, shop_order_Id corresponds to the order id, AppSecret is the secret key corresponding to the delivery company account
- If there is no field in the request shop_order_id , then delivery _sign=SHA1(shopid + AppSecret)Where the shop id corresponds to the app key on the transport side, and the AppSecret is the key corresponding to the account number of the delivery company.
- Example: shopid"test_shop_id” ,shop_order_id = “test_shop_order_id” , AppSecret=“test_app_secrect” , then delivery_sign= "A93d8d6bae9a9483c1b1d4e8670e7f6226ec94cb"
# Error code explaination
Error code | Error description |
---|---|
930555 | Error System error |
930556 | Delivery Company Timeout |
930557 | Delivery company system error |
930558 | Distribution company logic error |
930559 | Invalid openid |
930560 | Unbound merchant number |
930561 | Parameter error |
930562 | The delivery order already exists. |
930563 | This page does not exist. |
930564 | Call without quota |
930565 | Delivery order closed |
9300535 | Shop field product thumbnail URL, product name is empty or illegal, or the number of products is 0 |
Other error codes | Error code returned by delivery company |