Electronic surface single picture interface

Submit and generate e-face sheet through the e-face sheet account provided by express companies or outlets, Cainiao and Taobao; Through the management background template configuration, select a single template and can be edited, generated picture output, optional print.

1.1 Interface Format

Provides a uniform format HTTP POST or GET invocation interface and returns uniform format JSON data.

1.2 Requesting an Address

https://poll.kuaidi100.com/printapi/printtask.do

Request parameters (header)

The name of the type The default value
Content-Type string application/x-www-form-urlencoded

Request Parameters (Body)

Parameter names If required type instructions
method is string Business type (default: getPrintImg)
key is string Authorization code, pleaseApply for enterprise EditionTo obtain
sign is string 32 capsMD5 encryption is performed in the sequence of MD5 (Param +t+key+ secret). Secret is checked in the enterprise management background
t is string Time stamp: 1576123932000
param is string Concatenated by other fields

Param data structure:

Parameter names If required type instructions
type is string The default value is 10
partnerId is string Electronic single customer account or monthly settlement number, you need to apply to the local express company network (referenceGuide to e-form application); Check whether this attribute is requiredParameters of the dictionary
partnerKey no string The password of the electronic sheet needs to be applied to the local express company network; Check whether this attribute is requiredParameters of the dictionary
partnerName no string This parameter is mandatory when net is jdalpha
net no string The name of the receiving point shall be assigned by the local branch of the express company. If Taobao authorization is used, Cainiao authorization is used. Check whether this attribute is requiredParameters of the dictionary(To obtain partnerId through Taobao/Cainiao authorization,partnerKey parameter is mandatory, and parameter value can be obtained through cainiao Taobao account authorization interface)
tbNet no string When using cainiao/Taobao/Padoduo authorized electronic list, if there are more than one outlets under the monthly settlement number, tbNet=” outlet name, outlet number “, note that the English comma is here
kuaidicom is string Express company code, all lowercase letters, seeParameters of the dictionary
recManName is string Name of recipient
recManMobile is string Either the recipient’s mobile phone number or phone number is mandatory
recManPrintAddr is string The complete address of the recipient, such as Kingdee Software Park, No. 2, 12 South Keji Road, Nanshan District, Shenzhen city, Guangdong Province
sendManName is string Name of sender
sendManMobile is string Sender’s mobile phone number, mobile phone number or telephone number must be filled in
sendManPrintAddr is string Full address of sender, such as B10, Kingdee Software Park, No. 2, South 12th Keji Road, Nanshan District, Shenzhen city, Guangdong Province
tempid is string Obtain the value from the template configuration information printed on the management background
cargo no string Article name, for example: document
count is string Total quantity of items. NeedChild = 1 and count must be greater than 1. For example, if count = 2, a master order must have one sub-order, and if count = 3, a master order must have two sub-orders. The returned suborder number is shown in the childNum field of the returned result
weight no string Total weight KG, for example: 1.5, unit KG
payType no string SHIPPER: SHIPPER (default) CONSIGNEE: prepaid MONTHLY: MONTHLY settlement THIRDPARTY: third-party payment (please refer to details)Parameters of the dictionary)
expType no string Express type: standard express (default) SF Express standard express (land transport) EMS economy, etc. (for details, please refer toParameters of the dictionary)
remark no string note
Surface single extension property
valinsPay no string Valuation quota
collection no string Amount of collection
needChild no string Whether sub-orders are required: 1: yes 0: no (default) If sub-orders are required (multiple electronic sheets are printed out for the same order, that is, multiple sheet numbers are returned for the same order); NeedChild = 1, count must be greater than 1, for example, count = 2, one primary order, one suborder, and count = 3, one primary order, two suborders. For the returned suborder numbers, see the childNum field of the returned result
needBack no string 1: yes 0: no (default) For the returned bill number, see the returnNum field in the returned result
orderId no string The order number defined by your company should be unique
height no string The height of the generated image, in mm, for example, 100
width no string The width of the generated image, in mm, for example, 75
salt no string Signature is a random string
op no string Whether to enable the subscription function 0: disabled (default) 1: enabled Note When the subscription function is enabled, pollCallBackUrl Must be set. This function applies only to the order with the express waybill number
pollCallBackUrl no string If op is set to 1, pollCallBackUrl must be filled in to track callbacks
resultv2 no string Adding this field indicates that the administrative region parsing function is enabled. For details, see the description in the Express Information Push interface document. 0: disable (default) 1: enable the administrative area resolution function

