系统API接口,支持对接第三方API开发


一、总概

1.1、通讯协议遵循 HTTP (1.0/1.1)
1.2、数据包装采用JSON,遵循RFC4627
     非ASCII字符编码:UTF-8 (65001) 或者 \u转义
     *特别提示,共有8个ASCII码采用x编码转义:
     "(双引号) = \x22
     \(反斜杠) = \x5C
     /(斜杠)   = \x2F
      (换行符) = \x0A
      (回车符) = \x0D
      (制表符) = \x09 (罕用)
      (退格符) = \x08 (极罕用)    
      (换页符) = \x0C (极罕用)
     *POST数据,遵循上述编码规则,建议不进行URL_Encode(定义URL_ENCODE=1,强制URL_ENCODE)
      
1.3、接口API为:“/cgi-bin/EmsData.dll?DoApi”
1.4、接口请求方式为:POST
1.5、安全控制,MD5数字签名,绑定客户ID、客户密钥,通过与时间戳生成摘要码验证。
1.6、服务器程序配置:
     EmsData.dll为IIS的筛选、扩展程序,与GInfo.dll同类,在配置GInfo.dll的系统上,配置该筛选器及扩展模块
     EmsData.dll使用GInfo.dll的服务器安全配置参数。所以在GInfo配置并成功运行后,再简单添加EmsData.dll即可。



二、JSON命名规范

