Shunfeng electronic sheet printing interface fengmi surface sheet C#

Time:2020-12-2

catalog

1. Complete the preparatory work

2. API interface

3. Request parameters (headers)

4. Request parameters (body)

5. Return parameter (return)

6. Request complete message (example)

7. Successful return message (example)

8. Failure return message (example)

9. Step by step explanation (version C)

10. Shunfeng electronic sheet printing template content (HTML)

11. About signature

preface

Fengmi face sheet is Shunfeng express face sheet which hides user’s personal information. The bill can hide some information such as sender, recipient’s name, mobile phone and address, so that personal information is no longer directly exposed.

Let’s take a look at two face sheets.

Figure 1

Shunfeng electronic sheet printing interface fengmi surface sheet C#

 Figure 1 is a two 150 mm electronic bill template. The sender and recipient’s mobile phones are visible.

Figure 2

Shunfeng electronic sheet printing interface fengmi surface sheet C#

Figure 2 is also a two 150 mm electronic sheet template, the sender and recipient mobile phones are not visible. This kind of sheet is safe and reliable, mainly to protect customer privacy, strongly recommend customers to use, we will explain the implementation process below.

1. Complete the preparatory work

1.1, to express bird free registration of a docking account

1.2, get an apikey for free (required for interface authority verification)

1.3, complete the real name authentication process

1.4, order a free package

1.5, apply for SF express monthly settlement account number

SF monthly settlement account number needs to sign a receiving and dispatching contract with local SF branch offline. After signing, SF will provide a 10 digit SF monthly settlement account number for shipping settlement freight;

Note:The information and status displayed in the background of the official website of express bird (for example, the “my logistics service provider” page does not display SF or SF monthly settlement account number) does not affect the use of the interface, and it does not need to add the customer number to be used in the background. Instead, the order can be directly transferred through the interface;

1.6,Prepare the printer and printing paper

  • printer:

There are no requirements for the brand and model of the printer for the electronic surface sheet template. As long as it is a thermal printer, common brands such as zebra, deli, Kuai Mai, Hanyin, Jiabo, etc.

Printers can be provided by express outlets or purchased from Taobao Jingdong. Install printers and drivers and contact printer providers;

  • Printing paper:

SF express uses three kinds of printing paper: 100 mm * 150 mm (tangent point 90 / 60), 100 mm * 180 mm (tangent point 110 / 70) and 100 mm * 210 mm (tangent point 90 / 60 / 60),

Printing paper can be provided by express outlets or purchased on Taobao Jingdong. You can choose all white thermal paper when purchasing.

2. API interface

2.1, test call address:_ http://sandboxapi.kdniao.com :8080/kdniaosandbox/gateway/ exterfaceInvoke.json_

2.2, official call address: http://api.kdniao.com/api/EOr…

2.3, request mode:_ POST_

4, encoding format (UTF-8): 1_ application/x-www-form-urlencoded;charset=utf-8_

2.5, return type:_ JSON_

2.6, debugging page:_ http://kdniao.com/UserCenter/…

2.7, debugging tool: to debug (login with express bird account)

3. Request parameters (headers)

| Parameter name | type | explain | Must ask |
|Request data | string | the request content needs URL (UTF-8) encoding, and the request content must be consistent with datatype | required|
|Ebusinessid | string | user ID, view user ID and apikey | are required|
|Requesttype | string | request instruction type: 1007 | required
  |
| DataSign | String | The signature data (body + apikey) is encrypted with MD5, then encoded with Base64, and finally encoded with URL (UTF-8)|Required|
| DataType | String | Data type: 2-json, default JSON | Optional |

4. Request parameters (body)