About receipt: The outlets supporting receipt include SF express, SF Express, Deppon Express, Deppon Logistics, JINGdong, Cross over, Huisen Express, Plus Yunmei Logistics, and Smoothly Jetta; Cainiao face sheet supporting receipt includes SHENTong Express, Zhongtong Express, Yunda Express, Deppon Express;

About a single: support child single dot surface including motion, along abundant express, gravels, express, and gravels, jingdong logistics, jun, express delivery, express delivery, speed, one letter feng logistics, optimal speed express, just-in-time, yuantong commitment, kalumpang express, D speed express, hui’s speed, and the logistics, beijing-guangzhou express delivery, satisfactory jetta, one meter ticking; Cainiao face sheet supporting sub-single includes SHENTong Express, Zhongtong Express, Yunda Express, Debang Express, Anneng Express, Best Express;

1.3 Example Request Parameters

method = getPrintImg key = kytRsteof sign = 4BBDE07660E5EFF90873642CFAE9A8DD t = 1470304729724 param = { "type": "10", "partnerId": "******", "partnerKey": "******", "net": "taobao", "kuaidicom": "ems", "recManName": "Zhang SAN ", "recManMobile": "13842569988", "recManPrintAddr":" Kingdee Software Park ", "sendManName": "B10, Kingdee Software Park, No. 2, Keji South 12th Road, Nanshan District, Shenzhen City, Guangdong Province "," TempID ": "E41bbe3a3c764409a8562b2715f656b2" and "cargo", "invoice", "count" : "1", "weight" : "0.5", "payType" : "SHIPPER", "expType" : "Standard express", "remark" : ""," remark ":" ", "collection" : ""," needChild ":" ", "needBack" : ""," orderId ":" ", "height" : "100", "width": "75", "salt": "123456789", "op": "0", "pollCallBackUrl": "", "resultv2": "0" }Copy the code

1.4 Result

field type instructions note
result boolean Submit the results True The submission succeeds. False the submission fails
returnCode string Return codes
message string Return message description
data data

Data structure

field type instructions note
taskId string Task ID
kuaidicom string Express Company Code
kuaidinum string Courier number
imgBase64 string Face single BASE64 encoded picture The property is a JsonArray structure. If there is only one plane, the size is 1; if there are children and parents, the size is >1
* * * * * string The attached attributes of the express list are returned according to each express company

1.5 Example of Returning packets

{  
    "result": true."returnCode": "200"."message": "Submission successful"."data": {
        "taskId": "* * * *"./ / task ID
    	"kuaidicom": "* * * *".// Express company code
    	"kuaidinum": "* * * *".// The tracking number
    	"imgBase64": "* * * *".// a single BASE64 encoded image* * * * * *}}Copy the code

1.6 Code meaning of the Returned Information

Information code Information Description Causes and recommended handling methods
200 Submitted successfully Submitted successfully
400 Parameter error Note the parameter type and whether it is mandatory according to the technical document request.
500 Server error The server of Express 100 has a clearance or temporary exception. Sometimes, if the request is not submitted according to the specification, for example, the parameters of express company are written wrong, this error will be reported
501 Repeat submit Submit the print request repeatedly
502 The submitted content contains sensitive keywords and is blocked by security protection Check the submitted content, can find express 100 staff troubleshooting
503 Failed to verify the signature Check the encryption mode. MD5 encryption is performed for the sequence of param +t+key+ secret. After the encryption, the string is converted to 32-bit uppercase letters without the + sign
600 You are not a legitimate customer (i.e. authorization key error) Account has no available single volume, need to recharge
601 The KEY is expired Account has no available single volume, need to recharge
601 Failed to verify the single account on the e-face. Please confirm whether the account information is correct The incoming e-address account information is incorrect. Contact your local branch to obtain the correct account information.
602 If the quantity balance of electronic surface order is insufficient, please contact customer service of cooperative outlets to recharge The number of e-surface order of the account of the express company’s outlet is insufficient, so you need to recharge the number of e-surface order at the outlet.
603 Unable to obtain administrative information Please fill in the detailed provincial information
604 The Courier company does not support sub-tracking numbers Please check 1.2 Courier companies that support sub-orders
605 The express company does not support receipt Please check 1.2 Express companies that support receipt
606 Business type error Select the appropriate business type from the parameter dictionary
607 The recipient’s mobile phone number or phone number cannot be empty at the same time Incoming recipient’s mobile number or phone number
610 Cainiao electronic face sheet authentication information expired, please re-authorize Cainiao authorization is valid for one year and will be re-authorized upon expiration
697 Electronic sheet request failed, please print again Note the parameter type and whether it is mandatory according to the technical document request.

The official documentation resources: api.kuaidi100.com/document/5f…