2.1、RequestName:发起请求名称,为请求方的第一个顶级成员名称,定义如下:
     {"RequestName":"TimeStamp"}: *服务器时间戳获取
     {"RequestName":"GenerateMD5","cString":"1881405534421123xxxxxxxx"}: *获取MD5,用于调试

     {"RequestName":"EPostUpload","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 提交eub数据,获取eub单号
     {"RequestName":"EPostPdf","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cqNo":"LN562467349CN"}: 下载eub的标签(pdf格式)
     {"RequestName":"DoGetNo","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: (提前)提取运单号

     *如下接口帮助参阅help_app.txt中的同名接口帮助*
     {"RequestName":"PreInputSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 客户预录单数据写入(添加、修改)

     *如下为仓库模块(wu),所有仓库接口必须包含cDepot(仓库编码),用于识别仓库
     {"RequestName":"wGoodsInfo","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 查询物品信息
     {"RequestName":"wInQuery","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 物品入库清单
     {"RequestName":"wInTotal","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 物品入库汇总
     {"RequestName":"wOrderSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 订单记录添加、修改
     {"RequestName":"wOrderDel","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 订单删除
     {"RequestName":"wOutQuery","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 物品出库清单
     {"RequestName":"wOutTotal","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 物品出库汇总
     {"RequestName":"wOrderTotal","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 未确认出库订单物品汇总
     {"RequestName":"wOrderInfo","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"XYZ",...}: 查询订单信息
      
      *如下为转发打包操作*ver:5.6
     {"RequestName":"RecTransBagSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发打包数据添加
     {"RequestName":"RecTransBagDel","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发打包数据删除
     {"RequestName":"RecTransSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发预报到件数据添加
     {"RequestName":"RecTransDel","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发预报到件数据删除
     {"RequestName":"RecTransData","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发预报到件数据单票查询,返回完整数据
     {"RequestName":"RecTransList","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发预报到件数据列表查询    

     {"RequestName":"wGoodsPicSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 物品定义图片添加
     {"RequestName":"wGoodsPicQuery","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 物品定义图片查询(添加了那些位置的图片)
     {"RequestName":"wGoodsPicGet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 物品定义图片数据获取

     {"RequestName":"RecTransBagSetEx","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f",...}: 转发打包数据整体添加(=RecTransSet+RecTransBagSet)


2.1.2、除第1、2通用请求(*)外,每一个请求都必须包含成员变量:icID、TimeStamp、MD5。
2.1.2.1、icID:客户在EMMis中建档时由系统生成的唯一整数值,同时还应该点击“客户API密钥”,为客户设置密钥(修改密钥通常需要重新启动www服务)
2.1.2.2、TimeStamp:时间戳,1970.1.1 0:0:0开始到请求时刻的毫秒数(UTC),13位整数。注意北京时间为东8区,需要调整时差。
2.1.2.3、MD5:数字签名,=MD5(icID+TimeStamp+客户密钥)
         *比如客户密钥为“1234ABCD”,如上例程为:MD5("7914055344211231234ABCD")="306f241be2d5963f20be2966f9961f55"
2.1.2.4、MD5:加强的数字签名,=MD5(icID+TimeStamp+客户密钥+消息ID)
         *比如客户密钥为“1234ABCD”,
         请求数据为:{"RequestName":"DoGetNo","icID":79,"TimeStamp":1405534421123,"cUniqueMsgID":"6d950424-032a-4ebd-832d-8d643e4f7d98","MD5":"f48b3bac260f5902b2aca9f8e59ebf77",...}
         如上请求:MD5("7914055344211231234ABCD6d950424-032a-4ebd-832d-8d643e4f7d98")="f48b3bac260f5902b2aca9f8e59ebf77"
         *消息ID字节长度:0-36字节,确保在一定的时间阀值内唯一!

2.2、ReturnValue:响应返回状态码,为响应方的第一个顶级成员名称,整数值,通用定义如下:
    {"ReturnValue":0,...}: 没有结果或零处理

    {"ReturnValue":1,...}: 大于零,结果数或处理记录数,为成功的标识
    
    {"ReturnValue":-1,...}: 唯一性字段值重复,操作失败
    {"ReturnValue":-2,...}: 记录不存在,操作失败
    {"ReturnValue":-3,...}: 未提供必须的请求参数,操作失败
    {"ReturnValue":-4,...}: 请求不支持,版本错误或请求未实现
    {"ReturnValue":-5,...}: Json数据格式错误,未解析出"RequestName"
    {"ReturnValue":-6,...}: Json数据格式错误,双引号(")配对异常
    {"ReturnValue":-7,...}: 安全校验失败,不是配置的IP或数字签名错误
    {"ReturnValue":-8,...}: 未获授权
    {"ReturnValue":-9,...}: EmsData.dll程序错误,通常为数据库查询失败
    {"ReturnValue":-999,...}: 超过并发线程极限,稍后再试!请控制并发请求数!
    {"ReturnValue":-9999,...}: 数据库忙,稍后再试!

    {"ReturnValue":-710,...}: icID 错误,未提供或小于1
    {"ReturnValue":-711,...}: icID 错误,客户不存在或者未配置合法密钥
    {"ReturnValue":-720,...}: TimeStamp 错误,超出了同步阈值
    {"ReturnValue":-730,...}: MD5 错误,长度不是32字符
    {"ReturnValue":-731,...}: MD5 错误,不匹配
    {"ReturnValue":-732,...}: 消息ID(cUniqueMsgID)不唯一
    {"ReturnValue":-733,...}: 消息ID(cUniqueMsgID)空 (系统配置必须提供时)
    {"ReturnValue":-810,...}: cEmsKind错误,不支持
    {"ReturnValue":-820,...}: iSP_Type错误,接口不支持
    {"ReturnValue":-821,...}: iSP_Type错误,相关接口未初始化

    *负数值均为失败,更多的含义在具体的请求中定义。

2.3、记录字段命名采用类匈牙利命名法,第一个符号小写,为字段数据类型,名称实词首字母大写
    n:单字节正整数,取值0-255,常为枚举值。如:nItemType(快件类型)
    d:日期,实际为一固定格式字符串,格式为:“YYYY-MM-DD hh:mm:ss”,年月日为必须。如:dDate(业务日期)
    i:4字节整数,取值+-2^31。如:iItem(件数)
    f:双精度数,精确小数位数因字段而异。如:fWeight(重量,3位小数)
    b:逻辑值,true/false。如:bSmsSend(是否发派件短信)
    c:字符串,合法的长度区间,长度按ANSI字节计算。如:cRName(收件人姓名,1-62字节)





三、各请求详解及例子  



3.1、EPostPdf

3.1.1、请求:
API: /cgi-bin/EmsData.dll?DoApi
POST_DATA: {"RequestName":"EPostPdf","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cqNo":"LN562467349CN","iSP_Type":0}

iSP_Type:接口类型,默认0。(0:EUB;1:澳邮交接)
cEmsKind:快递类别,0-15字符,如果未提供iSP_Type(大于1时),可提供cEmsKind
*iSP_Type 和 cEmsKind 提供一个即可,用于多渠道识别。
cqNo:运单号,7-30字符,必须。转单号。

3.1.2、响应:
失败:{"ReturnValue":-10}
成功:pdf文件数据
3.1.2.1、字段名解释
ReturnValue:失败时的错误代码:
             -3:未提供“cqNo”或不是eub的单号
             -10:未准备好数据,稍后再试。eub的pdf数据通常在转单号数据提交后10秒左右准备好

cqNo:从eub获取的单号





3.2、TimeStamp

3.2.1、请求:
API: /cgi-bin/EmsData.dll?DoApi
POST_DATA: {"RequestName":"TimeStamp"}

3.2.2、响应:
{"ReturnValue":1409591437000}
3.2.2.1、字段名解释
ReturnValue:服务器时间戳,1970.1.1 0:0:0 到此刻的毫秒值(UTC),可用于时间戳错误(-720)校验



3.3.1、EPostUpload
3.3.1、请求:
  a.非ASCII编码为UTF-8
{"RequestName":"EPostUpload","icID":79,"TimeStamp":1416458014000,"MD5":"ddcf481543088e8d22c4a52a3e92bc53","iSP_Type":0,"cNum":"EE1020472289","cEmsKind":"SKYNET","cDes":"美国","fWeight":1.000,"cReceiver":"bbERRe3266","cRAddr":"LOS ANGELES COUNTY\x0D\x0AALHAMBRA , CA 91801 , USA","cRCity":"ALHAMBRA","cRProvince":"CA","cRCountry":"UNITED STATES OF AMERICA","cRPostcode":"91801","cRPhone":"1394333344121","cRSms":"","cGoods":"玉米","cGoodsA":"MAIZE","iQuantity":1,"fPrice":11.00}

  b.或者对于非ASCII进行转义编码:
{"RequestName":"EPostUpload","icID":79,"TimeStamp":1416505667000,"MD5":"f2ceda7fe738181941994c7ab2a4dfa3","cNum":"EE55520472289","cEmsKind":"SKYNET","cDes":"\u7F8E\u56FD","fWeight":1.000,"cReceiver":"bbERRe3266","cRAddr":"LOS ANGELES COUNTY\x0D\x0AALHAMBRA , CA 91801 , USA","cRCity":"ALHAMBRA","cRProvince":"CA","cRCountry":"UNITED STATES OF AMERICA","cRPostcode":"91801","cRPhone":"1394333344121","cRSms":"","cGoods":"\u7389\u7C73","cGoodsA":"MAIZE","iQuantity":1,"fPrice":11.00}

3.3.1.1、字段名解释
icID:客户ID,客户唯一识别。

#如下为记录对象的成员,依据网络渠道,提供相应的字段

iSP_Type:接口类型,默认0。(0:EUB;1:澳邮交接)
cNum:运单号,7-30字符,必须。内单号或客户订单号
cEmsKind:网络渠道,1-15字符,必须。
fWeight:重量,公斤,3位小数。
iLong:长,厘米。不必须
iWidth:宽,厘米。不必须
iHeight:高,厘米。不必须

nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
iItem:件数,默认1。
nPayWay:付款方式,默认为0。取值为:0(月结),1(现付),2(到付)
fAmount:快递费,2位小数。

cReceiver:收件人,1-63字符。
cRUnit:收件单位,0-254字符。不必须
cRAddr:收件地址,1-254字符。
cRCity:收件城市,1-126字符。
cRPostcode:收件邮编,4-15字符。
cRProvince:收件省州,2-63字符。
cRCountry:收件国家,4-126字符。
cRPhone:收件电话,4-63字符。
cREMail:收件电邮,0-63字符。不必须
cRSms:收件移动电话,4-22字符。

cGoods:物品描述,中文,2-254字符。不短于两个汉字
cGoodsA:物品别名,为英文描述,1-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cTransNote:托运备注,0-63字符。不必须
cPrintCode:打印控制编码,0-15字符。不必须(00-a4;01-4*4;03:4*6)

cMark:标签,0-15字符。
cReserve:留用串,0-30字符。
iReserve:留用数,默认0
cBy1:备用1,0-63字符。
cBy2:备用2,0-63字符。
cBy3:备用3,0-63字符。
cBy4:备用4,0-63字符。
cBy5:备用5,0-254字符。
cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。


cMoney:货币代码,0-3字符。
fGoods:物品货值,代收货款收件人支付的货值,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cOrigin:原产地国家代码,0-3字符。
cGoodsA:物品别名,通常为英文描述,0-254字符。
cGCodeA:物品甲码,通常为HS编码,0-63字符。
cGCodeB:物品乙码,通常为统一编码,0-63字符。
cGCodeC:物品丙码,通常为客户编码,0-63字符。
fGCustom:关税额,2位小数。
fGCRate:税率,4位小数。


3.3.2、响应:
成功:{"ReturnValue":1,cNum":"EE1020472289",cNo":"LN562467349CN","cMess":"","cReserve":"留用串","cBy1":"","cBy2":"","cBy3":"","cBy4":"","cBy5":"Test备5"}
失败:{"ReturnValue":-12,cNum":"EE1020472289",cNo":"","cMess":"收件国家空"}
-810:网络渠道(cEmsKind)错误
3.3.2.1、字段名解释
ReturnValue:1,成功。负数,失败(-12:数据提交或检查错误,解释参见“cMess”)
cNo:获取的运单号!
cMess:错误信息,0-63字符。
cReserve:留用串,0-30字符。
cBy1:备用1,0-62字符。
cBy2:备用2,0-62字符。
cBy3:备用3,0-62字符。
cBy4:备用4,0-62字符。
cBy5:备用5,0-254字符。





3.4.1、DoGetNo
3.4.1、请求:
{"RequestName":"DoGetNo","icID":79,"TimeStamp":1416458014000,"MD5":"ddcf481543088e8d22c4a52a3e92bc53","iType":0,"cEmsKind":"国际小包"}

3.4.1.1、字段名解释
iType:运单号类别,默认0。(0:转单号;1:内单号)
cEmsKind:快递类别名称,1-15字节。


3.4.2、响应:
1,成功:{"ReturnValue":1,"cNo":"LN562467349CN","cReserve":"留用串","cBy1":"","cBy2":"","cBy3":"","cBy4":"","cBy5":"Test备5"}
0,单号资源耗尽。
负数:失败
-14:快递类别名称空
-15:快递类别无配置定义。(emsdata.ini)

cNo:获取的运单号!
*如下附加数据在提供cEmsKind(快递类别名称)时可能返回有效值
cReserve:留用串,0-30字符。
cBy1:备用1,0-62字符。
cBy2:备用2,0-62字符。
cBy3:备用3,0-62字符。
cBy4:备用4,0-62字符。
cBy5:备用5,0-254字符。




3.5、wGoodsInfo

3.5.1、请求:
{"RequestName":"wGoodsInfo","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","iPage":1,"iPagePer":5,"nqType":1}

3.5.1.1、变量名解释
iPage:页次,默认1
iPagePer:每页记录数,默认值0,有效值0-1000,(0 表示仅返回记录总数)
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,其它筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。
nqType:库存状况,默认0,枚举值:(0:忽略;1:库存不足;2:库存正常;3:库存过多。)


3.5.2、样例
3.5.2.2、响应:
{"ReturnValue":1,"iPage":1,"iPagePer":5,"iTotalRec":6,"cDepot":"A11","iqwGiid":0,"cqgCode":"","cqcCode":"","nqType":1,"RecList":[{"iID":10,"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","fWeight":5.110,"iEDays":0,"fPrice":222.00,"fPriceS":160.00,"fPriceB":190.00,"fPriceV":180.00,"fDValue":160.00,"fIValue":160.00,"fEValue":175.00,"cKind":"","iMin":10,"iMax":100,"iIn":1003,"iOut":1003,"iStock":0,"nState":0,"cMark":"","cMemo":""},{"iID":1,"iwGiid":1,"cgName":"打火机","cgNameE":"flight","cMemo_d":"退件","cgCode":"HGG42343214","ccCode":"BBFSA4243214","cUnit":"个","fWeight":0.010,"iEDays":365,"fPrice":70.00,"fPriceS":50.00,"fPriceB":65.00,"fPriceV":60.00,"fDValue":11.00,"fIValue":12.00,"fEValue":13.00,"cKind":"","iMin":999,"iMax":999,"iIn":9,"iOut":20,"iStock":-11,"nState":0,"cMark":"TestMark.","cMemo":"退件"},{"iID":3,"iwGiid":2,"cgName":"电视机","cgNameE":"TV Set","cMemo_d":"MEMO","cgCode":"DFASFASDFAS","ccCode":"DFHH442","cUnit":"台","fWeight":25.000,"iEDays":720,"fPrice":400.00,"fPriceS":220.00,"fPriceB":300.00,"fPriceV":250.00,"fDValue":220.00,"fIValue":220.00,"fEValue":220.00,"cKind":"电器","iMin":999,"iMax":999,"iIn":57,"iOut":5,"iStock":52,"nState":0,"cMark":"MMM","cMemo":"ORRO"},{"iID":8,"iwGiid":3,"cgName":"火锅","cgNameE":"","cMemo_d":"","cgCode":"33HH5254242","ccCode":"CGGRWRQW","cUnit":"口","fWeight":0.000,"iEDays":500,"fPrice":166.66,"fPriceS":122.22,"fPriceB":144.44,"fPriceV":133.33,"fDValue":122.21,"fIValue":133.31,"fEValue":111.11,"cKind":"","iMin":100,"iMax":999,"iIn":29,"iOut":16,"iStock":13,"nState":0,"cMark":"箱式包装","cMemo":"gggggg"},{"iID":4,"iwGiid":5,"cgName":"旗杆","cgNameE":"Flag pot","cMemo_d":"","cgCode":"TY342342433","ccCode":"KH42343242","cUnit":"杆","fWeight":23.500,"iEDays":80,"fPrice":55.50,"fPriceS":22.20,"fPriceB":44.40,"fPriceV":33.30,"fDValue":22.50,"fIValue":33.60,"fEValue":33.00,"cKind":"","iMin":999,"iMax":999,"iIn":21,"iOut":13,"iStock":8,"nState":0,"cMark":"","cMemo":""}]}


3.5.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,物品记录对象列表
iID:物品归库ID
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节
fWeight:重量
iEDays:保质期(天数)
fPrice:零售价
fPriceS:代售价
fPriceB:团购价
fPriceV:VIP价
fDValue:声明价
fIValue:投保价
fEValue:评估价
cKind:物品类别,0-30字节
iMin:最小库存
iMax:最大库存
iStock:库存量
iIn:入库总数
iOut:出库总数
nState:状态,枚举(0:营运;1:停售)
cMark:归库标签
cMemo:归库备注




3.6、wInQuery

3.6.1、请求:
{"RequestName":"wInQuery","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","iPage":1,"iPagePer":5,"cqDateB":"2013-01-01","cqDateE":"2015-06-01"}


3.6.1.1、变量名解释
iPage:页次,默认1
iPagePer:每页记录数,默认值0,有效值0-1000,(0 表示仅返回记录总数)
cqDateB:日期时间开始,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:日期时间结束,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
nqDateType:日期时间类别,默认0(预入库记录创建日期时间),1:入库确认日期时间
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,cqgCode|cqcCode筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。
nqType:记录状态,默认0,枚举值:(0:忽略;1:未审核(nState=0);2:已审核未入库确认(nState=10,20,30);3:已入库确认(nState=40)。)

3.6.2、样例
3.6.2.2、响应:
{"ReturnValue":1,"iPage":1,"iPagePer":5,"iTotalRec":46,"cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01","nqDateType":0,"iqwGiid":0,"cqgCode":"","cqcCode":"","nqType":0,"RecList":[{"iID":43,"iwGiid":14,"cgName":"退件","cgNameE":"","cMemo_d":"","cgCode":"HH423432LLLL","ccCode":"JJ342423432","cUnit":"","nType":1,"nState":40,"cBatch":"","cRNo":"HH333339999","dDate":"2013-01-29 10:19","dInDate":"2013-01-29 10:19","iQuantity":1,"fPick":0.00,"fQCIn":0.00,"fLabel":0.00,"fArrange":0.00,"iPic":0,"cMark":"","cMemo":""},{"iID":44,"iwGiid":14,"cgName":"退件","cgNameE":"","cMemo_d":"","cgCode":"HH423432LLLL","ccCode":"JJ342423432","cUnit":"","nType":1,"nState":40,"cBatch":"","cRNo":"PP333339999","dDate":"2013-01-29 10:19","dInDate":"2013-01-29 10:19","iQuantity":1,"fPick":0.00,"fQCIn":0.00,"fLabel":0.00,"fArrange":0.00,"iPic":0,"cMark":"","cMemo":""},{"iID":45,"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","nType":0,"nState":40,"cBatch":"B2013051011","cRNo":"","dDate":"2013-05-10 11:31","dInDate":"2013-05-10 11:33","iQuantity":1000,"fPick":0.00,"fQCIn":0.00,"fLabel":0.00,"fArrange":0.00,"iPic":0,"cMark":"","cMemo":""},{"iID":46,"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","nType":0,"nState":0,"cBatch":"","cRNo":"","dDate":"2013-07-17 12:03","dInDate":"","iQuantity":100,"fPick":0.00,"fQCIn":0.00,"fLabel":0.00,"fArrange":0.00,"iPic":0,"cMark":"","cMemo":""},{"iID":47,"iwGiid":1,"cgName":"打火机","cgNameE":"flight","cMemo_d":"退件","cgCode":"HGG42343214","ccCode":"BBFSA4243214","cUnit":"个","nType":0,"nState":10,"cBatch":"","cRNo":"","dDate":"2013-07-17 12:03","dInDate":"","iQuantity":120,"fPick":0.00,"fQCIn":240.00,"fLabel":720.00,"fArrange":120.00,"iPic":0,"cMark":"","cMemo":""}]}


3.6.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,入库记录对象列表
iID:入库记录ID
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节
nType:入库类型,枚举:(0:正常;1:退件;2:平仓)
nState:记录状态,枚举:(0:未处理;10:已审核;20:已提货确认;30:已质检;40:完成入库确认
cBatch:批次号,0-30字节
cRNo:参考号,0-30字节
dDate:记录创建日期时间
dInDate:入库确认日期时间
iQuantity:数量

fPick:上门提货费
fQCIn:入库质检费
fLabel:标签费
fArrange:理货费

iPic:关联图片数量
cMark:标签,0-15字节
cMemo:备注,0-254字节




3.7、wInTotal

3.7.1、请求:
{"RequestName":"wInTotal","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01"}


3.7.1.1、变量名解释
cqDateB:确认入库日期时间开始,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:确认入库日期时间结束,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,cqgCode|cqcCode筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。

3.7.2、样例
3.7.2.2、响应:
{"ReturnValue":1,"cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01","iqwGiid":0,"cqgCode":"","cqcCode":"","RecList":[{"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","iQuantity":1000,"iNormal":1000,"iDefective":0,"iCount":1},{"iwGiid":2,"cgName":"电视机","cgNameE":"TV Set","cMemo_d":"MEMO","cgCode":"DFASFASDFAS","ccCode":"DFHH442","cUnit":"台","iQuantity":27,"iNormal":20,"iDefective":7,"iCount":4},{"iwGiid":3,"cgName":"火锅","cgNameE":"","cMemo_d":"","cgCode":"33HH5254242","ccCode":"CGGRWRQW","cUnit":"口","iQuantity":23,"iNormal":23,"iDefective":0,"iCount":1},{"iwGiid":14,"cgName":"退件","cgNameE":"","cMemo_d":"","cgCode":"HH423432LLLL","ccCode":"JJ342423432","cUnit":"","iQuantity":0,"iNormal":0,"iDefective":0,"iCount":3}],"iTotalRec":4}

3.7.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,入库汇总记录对象列表
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节
iQuantity:数量
iNormal:正品数量
iDefective:次品数量
iCount:记录数





3.8.1、wOrderSet
3.8.1、请求:
{"RequestName":"wOrderSet","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"A11","cBatch":"BH000123","OrderList":[{"ioID":0,"nItemType":1,"nLanguage":2,"cEmsKind":"DHL","cDes":"US","fWeight":2.123,"cNum":"CNEX1234567","cNo":"EM123456789CN","GoodsList":[{"cxcCode":"KH42343242","ixQuantity":2,"fxPrice":30.12},{"cxcCode":"CGGRWRQW","ixQuantity":3,"fxPrice":10.55}]},...]}

3.8.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。
cDepot:仓库编码,1-3字符,必须。
cBatch:批次号,0-30字符

*OrderList:订单记录列表,为1-N个快件订单对象
#如下为记录对象的成员,除了必须的,其它可不提供
ioID:订单记录ID,大于零,表明为记录数据修改,否则,为新记录添加。必须提供,且必须是记录对象的第一个参数(将用于辅助定界)!
nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
nLanguage:地域语言,默认为0。取值为:0(中国大陆),1(华语),2(其它地域)
cEmsKind:快递类别,1-15字符,必须。
cAddrFrom:出发地,0-63字符。
cDes:目的地,1-63字符,必须。
fWeight:重量,公斤,3位小数。

nOrderType:订单类别,枚举,默认0。(0:快递;1:提货)
nPriceType:物品价格类型,枚举,默认0。(0:零售价;1:团购价;2:VIP价;3:代售价)
bBox:是否包装,逻辑值,默认:false
bVoidDel:是否缺货时取消订单,逻辑值,默认:true
bInvoice:是否打印发票,逻辑值,默认:false
bList:是否打印装箱单,逻辑值,默认:false

cReceiver:收件人,0-63字符。
cRUnit:收件单位,0-254字符。
cRAddr:收件地址,0-254字符。
cRCity:收件城市,0-126字符。
cRPostcode:收件邮编,0-15字符。
cRProvince:收件省州,0-63字符。
cRCountry:收件国家,0-126字符。
cRPhone:收件电话,0-63字符。
cREMail:收件电邮,0-63字符。
cRSms:收件短信,0-22字符。

cNum:订单号,7-30字符。(可以配置为系统自动生成)
cNo:转单号,0-30字符。
cRNo:参考号,0-30字符。
cCNo:报关号,0-30字符。

cSender:发件人,0-30字符。
cSUnit:发件单位,0-127字符。
cSAddr:发件地址,0-127字符。
cSCity:发件城市,0-63字符。
cSPostcode:发件邮编,0-15字符。
cSProvince:发件省州,0-30字符。
cSCountry:发件国家,0-63字符。
cSPhone:发件电话,0-63字符。
cSEMail:发件电邮,0-63字符。
cSSms:发件短信,0-22字符。
cDepart:所属部门,0-30字符。

cMark:标签,0-15字符。
cMemo:备注,0-254字符。
cReserve:留用串,0-30字符。
cBy1:备用1,0-63字符。
cBy2:备用2,0-63字符。
cBy3:备用3,0-63字符。
cBy4:备用4,0-63字符。
cBy5:备用5,0-254字符。

cGoods:物品描述,0-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cMoney:货币代码,0-3字符。
fGoods:物品货值,代收货款收件人支付的货值,2位小数。
fGoodsc:物品返回客户货值,代收货款向客户返还的货值,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cPayDir:结算指示,0-3字符。
cOrigin:原产地国家代码,0-3字符。
cGoodsA:物品别名,通常为英文描述,0-254字符。
cGCodeA:物品甲码,通常为HS编码,0-63字符。
cGCodeB:物品乙码,通常为统一编码,0-63字符。
cGCodeC:物品丙码,通常为客户编码,0-63字符。
fGCustom:关税额,2位小数。
fGCRate:税率,4位小数。

cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。


**GoodsList:快件所含物品列表,为1-100个物品对象
#为了区分,命名在顶层字段名称中嵌入了一个“x”,注意字段长度有所不同。

cxcCode:物品客户编码,1-63字节
cxgCode:物品统一编码,1-63字节
cxgName:物品中文名称,1-63字节
cxgNameE:物品英文名称,1-254字节
ixwGiid:物品定义ID
#以上5个物品识别字段请提供任意一个且仅一个!如多种物品,且本订单所提供的字段一致

ixQuantity:物品数量。必须。
fxPrice:物品单价,2位小数。可不提供。


3.8.2、响应:
{"ReturnValue":1,"OK":1,"ErrList":[{"iIndex":0,"ioID":69,"cNum":"CNEX1234567","cNo":"EM123456789CN","cMess":"","cReserve":"","cBy1":"","cBy2":"","cBy3":"","cBy4":"","cBy5":""}]}
3.8.2.1、字段名解释
ReturnValue:正数,处理记录数。负数,失败(-2:icID错误;-3:没有OrderList;-9:系统错误)
OK:成功数
*ErrList:处理记录信息列表,按原始顺序返回。
iIndex:索引位置,0开始
iID:记录ID,一条预录单记录,都有一个唯一的不可更改的ID,系统识别码,对于记录的删除、修改则以此识别。
cNum:内单号,记录在系统内部的运单号,唯一。
cNo:转单号,记录在系统的转运单号,可能有系统生成。
cMess:错误信息,0-63字符,空串为无错误。
*如果emsdata.ini定义了“字段填写定义”,则可能返回期望的数据
cReserve:留用串,0-30字符。
cBy1:备用1,0-62字符。
cBy2:备用2,0-62字符。
cBy3:备用3,0-62字符。
cBy4:备用4,0-62字符。
cBy5:备用5,0-254字符。



3.9.1、wOrderDel
3.9.1、请求:
{"RequestName":"wOrderDel","icID":79,"TimeStamp":1405534421123,"MD5":"6c08ea4dff56d5a7a959c09f121c3c4f","cDepot":"A11","ioIDs":[1,2,3,...]}
3.9.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。
cDepot:仓库编码,1-3字符,必须。
ioIDs:订单记录ID数组,1-N个大于零的整数
3.9.2、响应:
{"ReturnValue":3,"OK":1,"ErrList":[{"iIndex":0,"ioID":1,"cMess":"记录不存在"},{"iIndex":2,"ioID":3,"cMess":"订单已经确认出库。"}]}
3.9.2.1、字段名解释
ReturnValue:正数,处理记录数。负数,失败(-2:icID错误;-3:没有ID数组;-9:系统错误)。
OK:成功数
*ErrList:失败记录列表
iIndex:索引位置,0开始
ioID:记录ID
cMess:错误信息,1-63字符



3.10、wOutQuery

3.10.1、请求:
{"RequestName":"wOutQuery","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","iPage":1,"iPagePer":5,"cqDateB":"2013-01-01","cqDateE":"2015-06-01"}


3.10.1.1、变量名解释
iPage:页次,默认1
iPagePer:每页记录数,默认值0,有效值0-1000,(0 表示仅返回记录总数)
cqDateB:出库日期时间开始,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:出库日期时间结束,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,cqgCode|cqcCode筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。
nqOrderType:订单类别,枚举,默认0。(0:快递;1:提货;大于5:忽略)

3.10.2、样例
3.10.2.2、响应:
{"ReturnValue":1,"iPage":1,"iPagePer":5,"iTotalRec":2,"cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01","iqwGiid":0,"cqgCode":"","cqcCode":"","nqOrderType":0,"RecList":[{"iID":59,"iwGiid":2,"cgName":"电视机","cgNameE":"TV Set","cMemo_d":"MEMO","cgCode":"DFASFASDFAS","ccCode":"DFHH442","cUnit":"台","ioID":17,"nOrderType":0,"cBatch":"","cNum":"OOPP233333","cNo":"ES719039679CS","cRNo":"EC","dDate":"2012-07-29 19:00","dChooseDate":"2015-03-25 16:06","dOutDate":"2015-03-27 10:44","iQuantity":2,"cMark":"测试ccc","cMemo":""},{"iID":60,"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","ioID":48,"nOrderType":0,"cBatch":"","cNum":"UU42342343","cNo":"ES719039705CS","cRNo":"","dDate":"2012-10-22 15:10","dChooseDate":"2015-03-25 16:06","dOutDate":"2015-03-26 11:23","iQuantity":3,"cMark":"测试ccc","cMemo":""}]}

3.10.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,入库记录对象列表
iID:出库记录ID
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节

ioID:订单记录ID
nOrderType:订单类别,枚举。(0:快递;1:提货;2:次品;3:平仓;4:移库)
cBatch:订单批次号,0-30字节
cNum:订单号,0-30字节
cNo:订单转单号,0-30字节
cRNo:订单参考号,0-30字节
dDate:订单记录创建日期时间
dChooseDate:拣货完成日期时间
dOutDate:出库确认日期时间
iQuantity:数量

cMark:订单标签,0-15字节
cMemo:订单备注,0-254字节




3.11、wOutTotal

3.11.1、请求:
{"RequestName":"wOutTotal","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01"}


3.11.1.1、变量名解释
cqDateB:确认出库日期时间开始,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:确认出库日期时间结束,必须。格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,cqgCode|cqcCode筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。

3.11.2、样例
3.11.2.2、响应:
{"ReturnValue":1,"cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01","iqwGiid":0,"cqgCode":"","cqcCode":"","RecList":[{"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","iQuantity":990,"iNormal":990,"iDefective":0,"iCount":2},{"iwGiid":2,"cgName":"电视机","cgNameE":"TV Set","cMemo_d":"MEMO","cgCode":"DFASFASDFAS","ccCode":"DFHH442","cUnit":"台","iQuantity":5,"iNormal":4,"iDefective":1,"iCount":3}],"iTotalRec":2}

3.11.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,出库汇总记录对象列表
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节
iQuantity:数量
iNormal:正品数量
iDefective:次品数量
iCount:物品记录数(并非订单数,而是订单物品记录总和,因为一个订单可能有多种物品)




3.12、wOrderTotal

3.12.1、请求:
{"RequestName":"wOrderTotal","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11"}


3.12.1.1、变量名解释
cqDateB:订单创建日期时间开始。格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:订单创建日期时间结束。格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
iqwGiid:物品ID,物品在EMMis中的定义记录ID,如提供,则唯一识别,cqgCode|cqcCode筛选条件失效。
cqgCode:物品统一编码,0-63字节,左包含筛选。
cqcCode:物品客户编码,0-63字节。左包含筛选。
nqState:订单状态,枚举值,默认0,忽略。(0:所有未出库;1:已审核;2:未审核;3:已拣货)
       

3.12.2、样例
3.12.2.2、响应:
{"ReturnValue":1,"cDepot":"A11","nqState":0,"cqDateB":"","cqDateE":"","iqwGiid":0,"cqgCode":"","cqcCode":"","RecList":[{"iwGiid":13,"cgName":"被子","cgNameE":"","cMemo_d":"","cgCode":"FDH42343233455","ccCode":"FDH42343233","cUnit":"床","iQuantity":19,"iRealOut":19,"iCount":6},{"iwGiid":1,"cgName":"打火机","cgNameE":"flight","cMemo_d":"退件","cgCode":"HGG42343214","ccCode":"BBFSA4243214","cUnit":"个","iQuantity":44,"iRealOut":44,"iCount":10},{"iwGiid":2,"cgName":"电视机","cgNameE":"TV Set","cMemo_d":"MEMO","cgCode":"DFASFASDFAS","ccCode":"DFHH442","cUnit":"台","iQuantity":18,"iRealOut":18,"iCount":9},{"iwGiid":6,"cgName":"刮胡刀","cgNameE":"","cMemo_d":"","cgCode":"GG45423324","ccCode":"KK42343242","cUnit":"","iQuantity":3,"iRealOut":3,"iCount":3},{"iwGiid":3,"cgName":"火锅","cgNameE":"","cMemo_d":"","cgCode":"33HH5254242","ccCode":"CGGRWRQW","cUnit":"口","iQuantity":9,"iRealOut":9,"iCount":5},{"iwGiid":5,"cgName":"旗杆","cgNameE":"Flag pot","cMemo_d":"","cgCode":"TY342342433","ccCode":"KH42343242","cUnit":"杆","iQuantity":16,"iRealOut":16,"iCount":9}],"iTotalRec":6}


3.12.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,出库汇总记录对象列表
iwGiid:物品定义ID
cgName:物品中文名称,1-63字节
cgNameE:物品英文名称,0-254字节
cMemo_d:物品定义备注,0-254字节
cgCode:物品统一编码,1-63字节
ccCode:物品客户编码,1-63字节
cUnit:计量单位,0-15字节
iQuantity:订单物品数量
iRealOut:订单审核后实际数量
iCount:物品记录数(并非订单数,而是订单物品记录总和,因为一个订单可能有多种物品)






3.13、wOrderInfo

3.13.1、请求:
{"RequestName":"wOrderInfo","icID":79,"TimeStamp":1405534421123,"MD5":"c435e730ad0e2587761234e3dbb1eefb","cDepot":"A11","iPage":1,"iPagePer":10,"cqDateB":"2013-01-01","cqDateE":"2015-06-01","cqStateMask":"000011"}


3.13.1.1、变量名解释
cqDateB:订单创建日期时间开始。必须,格式("YYYY-MM-DD hh:mm:ss"),年月日必须
cqDateE:订单创建日期时间结束。必须,格式("YYYY-MM-DD hh:mm:ss"),年月日必须,且不早于cqDateB
cqStateMask:查询记录筛选:记录状态掩码,共6种状态,用6位0或1表示,1表示筛选,0表示过滤。如审核状态(010000),所有已审核(011111),未审核(100000)            
            0:未审
            1:审核
            2:拣选
            3:检验
            4:包装
            5:已出

iqoID:订单ID,在EMMis中的记录ID,如提供,则唯一识别,后续筛选条件失效。
cqNum:订单号,0-30字节,左包含筛选。
cqRNo:参考号,0-30字节,左包含筛选。
cqNo:转单号,0-30字节,左包含筛选。
cqBatch:批次号,0-30字节。精确匹配。

       

3.13.2、样例
3.13.2.2、响应:
{"ReturnValue":1,"iPage":1,"iPagePer":10,"iTotalRec":3,"cDepot":"A11","cqDateB":"2013-01-01","cqDateE":"2015-06-01","iqoID":0,"cqNum":"","cqNo":"","cqRNo":"","cqBatch":"","cqStateMask":"000011","RecList":[{"ioID":54,"nOrderType":2,"nState":50,"cNum":"54354353","cBatch":"","cNum":"54354353","cNo":"","cRNo":"","cGoods":"电视机","iQuantity":1,"iCategory":1,"cPack":"","cTransNote":"1","dDate":"2013-09-24","dSysDate":"2013-09-24 09:24","dAudDate":"2013-09-24 09:25","dChooseDate":"2013-09-24 09:27","dOutDate":"2013-09-24 09:35","cMark":"","cMemo":""},{"ioID":57,"nOrderType":4,"nState":50,"cNum":"kk77777777","cBatch":"","cNum":"kk77777777","cNo":"","cRNo":"","cGoods":"","iQuantity":2,"iCategory":1,"cPack":"","cTransNote":"","dDate":"2013-09-24","dSysDate":"2013-09-24 17:52","dAudDate":"2013-09-24 17:52","dChooseDate":"","dOutDate":"2013-09-24 17:52","cMark":"测试提示","cMemo":"提示2"},{"ioID":68,"nOrderType":4,"nState":50,"cNum":"PP42333333388GG","cBatch":"","cNum":"PP42333333388GG","cNo":"","cRNo":"","cGoods":"","iQuantity":987,"iCategory":1,"cPack":"","cTransNote":"","dDate":"2015-03-26","dSysDate":"2015-03-26 16:19","dAudDate":"2015-03-26 16:19","dChooseDate":"","dOutDate":"2015-03-26 16:19","cMark":"mark","cMemo":"memo"}]}


3.13.3、返回值含义
1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

1:成功,有结果(iTotalRec)。
0:无结果。
小于零:失败。

*RecList,订单记录对象列表

ioID:订单记录ID
nOrderType:订单类别,枚举。(0:快递;1:提货;2:次品;3:平仓;4:移库)
nState:订单状态,枚举。(0:未审;10:审核;20:拣选;30:检验;40:包装;50:已出)
cBatch:订单批次号,0-30字节
cNum:订单号,0-30字节
cNo:订单转单号,0-30字节
cRNo:订单参考号,0-30字节
cGoods:物品描述,0-254字节,可能与真实物品不一致,是一个编辑字段
iQuantity:物品数量,能与真实物品数量不一致,是一个编辑字段
iCategory:物品重数
cPack:包装,0-15字节
cTransNote:托运备注,0-63字节
dDate:订单日期
dSysDate:订单记录创建日期时间
dAud:订单审核日期时间
dChooseDate:拣货完成日期时间
dOutDate:出库确认日期时间

cMark:订单标签,0-15字节
cMemo:订单备注,0-254字节






3.14.1、RecTransBagSet
3.14.1、请求:
{"RequestName":"RecTransBagSet","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","TransNums":["YDH000000017","YDH000000020","45607890"],"cEmsKind":"UPS","cDes":"US","fWeight":2.123,"cNum":"CNEX1234567TRANS"...}

3.14.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。

*TransNums:到件记录运单号列表,为1-N个运单号,用于组合为一个转发快件包裹.
nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
nLanguage:地域语言,默认为0。取值为:0(中国大陆),1(华语),2(其它地域)
cEmsKind:快递类别,1-15字符,必须。
cAddrFrom:出发地,0-63字符。
cDes:目的地,1-63字符,必须。
fWeight:重量,公斤,3位小数。
iLong:长,厘米。
iWidth:宽,厘米。
iHeight:高,厘米。
iItem:件数,默认1。
nPayWay:付款方式,默认为0。取值为:0(月结),1(现付),2(到付)
fAmount:快递费,2位小数。

cReceiver:收件人,0-63字符。
cRUnit:收件单位,0-254字符。
cRAddr:收件地址,0-254字符。
cRCity:收件城市,0-126字符。
cRPostcode:收件邮编,0-15字符。
cRProvince:收件省州,0-63字符。
cRCountry:收件国家,0-126字符。
cRPhone:收件电话,0-63字符。
cREMail:收件电邮,0-63字符。
cRSms:收件短信,0-22字符。
cRIDCard:收件证照号,0-30字符。

cNum:运单号,7-30字符。

cSender:发件人,0-30字符。
cSUnit:发件单位,0-127字符。
cSAddr:发件地址,0-127字符。
cSCity:发件城市,0-63字符。
cSPostcode:发件邮编,0-15字符。
cSProvince:发件省州,0-30字符。
cSCountry:发件国家,0-63字符。
cSPhone:发件电话,0-63字符。
cSEMail:发件电邮,0-63字符。
cSSms:发件短信,0-22字符。
cSIDCard:发件证照号,0-30字符。

cMark:标签,0-15字符。
cMemo:备注,0-254字符。
cBy1:备用1,0-63字符。
cBy2:备用2,0-63字符。
cBy3:备用3,0-63字符。
cBy4:备用4,0-63字符。
cBy5:备用5,0-254字符。

cGoods:物品描述,0-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cMoney:货币代码,0-3字符。
fGoods:物品货值,代收货款收件人支付的货值,2位小数。
fGoodsc:物品返回客户货值,代收货款向客户返还的货值,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cPayDir:结算指示,0-3字符。
cOrigin:原产地国家代码,0-3字符。

cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。
fgWeight:物品净重,3位小数。

#如下为7个运费附加字段,选择提供(v7.3)
faGet:提货费,2位小数。
faSafe:保险费,2位小数。
faPack:包装费,2位小数。
faOther:杂费,2位小数。
faCheck:验货费,2位小数。
faRemote:偏远费,2位小数。
faBy:其它费,2位小数。


3.14.2、响应:
"ReturnValue":53,"cNum":"CNEX1234567TRANS"}
3.14.2.1、字段名解释
ReturnValue:正数,成功,打包记录ID,如果需要后续处理,如删除,请记录此数值。负数,失败
cNum:回传运单号

其它错误值含义:
-3:没有解析出到件记录运单号列表(TransNums)
-4:到件记录检查异常,状态错误或不存在...
-14:没有解析出运单号(cNum)
-15:没有解析出快递类别(cEmsKind)
-16:没有解析出目的地(cDes)





3.15.1、RecTransBagDel
3.15.1、请求:
{"RequestName":"RecTransBagDel","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iIDs":[53,18766,25]}

3.15.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。

*iIDs:打包记录ID列表,为1-N个记录ID.

3.15.2、响应:
{"ReturnValue":3,"OK":1,"ErrList":[{"iID":18766,"cMess":"\u8BB0\u5F55\u4E0D\u5B58\u5728\u3002"},{"iID":25,"cMess":"\u8BB0\u5F55\u5DF2\u7ECF\u5904\u7406\u3002"}]}
3.15.2.1、字段名解释
ReturnValue:正数,处理记录成功。负数,失败
OK:成功删除记录数
ErrList:未删除的记录,原因参阅cMess信息




3.16.1、RecTransSet
3.16.1、请求:
{"RequestName":"RecTransSet","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","RecList":[{"iID":0,"nItemType":1,"cEmsKind":"EMS","fWeight":2.123,"cNum":"CNEX1234567","GoodsList":[{"cxGoods":"电视机","ixQuantity":1,"fxPrice":1500.12},{"cxGoods":"裤子","ixQuantity":2,"fxPrice":88.99}]},...]}

3.16.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。

*RecList:预报到件记录列表,为1-N个预报到件记录对象
#如下为记录对象的成员,除了必须的,其它可不提供
iID:预报到件记录ID,大于零,表明为记录数据修改,否则,为新记录添加。必须提供,且必须是记录对象的第一个参数(将用于辅助定界)!
cNum:运单号,4-30字符,必须。
nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
cEmsKind:网络渠道,0-15字符。
fWeight:重量,公斤,3位小数。
iItem:件数,默认1。
fAmount:快递费,2位小数。
nOpen:是否可拆包,默认为0。取值为:0(不拆包),1(可拆包)

cMark:标签,0-15字符。
cMemo:备注,0-254字符。
nEx1:扩展数1,0-255
nEx2:扩展数2,0-255
nEx3:扩展数3,0-255
cEx1:扩展串1,0-63字符。
cEx2:扩展串2,0-63字符。
cEx3:扩展串3,0-254字符。

cGoods:物品描述,0-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cMoney:货币代码,0-3字符。
fGoods:物品货值,2位小数。
fGoodsc:收货时代客户支付的货款,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cPayDir:结算指示,0-3字符。
cGoodsA:物品别名,通常为英文描述,0-254字符。
cGCodeA:物品甲码,通常为HS编码,0-63字符。
cGCodeB:物品乙码,通常为统一编码,0-63字符。
cGCodeC:物品丙码,通常为客户编码,0-63字符。
fGCustom:关税额,2位小数。
fGCRate:税率,4位小数。

cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。

**GoodsList:快件所含物品列表,为0-100个物品对象
#如果只有一种物品,物品信息存放在上述顶层记录字段即可,多种物品,需要此对象描述
#为了区分,命名在顶层字段名称中嵌入了一个“x”,注意字段长度有所不同。
cxGoods:物品描述,0-63字符。必须。
ixQuantity:物品数量。必须。
fxPrice:物品单价,2位小数。
cxGoodsA:物品别名,通常为英文描述,0-63字符。
cxGCodeA:物品甲码,通常为HS编码,0-63字符。
cxGCodeB:物品乙码,通常为统一编码,0-63字符。
cxGCodeC:物品丙码,通常为客户编码,0-63字符。
fxGCustom:关税额,2位小数。
fxGCRate:税率,4位小数。

3.16.2、响应:
{"ReturnValue":2,"OK":1,"ErrList":[{"iIndex":0,"iID":0,"cNum":"CEN88676666","cMess":"运单号重复"},{"iIndex":1,"iID":123,"cNum":"EM77882299CN","cMess":""}]}
3.16.2.1、字段名解释
ReturnValue:正数,处理记录数。负数,失败(-2:icID错误;-3:没有RecList;-9:系统错误)
OK:成功数
*ErrList:处理记录信息列表,按原始顺序返回。
iIndex:索引位置,0开始
iID:记录ID,一条预报到件记录,都有一个唯一的不可更改的ID,系统识别码,对于记录的删除、修改则以此识别。
cNum:运单号,包裹上人眼可识别的单号。
cMess:错误信息,0-63字符,空串为无错误。




3.17.1、RecTransDel
3.17.1、请求:
{"RequestName":"RecTransDel","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iIDs":[1,2,3,...]}
3.17.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。
iIDs:预报到件记录ID数组,1-N个大于零的整数
3.17.2、响应:
{"ReturnValue":3,"OK":1,"ErrList":[{"iIndex":0,"iID":1,"cMess":"记录不存在"},{"iIndex":2,"iID":3,"cMess":"记录已经处理,不能删除"}]}
3.17.2.1、字段名解释
ReturnValue:正数,处理记录数。负数,失败(-2:icID错误;-3:没有ID数组;-9:系统错误)。
OK:成功数
*ErrList:失败记录列表
iIndex:索引位置,0开始
iID:记录ID
cMess:错误信息,1-63字符



3.4、RecTransData

3.18.1、请求:
{"RequestName":"RecTransData","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iID":2,"cNum":"LS000000341SH"}
3.18.1.1、字段名解释
icID:客户ID,在EMMis系统的id,整数,大于零,必须提供。
iID:记录ID,大于零,如提供,优先采用,则无需提供cNum
cNum:运单号,4-30字符,精确匹配

3.18.2、样例
3.18.2.1、请求:
  API: /cgi-bin/EmsData.dll?WeChat
  POST_DATA:{"RequestName":"RecTransData","icID":79,"iID":2188876}
3.18.2.2、响应:
{"ReturnValue":1,"icID":79,"iID":2188876,"ibID":46,"irID":0,"nItemType":1,"nOpen":0,"dDate":"1900-01-01 00:00:00","cNum":"5559993333333","cEmsKind":"ups","cStationc":"","cStationr":"","cShelf":"","dDate_r":"2013-12-23 12:12:08","cName_r":"","fWeight":0.000,"iItem":2,"fAmount":0.00,"cMark":"","cMemo":"","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"","cEx2":"","cEx3":"","cGoods":"衣物","iQuantity":5,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"CNY","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cPacking":"","cTransNote":"","GoodsList":[{"cxGoods":"鞋子","ixQuantity":3,"fxPrice":100.00,"cxGoodsA":"","cxGCodeA":"","cxGCodeB":"","cxGCodeC":"","fxGCustom":0.00,"fxGCRate":0.0000},{"cxGoods":"帽子","ixQuantity":2,"fxPrice":150.00,"cxGoodsA":"","cxGCodeA":"","cxGCodeB":"","cxGCodeC":"","fxGCustom":0.00,"fxGCRate":0.0000}]}

3.18.3、字段名解释,参阅(help_app.txt::3.2.1.1)
irID:处理到快递系统后的记录ID。可以理解:0=未处理(未收取快件包裹);>0:已处理(已经收取快件包裹)
ReturnValue:1,成功。负数,失败(-2:记录不存在;-6:快件已操作,入快递系统;-9:系统错误)。
ibID:关联打包指令ID,据此判断:>0,已发打包指令
irID:关联快递业务记录ID,据此判断:>0,已转发(到快递业务)
dDate:记录录入时间
dDate_r:到件确认时间,如果空,则未到件
cName_r:到件确认操作者
cStationc:站点(客户预报选择填写的)
cStationr:站点(到件确认所属的)
cShelf:存放架位



3.5、RecTransList

3.19.1、请求:
{"RequestName":"RecTransList","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iPage":1,"iPagePer":5,"dqBDate":"2012-10-03","cqStation":"SH"}
3.19.1.1、字段名解释
icID:客户ID,在EMMis系统的id,整数,大于零,必须提供。
iPage:页次,默认1
iPagePer:每页记录数,默认值100,有效值0-1000,(0 表示仅返回记录总数)

*如下为筛选条件
dqBDate:查询记录筛选:开始日期
dqBDate:查询记录筛选:结束日期
cqEmsKind:查询记录筛选:快递类别
cqNum:查询记录筛选:内单号,包含查找
cqMark:查询记录筛选:标签,包含查找
cqStation:查询记录筛选:传接站点
bqReceived:查询记录筛选:true:已到件;false:未到件
bqBagged:查询记录筛选:true:已发打包指令;false:未发打包指令
bqSent:查询记录筛选:true:已打包转发;false:未打包转发

3.19.2、响应:
{"ReturnValue":1,"iPage":2,"iPagePer":100,"iTotalRec":2000,"dqBDate":"2013-10-03","dqEDate":"2014-01-20","cqEmsKind":"EMS","cqNum":"EMS7788","cqMark":"","bqReceived":"","bqBagged":"","bqSent":"","RecList":[{"iID":10,"dDate":"2014-01-20 12:46:23","nItemType":1,"nLanguage":2,"cEmsKind":"EMS国际","cDes":"美国","fWeight":2.123,"cNum":"CNEX1234567","cNo":"EM123456789CN"..},,...]}
3.19.2.1、字段名解释,参阅3.2.1.1,不提供物品明细
ReturnValue:1成功并有数据;0:无记录;负数:查询失败
iTotalRec:符合查询条件的记录总数。当前返回的记录明细由RecList决定,为0 - iPagePer条。
iID:记录ID,大于零,记录操作的唯一标识,记录数据修改或删除时,须提供。
dDate:记录录入系统日期时间。
cStation:客户录入站点
cStationr:到件确认站点


3.19.2.2、样例
{"ReturnValue":1,"icID":79,"iPage":1,"iPagePer":5,"iTotalRec":5,"dqBDate":"2012-10-03","dqEDate":"","cqEmsKind":"","cqNum":"","cqMark":"","cqStation":"SH","RecList":[{"iID":2188850,"ibID":0,"irID":0,"nItemType":1,"nOpen":0,"dDate":"2013-06-17 18:42:58","cNum":"YDH000000017","cEmsKind":"","cShelf":"SH01","dDate_r":"2013-06-17 18:42:58","cName_r":"预置账号","fWeight":1.220,"iItem":1,"fAmount":0.00,"cMark":"","cMemo":"","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"","cEx2":"","cEx3":"","cGoods":"","iQuantity":1,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"USD","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cStation":"","cStationr":"SH","cPacking":"","cTransNote":""},{"iID":2188820,"ibID":36,"irID":0,"nItemType":1,"nOpen":1,"dDate":"2013-02-12 16:51:48","cNum":"KK34444999888GG","cEmsKind":"生同","cShelf":"ggg5555","dDate_r":"2013-02-12 16:51:15","cName_r":"预置账号","fWeight":2.330,"iItem":1,"fAmount":0.00,"cMark":"马kuang","cMemo":"发扽s","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"ex1","cEx2":"ex2","cEx3":"ex3","cGoods":"电视","iQuantity":1,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"USD","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cStation":"上海","cStationr":"SH","cPacking":"","cTransNote":""},{"iID":2188814,"ibID":30,"irID":24594,"nItemType":1,"nOpen":0,"dDate":"2013-02-08 17:45:26","cNum":"34323433477","cEmsKind":"渠道A","cShelf":"4544535377","dDate_r":"2013-02-05 17:34:22","cName_r":"预置账号","fWeight":1.550,"iItem":2,"fAmount":0.00,"cMark":"","cMemo":"GDFGDG66666","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"","cEx2":"","cEx3":"","cGoods":"","iQuantity":1,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"CNY","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cStation":"0","cStationr":"SH","cPacking":"","cTransNote":""},{"iID":2188813,"ibID":30,"irID":24594,"nItemType":1,"nOpen":0,"dDate":"2013-02-10 09:38:03","cNum":"JJ5354345345345","cEmsKind":"广州希优特","cShelf":"hhgjhg","dDate_r":"2013-02-04 16:20:57","cName_r":"预置账号","fWeight":1.200,"iItem":1,"fAmount":0.00,"cMark":"","cMemo":"","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"","cEx2":"","cEx3":"","cGoods":"","iQuantity":1,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"CNY","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cStation":"0","cStationr":"SH","cPacking":"","cTransNote":""},{"iID":2188812,"ibID":30,"irID":24594,"nItemType":1,"nOpen":0,"dDate":"2013-02-10 09:49:32","cNum":"GG343234234324","cEmsKind":"广州希优特","cShelf":"8888","dDate_r":"2013-02-04 16:20:34","cName_r":"预置账号","fWeight":1.230,"iItem":1,"fAmount":0.00,"cMark":"","cMemo":"","nEx1":0,"nEx2":0,"nEx3":0,"cEx1":"","cEx2":"","cEx3":"","cGoods":"","iQuantity":1,"fPrice":0.00,"fGoods":0.00,"fGoodsc":0.00,"fDValue":0.00,"fIValue":0.00,"cMoney":"CNY","cPayDir":"PP","cGoodsA":"","cGCodeA":"","cGCodeB":"","cGCodeC":"","fGCustom":0.00,"fGCRate":0.0000,"cStation":"0","cStationr":"SH","cPacking":"","cTransNote":""}]}


3.20、wGoodsPicSet

3.20.1、请求:
{"RequestName":"wGoodsPicSet","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iwGiid":19,"nPos":5,"cFileName":".jpg","vPic":"as56..."}
3.4.1.1、字段名解释
iwGiid:物品ID。
cgCode:物品统一编码,0-63字节。
*上面两个物品关联条件至少定义一个!或者下面两个参数,用于查询关联记录*
cAccount:EMMis中客户账号,1-30字节。
ccCode:物品客户编码,1-63字节。

nPos:图片位置(1-255),默认1
cFileName:文件名,4-255字符,必须提供,系统只解析扩展名(“.xxx”)
vPic:图片数据(base64编码)

3.20.2、样例
3.20.2.2、响应:
3.20.3、字段名解释,参阅3.2.1.1
ReturnValue:大于零,成功(记录ID)。负数,失败。
   -11:物品ID*错误
   -12:文件名不合法,没有解析出文件扩展名
   -13:图片数据不存在
   -14:图片数据太少(<1k)
   -15:图片数据太多(>500kb)
   -16:图片数据解码错误(base64)



3.21、wGoodsPicQuery

3.21.1、请求:
{"RequestName":"wGoodsPicQuery","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iqwGiid":19}
3.4.1.1、字段名解释
iqwGiid:物品ID。
cqgCode:物品统一编码,0-63字节。
*上面两个筛选条件至少定义一个!或者下面两个参数,用于查询关联记录*
cqAccount:EMMis中客户账号,1-30字节。
cqcCode:物品客户编码,1-63字节。



3.21.2、样例
3.21.2.2、响应:
{"ReturnValue":1,"igID":19,"anPos":[1,2,5],"iTotalRec":3}
3.21.3、字段名解释,参阅3.2.1.1
ReturnValue:1,成功。负数,失败。
0:无结果
-11:*物品ID*错误

anPos:图片位置数组,如上在1,2,5三个位置有图片
iTotalRec:图片记录总数。





3.22、wGoodsPicGet

3.22.1、请求:
{"RequestName":"wGoodsPicGet","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","iqwGiid":19,"nqPos":2}
3.4.1.1、字段名解释
iqwGiid:物品ID。
cqgCode:物品统一编码,0-63字节。
*上面两个筛选条件至少定义一个!或者下面两个参数,用于查询关联记录*
cqAccount:EMMis中客户账号,1-30字节。
cqcCode:物品客户编码,1-63字节。

nqPos:图片位置(1-255),默认1


3.22.2、样例
3.22.2.2、响应:
{"ReturnValue":1,"igID":19,"nPos":2,"iLen":6038,"cExt":"gif","vPic":"R0lGODlhfgCfANUAADO150...EnJogADs="}
3.22.3、字段名解释,参阅3.2.1.1
ReturnValue:1,成功。负数,失败。
0:无结果
-11:*物品ID*错误

igID:物品ID,=iqwGiid
iLen:图片真实大小(字节)
cExt:文件扩展名,也可以简单理解为图片文件类型
vPic:图片数据(base64),解码后应该与iLen长度一致。




3.23.1、RecTransBagSetEx
3.23.1、请求:
{"RequestName":"RecTransBagSetEx","icID":79,"TimeStamp":1442373685000,"MD5":"9f0edba0409cb604b1d5509e292c3582","BagInfo":[{"cEmsKind":"UPS","cDes":"US","fWeight":2.123,"cNum":"CNEX1234567TRANS"...}],"RecTransList":[{"iID":0,"nItemType":1,"cEmsKind":"EMS","fWeight":2.123,"cNum":"CNEX1234567","GoodsList":[{"cxGoods":"电视机","ixQuantity":1,"fxPrice":1500.12},{"cxGoods":"裤子","ixQuantity":2,"fxPrice":88.99}]},...]}

3.23.1.1、字段名解释
icID:客户ID,必须。客户唯一识别。

*数据为两块,第一块为"BagInfo",第二块为"RecTransList",两块都采用对象数组格式包装

*BagInfo:打包记录数据
nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
nLanguage:地域语言,默认为0。取值为:0(中国大陆),1(华语),2(其它地域)
cEmsKind:快递类别,1-15字符,必须。
cAddrFrom:出发地,0-63字符。
cDes:目的地,1-63字符,必须。
fWeight:重量,公斤,3位小数。
iLong:长,厘米。
iWidth:宽,厘米。
iHeight:高,厘米。
iItem:件数,默认1。
nPayWay:付款方式,默认为0。取值为:0(月结),1(现付),2(到付)
fAmount:快递费,2位小数。

cReceiver:收件人,0-63字符。
cRUnit:收件单位,0-254字符。
cRAddr:收件地址,0-254字符。
cRCity:收件城市,0-126字符。
cRPostcode:收件邮编,0-15字符。
cRProvince:收件省州,0-63字符。
cRCountry:收件国家,0-126字符。
cRPhone:收件电话,0-63字符。
cREMail:收件电邮,0-63字符。
cRSms:收件短信,0-22字符。
cRIDCard:收件证照号,0-30字符。

cNum:运单号,7-30字符。

cSender:发件人,0-30字符。
cSUnit:发件单位,0-127字符。
cSAddr:发件地址,0-127字符。
cSCity:发件城市,0-63字符。
cSPostcode:发件邮编,0-15字符。
cSProvince:发件省州,0-30字符。
cSCountry:发件国家,0-63字符。
cSPhone:发件电话,0-63字符。
cSEMail:发件电邮,0-63字符。
cSSms:发件短信,0-22字符。
cSIDCard:发件证照号,0-30字符。

cMark:标签,0-15字符。
cMemo:备注,0-254字符。
cBy1:备用1,0-63字符。
cBy2:备用2,0-63字符。
cBy3:备用3,0-63字符。
cBy4:备用4,0-63字符。
cBy5:备用5,0-254字符。

cGoods:物品描述,0-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cMoney:货币代码,0-3字符。
fGoods:物品货值,代收货款收件人支付的货值,2位小数。
fGoodsc:物品返回客户货值,代收货款向客户返还的货值,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cPayDir:结算指示,0-3字符。
cOrigin:原产地国家代码,0-3字符。

cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。
fgWeight:物品净重,3位小数。

#如下为7个运费附加字段,选择提供(v7.3)
faGet:提货费,2位小数。
faSafe:保险费,2位小数。
faPack:包装费,2位小数。
faOther:杂费,2位小数。
faCheck:验货费,2位小数。
faRemote:偏远费,2位小数。
faBy:其它费,2位小数。

*RecTransList:所含到件包裹数据,参阅3.16.1.1
iID:为零,必须提供,且必须是记录对象的第一个参数(将用于辅助定界)!
cNum:运单号,4-30字符,必须。
nItemType:快件类型,默认为1。取值为:0(文件),1(包裹),2(防水袋)
cEmsKind:网络渠道,0-15字符。
fWeight:重量,公斤,3位小数。
iItem:件数,默认1。
fAmount:快递费,2位小数。
nOpen:是否可拆包,默认为0。取值为:0(不拆包),1(可拆包)

cMark:标签,0-15字符。
cMemo:备注,0-254字符。
nEx1:扩展数1,0-255
nEx2:扩展数2,0-255
nEx3:扩展数3,0-255
cEx1:扩展串1,0-63字符。
cEx2:扩展串2,0-63字符。
cEx3:扩展串3,0-254字符。

cGoods:物品描述,0-254字符。
iQuantity:物品数量,默认0
fPrice:物品单价,2位小数。
cMoney:货币代码,0-3字符。
fGoods:物品货值,2位小数。
fGoodsc:收货时代客户支付的货款,2位小数。
fDValue:物品声明价,2位小数。
fIValue:物品投保价,2位小数。
cPayDir:结算指示,0-3字符。
cGoodsA:物品别名,通常为英文描述,0-254字符。
cGCodeA:物品甲码,通常为HS编码,0-63字符。
cGCodeB:物品乙码,通常为统一编码,0-63字符。
cGCodeC:物品丙码,通常为客户编码,0-63字符。
fGCustom:关税额,2位小数。
fGCRate:税率,4位小数。

cPacking:包装,0-15字符。
cTransNote:托运备注,0-63字符。

**GoodsList:快件所含物品列表,为0-100个物品对象
#如果只有一种物品,物品信息存放在上述顶层记录字段即可,多种物品,需要此对象描述
#为了区分,命名在顶层字段名称中嵌入了一个“x”,注意字段长度有所不同。
cxGoods:物品描述,0-63字符。必须。
ixQuantity:物品数量。必须。
fxPrice:物品单价,2位小数。
cxGoodsA:物品别名,通常为英文描述,0-63字符。
cxGCodeA:物品甲码,通常为HS编码,0-63字符。
cxGCodeB:物品乙码,通常为统一编码,0-63字符。
cxGCodeC:物品丙码,通常为客户编码,0-63字符。
fxGCustom:关税额,2位小数。
fxGCRate:税率,4位小数。


3.23.2、响应:
"ReturnValue":53,"cNum":"CNEX1234567TRANS","iTotalTrans":2}
3.23.2.1、字段名解释
ReturnValue:正数,成功,打包记录ID,如果需要后续处理,如删除,请记录此数值。负数,失败
cNum:回传运单号
iTotalTrans:所含到件包裹数


其它错误值含义:
-3:没有解析出所含到件包裹列表(RecTransList)
-4:没有解析出打包记录数据(BagInfo)
-14:没有解析出打包记录运单号(cNum)
-15:没有解析出快递类别(cEmsKind)
-16:没有解析出目的地(cDes)

访问:2306
[关闭窗口]  
接口功能体验
在线运单查询,换单信息显示,运费报价试算,网站会员登录等快递行业与用户提供便利的交互方案
运单查询
运费计算
会员登录
产品内容搭建
使用产品:
EMMIS快递单软件
产品费用:
3800元(一次付费授权)
服务器:3500元每年起
适用于:公司内部操作管理
指数:五颗星
使用产品:
EMMIS快递单软件+网站制作
产品费用:
11400元(一次付费授权)
服务器:3500元每年起+800元/年平台年费
适用于:内部操作管理+客户在线查单与报价
指数:五颗星
使用产品:
EMMIS+网站制作+会员后台
产品费用:
16400元(一次付费授权)
服务器:4500元每年起+800元/年平台年费
适用于:包含11400功能+会员登录下单打单
指数:四颗星
使用产品:
附加增值服务、微信、APP、短信、API对接
产品费用:
根据实际需求待定
服务器:根据实际需求待定
适用于:接口授权,接口开发,平台对接等
使用指数:四颗星
友情链接
OUR PARTNERS
Copyright 2017 www.56track.com All Right Reserved。版权所有:钮门快递管理软件   网站备案:ICP备123456789号