Parameter name type explain Is it necessary
MemberID String(50) The unique identification such as member ID or store account number of users of ERP system, e-commerce platform and other systems or platform types is used to distinguish their users O
CustomerName String(50) For the customer number of the electronic surface sheet, you need to download the customer number parameter comparison table of express bird electronic surface sheet. Xlsx, and refer to the corresponding field to transfer the value O
CustomerPwd String(30) O
SendSite String(30) O
SendStaff String(30) C
MonthCode String C
CustomArea String(500) Merchant custom area C
WareHouseID String(30) Code of delivery warehouse O
TransType Int(1) Transportation mode 1 – land transportation 2 – air transportation not filled in, default to 1 O
ShipperCode String(10) For detailed coding of express company, please refer to “express bird interface support express company code. Xlsx” R
LogisticCode String(30) Express bill No. (only available for express delivery) O
ThrOrderCode String(50) Third party order number (required when shippercode is JD and exptype is 1) C
OrderCode String(30) Order number (custom, not repeatable) R
PayType Int(1) Postage payment: 1-cash, 2-payment on arrival, 3-month settlement, 4-third-party payment (only supported by SF) R
ExpType String(2) Express type: 1-standard express. For detailed express type, please refer to “express business type of express company. Xlsx” R
IsReturnSignBill Int(1) Do you want to sign off 1 – required 0 – not required O
OperateRequire String(20) Operation requirements of the receipt (such as signature, seal, copy of ID card, etc.) O
Cost Cost Double(5) Express freight O
OtherCost Double(5) other expenses O
Receiver Company String(30) Recipient company O
Name String(30) addressee R
Tel String(20) Telephone and mobile phone, one is required R
Mobile String(20)
PostCode String(10) Recipient postcode c
ProvinceName String(20) Receiving province (for example, Guangdong Province, do not lack “province”; if it is a municipality directly under the central government, please send it directly to Beijing and Shanghai; if it is an autonomous region, please send it directly to Guangxi Zhuang Autonomous Region, etc.) R
CityName String(20) Receiving city (e.g. Shenzhen, do not lack “city”; if it is a municipal district, please send it to Beijing, Shanghai, etc.) R
ExpAreaName String(20) Receiving district / county (e.g. Futian District, do not lack “district” or “county”) R
Address String(100) Detailed address of recipient R
Sender Company String(30) Sender company O
Name String(30) From R
Tel String(20) Telephone and mobile phone, one is required R
Mobile String(20)
PostCode String(10) Postal code of sending place (required when shippercode is EMS, yzpy, yzbk) C
ProvinceName String(20) Sending province (for example, Guangdong Province, do not lack “province”; if it is a municipality directly under the central government, please send it directly to Beijing and Shanghai; if it is an autonomous region, please send it directly to Guangxi Zhuang Autonomous Region, etc.) R
CityName String(20) Sending city (for example, Shenzhen City, do not lack “city”; if it is a municipal district, please directly transmit it to Beijing, Shanghai, etc.) R
ExpAreaName String(20) Sending district / county (e.g. Futian District, do not lack “district” or “county”) R
Address String(100) Sender’s detailed address R
IsNotice Int(1) Whether to inform the courier to pick up the goods or not O
StartDate Date Door to door pickup time period: “yyyy MM DD HH: mm: SS” format, all the time formats in this paper are the same O
EndDate Date O
Weight Double(10,3) The total package weight kg is required when it is an express order. If it is not filled in, the express bird will send the corresponding default value according to the requirements of each express company C
Quantity Int(2) Number of packages (up to 30 pieces) one package corresponds to one waybill number. If it is more than one package, the parent waybill number and the child waybill number will be returned according to the method of child parent piece R
Volume Double(20,3) The total package volume m3 is required when it is an express order. If it is not filled in, the express bird will send the corresponding default value according to the requirements of each express company C
Remark String(60) remarks O
AddServices
AddService Name String(20) Value added service name
(array form, can have multiple value-added services) C
Value String(30) Value added service C
CustomerID String(30) Customer identification (optional) O
Commoditys
Commodity GoodsName String(100) Trade name R
GoodsCode String(100) Commodity code O
Goodsquantity Int(5) Quantity of goods O
GoodsPrice Double(10) commodity price O
GoodsWeight Double(10,3) Commodity weight kg O
GoodsDesc String(50) Product description O
GoodsVol Double(15,3) Commodity volume M3 O
IsReturnPrintTemplate String(1) Return to electronic sheet template: 0 – not required; 1 – required O
IsSendMessage Int(1) Whether to subscribe to SMS: 0-not required; 1-required O
TemplateSize String(10) Template specification (default template does not need to transfer value, non default template transfers corresponding template size)

Double 150 high density surface sheet (templatesize transfer value 15001)

Triple 210_ Rich and dense noodles_ (templatesize: 21001)

Duplex 150 (default template, the value of templatesize is empty)

Triplex 210 (templatesize transfer value 210)

Duplex 180 new (templatesize transfer value 180)

| O |
|Packingtype | int (2) | packing type (express field) is 0 by default; 0-paper 1-fiber 2-wood 3-supporting film 4-wood bracket 99 – other | C|
|Deliverymethod | int (1) | delivery method (express field) is 0 by default; 0-self pick-up 1-door delivery (excluding upstairs) 2-deliver upstairs | C|

5. Return parameter (return)

Parameter name type explain Must ask
EBusinessID String(10) User ID R
Order OrderCode String(30) Order number R
ShipperCode String(10) Express company code R
LogisticCode String(400) courier number R
MarkDestination String(20) Paint Marker O
OriginCode String(20) Origin area code O
OriginName String(20) Origin / destination O
DestinatioCode String(20) Destination area code O
DestinatioName String(20) Destination / destination O
SortingCode String(20) Sorting code O
PackageCode String(20) Packet coding O
PackageName String(50) Package land O
DestinationAllocationCentre String(50) Destination classification O
Success Bool(10) Success or failure (true / false) R
SignWaybillCode String(15) Receipt No O
ResultCode String(5) Return code R
Reason String(50) Reasons for failure O
UniquerRequestNumber String(50) Unique identification R
PrintTemplate String Print template content (HTML format) O
EstimatedDeliveryTime Date Expected arrival time of order yyyy MM DD O
SubCount Int(5) Quantity of sub orders O
SubOrders String(400) Sub Order No O
SubPrintTemplates String(2000) Sub order template content (HTML format) O
SignBillPrintTemplate String(2000) Content of check back form template (HTML format) O
ReceiverSafePhone String(20) Recipient security phone O
SenderSafePhone String(20) Recipient security phone O
DialPage String(50) Dialing page address (converted into QR code, scanning dialing) O

6. Request message (example)

{“ordercode”: “012657018199”, “shippercode”: “SF”, “paytype”: 1, “monthcode”: “1234567890”, “exptype”: 1, “cost”: 1.0, “othercost”: 1.0, “sender”: {“company”: “Lv”, “name”: “Taylor”, “mobile”: “15018442396”, “provincename”: “Shanghai”, “cityname”: “Shanghai”, “expateaname”: “Qingpu District”, “address”: “Mingzhu road”}, “receiver”: {company “:” gccui “, “Name”: “Yann”, “mobile”: “15018442396”, “provincename”: “Beijing”, “cityname”: “Beijing”, “exprareaname”: “Chaoyang District”, “address”, “Sanlitun Street”}, “commodity”:[

{goodsname ': "shoes", "goodquantity": 1, "goodweight": 1.0},
                    {goodsname ': "clothes", "goodquantity": 1, "goodweight": 1.0},
                      \], "AddService": \[
                        { "Name": " INSURE ", "Value": "1000" },
                        { "Name": "COD", "Value": "1020"
" CustomerID ": "1234567890" }
                      \]"Weight": 1.0, "quantity": 1, "volume": 0.0, "mark": handle with care}

7. Successful return message (example)

{ebusinessid “:” 1237100 “,” order “: {ordercode”: “012657700387”, “shippercode”: “htky”, “logisticcode”: “50002498503427”, “markdestination”: “Beijing Chaoyang (Beijing-1)”, “origincode”: “200000”, “originname”: “Shanghai Distribution Center”, “packagecode”: “Beijing”}, “printtemplate”: “print template HTML content is listed separately”, “estimated delivery time”: “2016-03-06”, “Success”: true, “resultcode”: “100”, “reason”: “success”}

8. Failure return message (example)

{ebusinessid “:” 1237100 “,” resultcode “:” 106 “,” reason “:” the order number has been placed successfully “,” uniquerrequestnumber “:” 5e66486b-8fbc-4131-b875-9b13d2ad1354 “}

Note: this message will be returned if no real name authentication, no subscription package, and the available query quantity of the package has been used up
Go to real name authentication / learn about package details

9. Step by step explanation (version C)

9.1, request packet structure

Shunfeng electronic sheet printing interface fengmi surface sheet C#

9.2, C ා call code example

Technical support: QQ: 510997342
//E-commerce ID
string eEBusinessID = "test1617571";
 //E-commerce encryption private key, express bird to provide, pay attention to keep, do not leak
string appKey= "554343b2-7252-439b-b4eb-1af42c8f2175";
 //Request URL
string reqURL = "http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json";
//Request instruction 
string reqType="1007";
//2-json 
string dataType = "2"; 
//UTF-8 is adopted for character coding 
string charset = "UTF-8"; 
//JSON string 
string jsonStr = 
"{
\"OrderCode\": \"012657018199\",
\"ShipperCode\": \"SF\",
\"PayType\": 1,
\"MonthCode\": \"1234567890\",
\"ExpType\": 1,
\"Cost\": 1.0,
\"OtherCost\": 1.0,
\"Sender\": {
\"Company\": \"LV\",
\"Name\": \"Taylor\",
\"Mobile\": \"15018442396\",
\"Provincename": "Shanghai",
\"Cityname \": "Shanghai city \",
\"Areaname": "Qingpu District",
\"Address": "Mingzhu road"
},
\"Receiver\": {
\"Company\": \"GCCUI\",
\"Name\": \"Yann\",
\"Mobile\": \"15018442396\",
\"Provincename": "Beijing",
\"Cityname \": "Beijing City \",
\"Expareaname \": "Chaoyang District \",
\"Address": "Sanlitun Street"
},
\"Commodity\": [
{
\"Goodsname \": "shoes \",
\"GoodsQuantity\": 1,
\"GoodsWeight\": 1.0
},
{
\"Goodsname \": "clothes \",
\"GoodsQuantity\": 1,
\"GoodsWeight\": 1.0
},
],
\"AddService\": [
{
\"Name\": \" INSURE \",
\"Value\": \"1000\"
},
{
\"Name\": \"COD\",
\"Value\": \"1020\"
\" CustomerID \": \"1234567890\"
}
],
\"Weight\": 1.0,
\"Quantity\": 1,
\"Volume\": 0.0,
\"Mark \": \ "handle with care \"
}" ;

//MD5 encryption of (jsonstr + apikey)
string md5Str=MD5(jsonStr + apiKey, charset);
//Code md5str with Base64
string base64Str=base64(md5Str,charset);
//URL encoding (UTF-8)
string datasign = HttpUtility.UrlEncode(base64Str, charset); 
//Request message parameters 
string postStr = "RequestType=reqType&EBusinessID= eEBusinessID&RequestData=jsonStr 
&DataSign= datasign&DataType=dataType"; 
//The communication protocol uses HTTP protocol post request to return trajectory data
string post = SendPost(reqURL, postStr);
//The obtained post data is the complete message returned by the express bird. Next, you can get the field information by writing a method to parse JSON.

9.3, C ා call method

///<summary>

///String MD5 encryption // < / summary >
///< param name = "STR" > string to encrypt < / param >
///< param name = "charset" > encoding mode < / param >
///< returns > ciphertext < / returns >
private string MD5(string str, string charset)
{ byte\[\] buffer = System.Text.Encoding.GetEncoding(charset).GetBytes(str); try {
        System.Security.Cryptography.MD5CryptoServiceProvider check;
        check = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte\[\] somme = check.ComputeHash(buffer); string ret = ""; foreach (byte a in somme)
        { if (a < 16)
                ret += "0" \+ a.ToString("X"); else ret += a.ToString("X");
        } return ret.ToLower();
    } catch { throw;
    }
} /// <summary>
///Base64 encoding
///< param name = "STR" > content < / param >
///< param name = "charset" > encoding mode < / param >
/// <returns></returns>
private string base64(String str, String charset)
{ return Convert.ToBase64String(System.Text.Encoding.GetEncoding(charset).GetBytes(str));

} /// <summary>

///Submit data in post mode and return the source code of the web page
///< param name = "URL" > the URL to send the request < / param >
///< param name = "postData" > request message parameters < / param >
///< returns > response results of remote resources < / returns >
private string SendPost(string url, string postData)
{ string result = ""; byte\[\] byteData = Encoding.GetEncoding("UTF-8").GetBytes(postData.ToString()); try {
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
        request.ContentType = "application/x-www-form-urlencoded";
        request.Referer = url;
        request.Accept = "*/*";
        request.Timeout = 30 \* 1000;
        request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152;

.NET CLR 3.5.30729)”;

        request.Method = "POST";
        request.ContentLength = byteData.Length;
        Stream stream = request.GetRequestStream();
        stream.Write(byteData, 0, byteData.Length);
        stream.Flush();
        stream.Close();
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        Stream backStream = response.GetResponseStream();
        StreamReader sr = new StreamReader(backStream, Encoding.GetEncoding("UTF-8"));
        result = sr.ReadToEnd();
        sr.Close();
        backStream.Close();
        response.Close();
        request.Abort();
    } catch (Exception ex)
    {
        result = ex.ToString();
    } return result;
}

10. Shunfeng electronic sheet printing template content (HTML)

<!DOCTYPE html>
<html lang=”zh-CN”>
<!–100*150,90–>
<head>

<meta charset="UTF-8">
<style> \* { margin: 0; padding: 0; font-family: "simsun";
} .print_paper { font-size: 14px; border: none; border-collapse: collapse; width: 375px; margin-top: -1px; table-layout: fixed;
} .print_paper td { border: solid #000 1px; padding: 0 5px;
} .table_first { margin-top: 0;
} .print_paper .x1 { font-size: 32px; font-weight: bold; text-align: center; letter-spacing: 5px; line-height: 0.95; font-family: "Microsoft YaHei";
} .print_paper .x4 { font-size: 20px; font-weight: bold; font-family: "Microsoft YaHei";
} .print_paper .xx8 { font-size: 8px; line-height: 0.8;
} .print_paper .xx10 { font-size: 10px;
} .print_paper .xx12 { font-size: 12px; font-weight: bold;
} .print_paper .xx14 { font-size: 14px; font-weight: bold; font-family: "SimHei";
} .print_paper .xx16 { font-size: 16px; font-weight: bold; font-family: "Microsoft YaHei";
} .print_paper .xx48 { font-size: 40px; font-weight: bold; text-align: center; font-family: "Microsoft YaHei";
} .no_border { width: 100%; height: 100%; font-size: 14px;
} .no_border td { border: none; vertical-align: top;
} .print_paper .fwb { font-weight: bold;
} .print_paper .f24 { font-family: "Arial"; font-size: 24pt;
} .print_paper .f20 { font-family: "Arial"; font-size: 20pt;
} .print_paper .p0 { padding: 0;
}
/*Add class * /. Print_ paper .p0 .sp { position: absolute; left: 3px; top: 110px;
} .print_paper .ovh { overflow: hidden;
} .print_paper .ov { overflow: visible;
} .print_paper .f10 { font-size: 10px;
} .print_paper .f13 { font-size: 13px;
} .print_paper .bln { border-left: none;
} .print_paper .brn { border-right: none;
}
</style>

</head>
<body>

<table class="print\_paper table\_first">
<tr height="53">
<td>
<table class="no_border">
<tr>
<td style="vertical-align: middle;">
<img class="logo" height="35" />
</td>
<td style="vertical-align: middle;" colspan="2">
<!--&nbsp;-->
<div class="f20" style="font-weight: bold;">
&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</td>
<!--<td style="vertical-align:middle;">&nbsp;</td>-->
<td style="vertical-align: middle; text-align: right; position: absolute; left: 264px">
<img height="35" class="phone" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="print_paper">
<tr height="65">
<td class="p0" width="249" style="text-align: center;">
<img width="249px" /> <span class="sp" style="font-size: 11px;display: none">1&nbsp;/&nbsp;1</span>
<br />
<div style="font-size: 11px; font-weight: bold;">
< span style = "display: None" > sub doc No. & nbsp; 55555555 < br / > parent doc No. & nbsp; 888888888888888</span>
< span style = "display: block; margin top: 3px;" > waybill No. & nbsp; 5622033142418</span>
< span style = "display: none; margin top: 10px;" > check back No. & nbsp; 355233142418</span>
</div>
</td>
<td class="xx16 p0">
< div style = "height: 74px;" > SF standard express < br / > < span class = "Xx10" > destination:</span>
<div class="f24">010</div>
</div>
</td>
</tr>
</table>
<table class="print_paper" height="50">
<tr>
To:</td>
<td class="bln">
< div style = "height: 59px; overflow: hidden;" > Chaoyang District, Beijing
< span style = "width: 297px; display: inline block;" > Yang * * & nbsp; 1590 * * * 89</span>
</div>
</td>
</tr>
</table>
<table class="print_paper" height="58">
<tr>
< TD rowspan = "2" style = "vertical align: top;" class = "f13" > monthly settlement account number: 3434555 < br / > payment method: mail payment monthly settlement < br / >
< div style = "display: None" > declared value: 0 < / div >
< div style = "display: None" > sign return No.: ${signwaybillcode} < / div >
< div style = "display: None" > operation requirements: ${operatrequire} < / div >
</td>
< TD height = "45" > payment for goods received on behalf: ¥ 0 < br / > card number:</td>
</tr>
<tr>
<td>Freight: - < br / > total cost: -</td>
</tr>
</table>
<table class="print_paper" height="68" width="100%">
<tr>
< TD class = "xx14 BRN" width = "50" style = "padding: 0;" > from:</td>
<td class="ov bln" style="width: 136px;">
<div class="xx10" style="width: 115px; height: 66px;">
< div style = "height: 40px; overflow: hidden" > Qingxi Town, Dongguan City, Guangdong Province
<div style="width: 140px;overflow: hidden;">
< span style = "width: 52px; display: inline block;" > footwear factory
< div class = "Xx10" style = "margin left: - 45px; position: absolute; top: 337px;" > original address: 339 < / div >
</div>
</td>
< TD class = "Xx10" width = "86" > receiver: < br / > date of mailing: 2020-02-05 11:34:24</td>
Signature of receiver: < br / > < br / > date:</td>
</tr>
</table>
<table class="print\_paper table\_first" height="60">
<tr height="55">
<td>
<img class="logo" height="30" /> <img class="phone" height="30" />
</td>
<td style="text-align: center;">
<img />
< span style = "display: None" > sub Order No. & nbsp; 23423434</span>
<span style="display: block">234234</span>
<span style="display: none">243234324</span>
</td>
</tr>
</table>
<table class="print_paper ">
<tr height="76">
< TD class = "BRN" style = "padding: 0; width: 16px;" > to < br / > by:</td>
<td class="xx10 bln">
< div style = "height: 67px; overflow: hidden;" > Qingxi Town, Dongguan City, Guangdong Province
<span style="width: 164px;display: inline-block;">
< span style = "width: 52px; display: inline block;" > footwear factory < / span > 13288 * * * 80</span>
</div>
</td>
< TD style = "padding: 0; width: 16px;" class = FWB BRN > < br / > Party:</td>
<td class="xx10 bln">
< div style = "height: 67px; overflow: hidden" > Chaoyang District, Beijing
<span style="width: 164px;display: inline-block;">
< span style = "width: 52px; display: inline block;" > Yang * * < / span > 1590 * * * 89</span>
</div>
</td>
</tr>
</table>
<table class="print_paper">
<tr height="18">
< TD width = "36" style = "padding: 0; text align: Center;" > quantity</td>
< TD width = "254" style = "padding: 0; text align: Center;" > consignment</td>
< TD style = "padding: 0; text align: Center;" > remarks</td>
</tr>
<tr height="34">
<td>&nbsp;</td>
<td>Baby products</td>
<td>
<div class="f10 ovh" style="height: 33px"></div>
</td>
</tr>
<tr height="40">
<td colspan="2">
<table class="no_border">
<tr>
<td>Order number</td>
<td class="xx14" style="vertical-align: middle; text-align: center;">
<br />2355334314 </td>
</tr>
</table>
</td>
< TD style = "text align: Center;" > total cost: < br / > \ - yuan</td>
</tr>
</table>

</body>
</html>

Copy the above HTML content and save it in HTML format to view the template effect.

11. About signature

Express bird and the third-party e-commerce company system docking, there is a certain security mechanism. Using IP authentication and signature
The specific scheme is as follows:

Prevent data tampering
Five required (R) parameters are passed in the post request
Requestdata = = data content (URL Code: UTF-8)
Ebusinessid = = user ID
Requesttype = request instruction type
Data sign = = data content signature: MD5 encryption of (request content (not encoded) + apikey), and then Base64
Finally, the URL (UTF-8) is encoded
Datatype = = 2 (return data type is JSON)
Note:
After the datasign is generated, the other party receives the data and signs with the same algorithm (push interface requesttype is
101 / 102 does not need to be URL encoded), generate a summary, and compare whether the two abstracts are the same. If different, it indicates that data tampering occurred in the transmission process.
Authentication of calling interface
After registering as a express bird user, the corresponding user ID and apikey will be generated. The user ID is equivalent to the user name,
Apikey is equivalent to a password.

12. Precautions

12.About SF monthly settlement account interface transfer value

Monthcode is transferred to SF monthly settlement account number (not to be filled when paytype is 1 and 2, and required when paytype is 3 and 4),

Paytype transfer value payment method (including: 1-cash payment, 2-payment on arrival, 3-month settlement, 4-third-party payment),

Two fields should be left in the customer number configuration page (the above two fields should be correctly corresponding) to be filled in by the shipping merchant. It is suggested that the configuration page should be kept in the system developed by the merchant. What if the account number is changed?

Note:If the merchant’s monthly settlement account number can send the corresponding express type, please confirm with SF Express branch personnel in advance. Except for 1, 2, 5 and 6, other express delivery types need to sign a separate agreement.

12.On the value transfer of SF express value added service

    • Insured

Field transfer value: “addservice”: [{“name”: “insure”, “value”: “1000”}]

    • Collection of payment for goods

Field transfer value:_ “AddService”:[{“Name”:”COD”,”Value”:”1000″,”CustomerID”:”1234567891″}]_

    • Mother and son parts

If the quantity value is greater than or equal to 2, it indicates the child parent part, and the corresponding subcount sub order quantity, suborders sub Order No. and subprinttemplates sub order HTML template will be returned;

    • Receipt

If isreturnsignbill passes 1, it means that a check-in is required, and the corresponding signbillprinttemplate HTML template of the check-in is returned. The default value is 0, not required;

Operatrequire refers to the operation requirements of receipt (such as signature, seal, copy of ID card, etc.);

    • Appointment of courier

Isnotice indicates whether to inform the courier to pick up the goods, 0-notice, 1-no notice, the default value is 1;

12.4 about whether it is necessary to make an appointment for a courier to collect the goods at home:

1. If the delivery point is not fixed in all parts of the country, and the courier needs to pick up the goods at home, then make an appointment (in this case, it is necessary to restrict the reservation user. You must make an appointment in person, and the appointment can be made only after the verification code of the mobile phone is successful, otherwise, the user may place an appointment maliciously, which will lead to SF Express’s complaint);

2. If the goods are delivered from several fixed locations and need to be delivered every day, you can negotiate with the courier off-line at a fixed time and place a fixed person to collect the goods on site, and there is no need to make an appointment on the interface;

3. If the goods are delivered from a fixed place and only a few tickets are sent occasionally, one of the orders will be reserved randomly if the front sheet is printed by yourself. If the courier needs to print, all the orders will be reserved (whether the courier can print depends on the local outlets of SF express);

Note:If SF express complains to express bird for more than 3 times due to malicious appointment, the express bird will disable the user’s access to this interface;

    • Subscribe to SMS notification of logistics node

Logistics node SMS includes: sending SMS, sending SMS, signing SMS, problem SMS, etc;

Field value: issendmessage 0 – not required, 1 – required

SMS notification is a charging service, which can be used only after contacting business colleagues to purchase member package or SMS package.

12.5, electronic surface single template style

There are 5 specifications of SF express template, which are as follows

2. Duplex 150 (default template, the value of templatesize is empty)

? triple 210 (templatesize transfer value 210)

Two 180 new (templatesize transfer value 180)

Two 150 high density surface sheet (templatesize transfer value 15001)

? triple 210_ Rich and dense noodles_ (templatesize: 21001)

  • : special characters not supported by express company: ‘”# – +% < > please confirm whether the above special characters are included in the request data (including all order data such as the name of the sender, telephone number, address, commodity name, etc.);
  • The order No. ordercode of the interface for placing an e-bill cannot be reused. If it is reused, an error will be reported and the returned surface order is the content of the last order placed by this order number;
  • The default template template size does not need to be transferred. Non default template is transferred to the corresponding template size, and non-existent template size code cannot be transferred;
  • If you do not need to deliver the order successfully, you can tear up the surface bill directly, and there is no need to cancel it (if you have to cancel the “electronic face sheet cancellation interface”, the courier will charge after receiving the delivery, and no charge will be charged for the order number;
  • Non delivery means that the delivery address is not within the service scope of SF express. The specific receiving and dispatching scope can be viewed on SF Express’s official website http://www.sf-express.com/cn/… , can be replaced by other express delivery;