Wish邮API技术文档




运单信息接收API接口

API资源地址:https://www.wishpost.cn/api/v2/create_order

HTTP方法

POST提交XML格式(参数详见表格),提交的ContentType属性为text/xml

参数名 类型 长度 说明
access_token string 1-50 用户认证后生成的访问令牌
mark string 0-50 如果需要多个标签在一个PDF文件中, 请提交前一次返回的mark
bid integer 0-99999 用户提供的单次提交唯一标识
guid string 100 用户提供的运单唯一标识,将跟随运单号返回
otype string 1-50 中邮小包平邮=0
中邮小包挂号=1
中邮简易小包平邮=33-0
--------------------------------------
DLE=10-0
E邮宝=11-1
英伦速邮=14-0
DHLe经济小包=30-0
DHLe标准小包=31-1
IB快速服务=21-1
IB标准服务=22-1
Sinotrans(中外运)=23-1
Wishpost EPC=36-1
Wishpost YunExpress 专线=37-1
Wishpost WiseExpress 专线=44-1
飞特挂号小包=55-1
飞特经济小包=56-0
欧洲经济小包=200-0
欧洲标准小包=201-1
Wish达=300-1
from string 0-100 寄件人姓名(留空将使用地址簿默认信息)
sender_province string 0-100 寄件人省名(留空将使用地址簿默认信息)
sender_city string 0-100 寄件人城市名(留空将使用地址簿默认信息)
sender_district string 0-100 寄件人区/县名(留空将使用地址簿默认信息)
sender_addres string 0-100 寄件人地址(留空将使用地址簿默认信息)
sender_phone string 0-20 寄件人电话(留空将使用地址簿默认信息)
sender_zipcode string 1-200 寄件人邮编(留空将使用地址簿默认信息,地址簿寄件人邮编为空将使用310000)
pickup_from_local string 1-100 揽收人姓名(当地国语言)
pickup_addres_local string 1-2000 揽收人地址(当地国语言)
pickup_province_local string 1-1000 揽收人省名(当地国语言)
pickup_city_local string 1-1000 揽收人城市名(当地国语言)
pickup_district_local string 1-1000 揽收人区/县名(当地国语言)
pickup_phone string 1-250 揽收人电话
pickup_from string 1-100 揽收人姓名英文
pickup_addres string 1-2000 揽收人地址英文
pickup_province string 1-1000 揽收人省名英文
pickup_city string 1-1000 揽收人城市名英文
pickup_district string 1-1000 揽收人区/县名英文
pickup_country_local string 1-500 揽收人国家(当地国语言)
pickup_country string 1-500 揽收人国家英文
pickup_country_code string 3 揽收人国家代码
pickup_zip_code string 1-200 揽收人邮编
to string 1-100 收件人姓名(必须是英文),Wishpost EPC 选填
recipient_country string 1-50 收件人国家(英文),Wishpost EPC 选填
recipient_country_short string 1-3 收件人国家简码(如:US,GB,UK),Wishpost EPC 选填
recipient_province string 1-100 收件人州名(英文),Wishpost EPC 选填
recipient_city string 1-100 收件人城市名(英文),Wishpost EPC 选填
recipient_district string 1-100 收件人区/县名(英文), 选填
recipient_addres string 1-100 收件人地址(英文),Wishpost EPC 选填
recipient_postcode string 1-10 收件人邮编,Wishpost EPC 选填
recipient_phone string 1-20 收件人电话,Wishpost EPC 选填
to_local string 1-100 收件人姓名(到达国语言, 留空将使用英文信息)
recipient_country_local string 0-50 收件人国家(到达国语言, 留空将使用英文信息)
recipient_province_local string 0-100 收件人州名(到达国语言, 留空将使用英文信息)
recipient_city_local string 0-100 收件人城市名(到达国语言, 留空将使用英文信息)
recipient_district_local string 0-100 收件人城市名(到达国语言, 留空将使用英文信息)
recipient_addres_local string 0-100 收件人地址(到达国语言, 留空将使用英文信息)
type_no integer 1 内件类型代码:
1=礼品
2=文件
3=商品货样
4=其他)
from_country string 1-50 货物原产国(英文)
content string 1-100 内件物品的详细名称(英文)
content_chinese string 1-50 内件物品的详细中文名称(必填,必须包含中文)
num integer 1-99999 内件数量
unit_measurement string 0-20 英文计量单位
unit_measurement_chinese string 0-20 中文计量单位
weight float 0-2.000 货品重量,千克(三位小数)
single_price money 0-99999.00 货品申报价值(两位小数)
trande_no string 1-499 在Wish订单ID,所有渠道必填。
该字段必须是英文字母、数字、或英文逗号字符(分割多个交易单号时使用)中间不得有空格。
如不属于Wish平台交易,请填写默认值NonWishOrder,注意此类物流订单的跟踪号无法回填到Wish商户后台;
如属于Wish平台交易号,请正确填写Wish商户后台显示的24位字符串(API接口中对应字段:order_id)。
该字段支持单个ID,如:56f1205a44dc6fb51631f26f;也支持最多20个ID,如:56f1205a44dc6fb51631f26f,56f1205a44dc6fb51631f26f。
trade_amount money 0-99999.00 WISH网站的交易金额,单位为美元, 包含物品价值和物流费用
user_desc string 0-500 商户自定义信息,例如商户订单号, 商品编号,库位号等
receive_from string 0-100 揽收信息联系人(必须中文)
receive_province string 0-100 揽收信息省名(必须中文)
receive_city string 0-100 揽收信息城市名(必须中文)
receive_district string 0-100 揽收信息区/县名(必须中文)
receive_addres string 0-100 揽收信息(必须中文)
receive_phone string 0-20 揽收信息电话
warehouse_code integer 0-10 分仓代码(中邮小包、IB必填)
-----------------------------------
以下为中邮小包平邮、挂号支持仓库:
1=上海仓
2=广州仓
3=深圳仓
4=义乌仓
5=北京仓
6=南京仓
7=福州仓
8=青岛仓
9=武汉仓
10=东莞仓
11=杭州仓
12=金华仓
13=宁波仓
14=温州仓
15=厦门仓
16=重庆仓
17=天津仓
18=苏州仓
19=合肥仓
20=长沙仓
21=郑州仓
22=成都仓
23=许昌仓
24=泉州仓
25=佛山仓
26=漳浦仓
29=无锡仓
30=南阳仓
31=石家庄仓
32=荆州仓
33=南昌仓
34=大连仓
35=济南仓
36=宜昌仓
37=南通仓
38=中山仓
-----------------------------------
以下为IB标准、快速服务支持仓库:
27=华东仓
28=华南仓
doorpickup integer 1 是否上门揽收
0=自送
1=上门揽收
has_battery integer 1 是否带电(Wish达、IB、欧洲(经济/标准)小包、EPC、所有DHL必填,其他渠道选填):
0=不带电
1=带电
EPC订单包含特货此项也须传1 (EPC特货清单)
product_url string string 产品网页链接(Wish达、IB、欧洲(经济/标准)小包、EPC、所有DHL必填,其他渠道选填)

(最多一次提交50个<order>)

返回内容:XML文档

Timestamp => 时间
Status => 状态码
barcode => 运单号
mark => 标识字符串
PDF_10_EN_URL => PDF标签10*10英文版下载地址
PDF_10_LCL_URL => PDF标签10*10到达国版下载地址
error_message => 错误说明
--------------- (以下字段只有DLP返回) --------------------
PDF_15_EN_URL => PDF标签10*5下载地址
recipient_country => 到达国家(如:法国)
recipient_country_short => 国家简码(如:FR)
c_code => 产品代码(如:C02 )
q_code => 渠道代码(如:Q03)
y_ code => 验证码(如:9709)
user_desc => 用户自定义信息

示例

<?xml version="1.0" ?>
<orders>
	<access_token>f06d703a71e4412aad8a579925aef656</access_token>
	<mark/>
	<bid>0</bid>
	<order>
		<guid>12345</guid>
		<otype>0</otype>
		<from>ZENG WEI</from>
		<sender_addres>756 ROOM 2 DANYUAN MEILONGYUAN LONGHUA</sender_addres>
		<sender_province>GUANGDONG</sender_province>
		<sender_city>SHENZHEN</sender_city>
		<sender_phone>18620352867</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kali West</to>
		<to_local>Kali West</to_local>
		<recipient_addres>20/37 Gerrale Street</recipient_addres>
		<recipient_addres_local>20/37 Gerrale Street</recipient_addres_local>
		<recipient_country>Australia</recipient_country>
		<recipient_country_short>AU</recipient_country_short>
		<recipient_country_local>Australia</recipient_country_local>
		<recipient_province>New South Wales</recipient_province>
		<recipient_province_local>New South Wales</recipient_province_local>
		<recipient_city>Cronulla</recipient_city>
		<recipient_city_local>Cronulla</recipient_city_local>
		<recipient_postcode>2230</recipient_postcode>
		<recipient_phone>11</recipient_phone>
		<content>LED light</content>
		<type_no>1</type_no>
		<weight>0.15</weight>
		<num>5</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>2</single_price>
		<from_country>China</from_country>
		<user_desc>asgfdgs</user_desc>
		<trande_no>1534563462</trande_no>
		<trade_amount>11.45</trade_amount>
		<doorpickup>1</doorpickup>
		<warehouse_code>1</warehouse_code>
	</order>
	<order>
		<guid>12346</guid>
		<otype>1</otype>
		<from>ZENG WEI</from>
		<sender_province>GUANGDONG</sender_province>
		<sender_city>SHENZHEN</sender_city>
		<sender_addres>756 ROOM 2 DANYUAN MEILONGYUAN LONGHUA</sender_addres>
		<sender_phone>18620352867</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kali West</to>
		<to_local>Kali West</to_local>
		<recipient_addres>20/37 Gerrale Street</recipient_addres>
		<recipient_addres_local>20/37 Gerrale Street</recipient_addres_local>
		<recipient_country>Australia</recipient_country>
		<recipient_country_short>AU</recipient_country_short>
		<recipient_country_local>Australia</recipient_country_local>
		<recipient_province>New South Wales</recipient_province>
		<recipient_province_local>New South Wales</recipient_province_local>
		<recipient_city>Cronulla</recipient_city>
		<recipient_city_local>Cronulla</recipient_city_local>
		<recipient_postcode>2230</recipient_postcode>
		<recipient_phone>11</recipient_phone>
		<content>LED light</content>
		<type_no>1</type_no>
		<weight>0.15</weight>
		<num>5</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>2</single_price>
		<from_country>China</from_country>
		<user_desc>something</user_desc>
		<trande_no>1534563462</trande_no>
		<trade_amount>11.45</trade_amount>
		<receive_from>许勤</receive_from>
		<receive_province>广东</receive_province>
		<receive_city>深圳</receive_city>
		<receive_addres>福田区福中三路市民中心大楼</receive_addres>
		<receive_phone>12345</receive_phone>
		<doorpickup>1</doorpickup>
		<warehouse_code>2</warehouse_code>
	</order>
	<order>
		<guid>12347</guid>
		<otype>9-0</otype>
		<from>ZENG WEI</from>
		<sender_province>GUANGDONG</sender_province>
		<sender_city>SHENZHEN</sender_city>
		<sender_addres>756 ROOM 2 DANYUAN MEILONGYUAN LONGHUA</sender_addres>
		<sender_phone>18620352867</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kali West</to>
		<to_local>Kali West</to_local>
		<recipient_addres>20/37 Gerrale Street</recipient_addres>
		<recipient_addres_local>20/37 Gerrale Street</recipient_addres_local>
		<recipient_country>Australia</recipient_country>
		<recipient_country_short>AU</recipient_country_short>
		<recipient_country_local>Australia</recipient_country_local>
		<recipient_province>New South Wales</recipient_province>
		<recipient_province_local>New South Wales</recipient_province_local>
		<recipient_city>Cronulla</recipient_city>
		<recipient_city_local>Cronulla</recipient_city_local>
		<recipient_postcode>2230</recipient_postcode>
		<recipient_phone>11</recipient_phone>
		<content>LED light</content>
		<type_no>1</type_no>
		<weight>0.15</weight>
		<num>5</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>2</single_price>
		<from_country>China</from_country>
		<user_desc>something</user_desc>
		<trande_no>1534563462</trande_no>
		<trade_amount>11.45</trade_amount>
		<doorpickup>1</doorpickup>
	</order>
	<order>
		<guid>12348</guid>
		<otype>10-0</otype>
		<from>ZENG WEI</from>
		<sender_province>GUANGDONG</sender_province>
		<sender_city>SHENZHEN</sender_city>
		<sender_addres>756 ROOM 2 DANYUAN MEILONGYUAN LONGHUA</sender_addres>
		<sender_phone>18620352867</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kali West</to>
		<to_local>Jaden Smith</to_local>
		<recipient_addres>322 Edge Street</recipient_addres>
		<recipient_addres_local>322 Edge Street</recipient_addres_local>
		<recipient_country>United States</recipient_country>
		<recipient_country_short>US</recipient_country_short>
		<recipient_country_local>United States</recipient_country_local>
		<recipient_province>South Carolina</recipient_province>
		<recipient_province_local>South Carolina</recipient_province_local>
		<recipient_city>Columbia</recipient_city>
		<recipient_city_local>Columbia</recipient_city_local>
		<recipient_postcode>29201</recipient_postcode>
		<recipient_phone>11</recipient_phone>
		<content>LED light</content>
		<type_no>1</type_no>
		<weight>0.15</weight>
		<num>5</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>2</single_price>
		<from_country>China</from_country>
		<user_desc>something</user_desc>
		<trande_no>1534563462</trande_no>
		<trade_amount>11.45</trade_amount>
		<doorpickup>1</doorpickup>
	</order>
	<order>
		<guid>12349</guid>
		<otype>11-0</otype>
		<from>ZENG WEI</from>
		<sender_province>GUANGDONG</sender_province>
		<sender_city>SHENZHEN</sender_city>
		<sender_addres>756 ROOM 2 DANYUAN MEILONGYUAN LONGHUA</sender_addres>
		<sender_phone>18620352867</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kali West</to>
		<to_local>Kali West</to_local>
		<recipient_addres>20/37 Gerrale Street</recipient_addres>
		<recipient_addres_local>20/37 Gerrale Street</recipient_addres_local>
		<recipient_country>Australia</recipient_country>
		<recipient_country_short>AU</recipient_country_short>
		<recipient_country_local>Australia</recipient_country_local>
		<recipient_province>New South Wales</recipient_province>
		<recipient_province_local>New South Wales</recipient_province_local>
		<recipient_city>Cronulla</recipient_city>
		<recipient_city_local>Cronulla</recipient_city_local>
		<recipient_postcode>2230</recipient_postcode>
		<recipient_phone>11</recipient_phone>
		<content>LED light</content>
		<type_no>1</type_no>
		<weight>0.15</weight>
		<num>5</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>2</single_price>
		<from_country>China</from_country>
		<user_desc>something</user_desc>
		<trande_no>1534563462</trande_no>
		<trade_amount>11.45</trade_amount>
		<doorpickup>1</doorpickup>
	</order>
	<order>
		<guid>MGP1704200142254</guid>
		<otype>21-1</otype>
		<warehouse_code>27</warehouse_code>
		<pickup_from_local>苏蕙</pickup_from_local>
		<pickup_addres_local>鼓楼区 新三路987弄3号201室</pickup_addres_local>
		<pickup_province_local>福建省</pickup_province_local>
		<pickup_city_local>福州市</pickup_city_local>
		<pickup_phone>13763813216</pickup_phone>
		<from>subilong</from>
		<sender_addres>GulouQu Darushijai</sender_addres>
		<sender_province>Fujiansheng</sender_province>
		<sender_city>Fuzhoushi</sender_city>
		<sender_phone>13763813216</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kalynn Stiles</to>
		<to_local/>
		<recipient_addres>25380 County Rd. 21A</recipient_addres>
		<recipient_addres_local/>
		<recipient_country>United States</recipient_country>
		<recipient_country_short>US</recipient_country_short>
		<recipient_country_local/>
		<recipient_province>California</recipient_province>
		<recipient_province_local/>
		<recipient_city>Esparto</recipient_city>
		<recipient_city_local/>
		<recipient_postcode>95627</recipient_postcode>
		<recipient_phone>(530)787-3999</recipient_phone>
		<content>Geneva Fashion Women Small Steel Band Analog Quartz Wrist Watch Watches</content>
		<content_chinese>手表</content_chinese>
		<type_no>1</type_no>
		<weight>0.6</weight>
		<num>1</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>3.00</single_price>
		<from_country>China</from_country>
		<user_desc>手表 Deng21 1;</user_desc>
		<trande_no>595db7cb723b301bb9013584</trande_no>
		<trade_amount>3.00</trade_amount>
		<receive_from>苏碧龙</receive_from>
		<receive_province>福建省</receive_province>
		<receive_city>福州市</receive_city>
		<receive_addres>鼓楼区大儒世家</receive_addres>
		<receive_phone>13763813216</receive_phone>
		<doorpickup>1</doorpickup>
		<product_url>https://www.wish.com/c/575d15bb51127360e5c56921</product_url>
		<has_battery>0</has_battery>
	</order>
	<order>
		<guid>MGP1704200142254</guid>
		<otype>300-1</otype>
		<from>subilong</from>
		<sender_addres>GulouQu Darushijai</sender_addres>
		<sender_province>Fujiansheng</sender_province>
		<sender_city>Fuzhoushi</sender_city>
		<sender_phone>13763813216</sender_phone>
		<sender_zipcode>310000</sender_zipcode>
		<to>Kalynn Stiles</to>
		<to_local/>
		<recipient_addres>25380 County Rd. 21A</recipient_addres>
		<recipient_addres_local/>
		<recipient_country>United States</recipient_country>
		<recipient_country_short>US</recipient_country_short>
		<recipient_country_local/>
		<recipient_province>California</recipient_province>
		<recipient_province_local/>
		<recipient_city>Esparto</recipient_city>
		<recipient_city_local/>
		<recipient_postcode>95627</recipient_postcode>
		<recipient_phone>(530)787-3999</recipient_phone>
		<content>Candlestick Deng21</content>
		<type_no>1</type_no>
		<weight>0.300</weight>
		<num>1</num>
		<unit_measurement>item</unit_measurement>
		<unit_measurement_chinese>个</unit_measurement_chinese>
		<single_price>5.00</single_price>
		<from_country>China</from_country>
		<user_desc>烛台 Deng21 1;</user_desc>
		<trande_no>58f797a22a600eb9455ae5e8</trande_no>
		<trade_amount>3.00</trade_amount>
		<receive_from>苏碧龙</receive_from>
		<receive_province>福建省</receive_province>
		<receive_city>福州市</receive_city>
		<receive_addres>鼓楼区大儒世家</receive_addres>
		<receive_phone>13763813216</receive_phone>
		<warehouse_code/>
		<doorpickup>1</doorpickup>
		<product_url>https://www.wish.com/c/579726aa9a99900b221cb2dc</product_url>
		<has_battery>0</has_battery>
	</order>
</orders>

                            

返回成功示例:

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:56:09</timestamp>
	<status>0</status>
	<wish_standard_tracking_id guid="12345" state="Created">WOSP000000022891AUS</wish_standard_tracking_id>
	<barcode guid="12345" state="Created">PP001764326BJ</barcode>
	<mark>1e191d851b3b49a248f4ea62f6b06410</mark>
	<PDF_10_EN_URL>http://www.wishpost.cn/api/v2/download_label?access_token=f06d703a71e4412aad8a579925aef656&format=10&use_local=false&mark=7fcb4b1c5aa611e6932260a44c5bad70</PDF_10_EN_URL>
	<PDF_10_LCL_URL>http://www.wishpost.cn/api/v2/download_label?access_token=f06d703a71e4412aad8a579925aef656&format=10&use_local=true&mark=7fcb4b1c5aa611e6932260a44c5bad70</PDF_10_LCL_URL>
</root>

                        

返回错误示例:

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:54:39</timestamp>
	<status>1</status>
	<error_message>Unauthorized Request</error_message>
</root>

                        
or
<?xml version="1.0" ?>
<root>
	<status>2</status>
	<timestamp>2018/05/16 11:59:49</timestamp>
	<error_message guid="0">收件人邮编4501错误,印度的邮编是6位数字,如:456001</error_message>
	<mark>9445c60a58bd11e880c90242ac110005</mark>
	<PDF_10_EN_URL>https://wishpost.corp.contextlogic.com/api/v2/download_label?access_token=e7339bc2203f41fdbeaba7c78ba7e37e&format=10&use_local=false&mark=9445c60a58bd11e880c90242ac110005</PDF_10_EN_URL>
	<PDF_10_LCL_URL>https://wishpost.corp.contextlogic.com/api/v2/download_label?access_token=e7339bc2203f41fdbeaba7c78ba7e37e&format=10&use_local=true&mark=9445c60a58bd11e880c90242ac110005</PDF_10_LCL_URL>
</root>

获取运单状态查询接口

API资源地址:https://www.wishpost.cn/api/v3/order_status

HTTP方法

POST提交JSON格式(参数详见表格),提交的ContentType属性为application/json

参数名 类型 长度 说明
access_token string 1-50 用户认证后生成的访问令牌
wish_standard_tracking_ids string 19 Wish 运单号

(最多一次提交1000个<wish_standard_tracking_id>)

返回内容:JSON

timestamp => 时间
message => 接口返回消息
code => 接口返回状态码
wish_standard_tracking_id => Wish 运单号
state_code => 接口返回状态码
logistics_order_code => 运单物流单号
state_name => 订单状态名字
reference_qrcode => 瑞典渠道二维码
message => 订单详情
PDF_10_EN_URL => PDF标签10*10英文版下载地址
PDF_10_LCL_URL => PDF标签10*10到达国版下载地址

示例

{
  "access_token": "b1c18f0ba16b44c0bf6a16733da4a36f",
  "wish_standard_tracking_ids": [
    "WOSP000644993647IND",
    "WOSP000644993649IND",
    "WOSP000644993648IND"
  ]
}
                            

返回成功示例

{
  "code": 0,
  "message": "All success",
   "orders":  [
       {
          “wish_standard_tracking_id”: “WOSP000644993647IND”
          "logistics_order_code": "EIM980765110",
           “state_name”: “Accepted”,
           “state_code”: 6,
           "message": "",
           "PDF_10_LCL_URL": "https://wishpost.corp.contextlogic.com/api/v2/download_label?access_token=b1c18f0ba16b44c0bf6a16733da4a36f&order_id=5affbfb3ce82d32b327cfd11&use_local=true&format=10",
           "PDF_10_EN_URL": "https://wishpost.corp.contextlogic.com/api/v2/download_label?access_token=b1c18f0ba16b44c0bf6a16733da4a36f&order_id=5affbfb3ce82d32b327cfd11&use_local=false&format=10"
       },
       {
          “wish_standard_tracking_id”: “WOSP000644993649IND”
          "logistics_order_code": "",
          “state_name”: “Canceled”,
          “state_name”: 4,
          "message": "",
          "PDF_10_LCL_URL": "",
          "PDF_10_EN_URL": ""
       },
       {
          “wish_standard_tracking_id”: “WOSP000644993648IND”
          "logistics_order_code": "",
          “state_name”: “Reviewing”,
          “state_code”: 5,
          "message": "",
          "PDF_10_LCL_URL": "",
          "PDF_10_EN_URL": ""
       }
   ]
}

{
  "code": 0,
  "message": "Some wish_tracking_ids are invalid",
   "orders":  [
       {
          “wish_standard_tracking_id”: “WOSP000644993649IND”
          "logistics_order_code": "",
          “state_name”: “Canceled”,
          “state_code”: 4,
          "PDF_10_LCL_URL": "",
          "PDF_10_EN_URL": ""
       }
   ]
}
                        

返回错误示例

{
  "timestamp": "2018-03-09 12:24:17",
  "message": "No valid wish_standard_tracking_ids is provided",
  "code": 1001,
  "orders": []
}
                        

获取渠道信息接口

API资源地址:https://www.wishpost.cn/api/v3/get_channels

HTTP方法

POST提交JSON格式(参数详见表格),提交的ContentType属性为application/json

参数名 类型 长度 说明
access_token string 1-50 用户认证后生成的访问令牌
wish_standard_tracking_ids string 19 Wish 运单号

返回内容:JSON

channel => 渠道
otype => 渠道otype代码 channel_name => 渠道名称
allow_battery => 允许电池
sensitivity_type => 敏感类型
is_registered => 是否挂号
support_warehouses => 是否分仓
warehouses => 仓库列表
warehouses_return_address => 退件单位

示例

{
  "access_token": "b1c18f0ba16b44c0bf6a16733da4a36f",
  "channels": []
}
                            

返回成功示例

{
    "channels": [
        {
            "support_warehouses": true,
            "channel_name": "Wishpost - China Post",
            "allow_battery": false,
            "sensitivity_types": [0],
            "otype": "0",
            "is_registered": false,
            "warehouses": {
                "1": "Shanghai Warehouse",
                "2": "Guangzhou Warehouse",
                "3": "Shenzhen Warehouse",
                "4": "Yiwu Warehouse",
                "5": "Beijing Warehouse",
                "6": "Nanjing Warehouse",
                "7": "Fuzhou Warehouse",
                "8": "Qingdao Warehouse",
                "9": "Wuhan Warehouse",
                "10": "Dongguan Warehouse",
                "11": "Hangzhou Warehouse",
                "12": "Jinhua Warehouse",
                "13": "Ningbo Warehouse",
                "14": "Wenzhou Warehouse",
                "15": "Xiamen Warehouse",
                "16": "Chongqing Warehouse",
                "17": "Tianjin Warehouse",
                "18": "Suzhou Warehouse",
                "19": "Hefei Warehouse",
                "20": "Changsha Warehouse",
                "21": "Zhengzhou Warehouse",
                "22": "Chengdu Warehouse",
                "23": "Xuchang Warehouse",
                "24": "Quanzhou Warehouse",
                "25": "Foshan Warehouse",
                "26": "Zhangpu Warehouse",
                "29": "Wuxi Warehouse",
                "30": "Nanyang Warehouse",
                "31": "Shijiazhuang Warehouse",
                "32": "Jingzhou Warehouse",
                "33": "Nanchang Warehouse",
                "34": "Dalian Warehouse",
                "35": "Jinan Warehouse",
                "36": "Yichang Warehouse",
                "37": "Nantong Warehouse",
                "38": "Zhongshan Warehouse"
            },
            "warehouses_return_address": {
                "1": "中国邮政集团公司上海市广商局国际小包业务收寄点",
                "2": "广州小包大宗收寄处理中心",
                "3": "深圳市国际大宗邮件处理中心",
                "4": "中国邮政集团公司浙江省义乌市邮购配送公司",
                "5": "北京快速直封中心",
                "6": "中国邮政集团公司南京市邮政函件局",
                "7": "福州中转仓",
                "8": "青岛市邮政局函件广告局销售部受理中心",
                "9": "武汉大宗收寄中心",
                "10": "东莞市邮政局电商包裹局国际小包处理组",
                "11": "中国邮政集团公司杭州市分公司包裹快递部",
                "12": "金华市小包分局",
                "13": "中国邮政集团公司宁波市电商包裹局",
                "14": "温州市两包集中收寄中心",
                "15": "厦门市大宗邮件集中处理中心",
                "16": "中国邮政集团公司重庆市万盛经济技术开发区万东支局",
                "17": "天津大宗邮件收寄处理中心",
                "18": "中国邮政集团公司苏州市大宗邮件处理中心",
                "19": "合肥大宗处理中心",
                "20": "中国邮政集团公司湖南省长沙县函件班",
                "21": "郑州帐单处理中心",
                "22": "成都市邮政局大宗邮件处理中心",
                "23": "许昌市分公司大宗邮件集中收寄处理中心",
                "24": "泉州市邮政函件局",
                "25": "中国邮政集团公司佛山市函件集邮局",
                "26": "漳浦县盘陀邮政支局",
                "29": "中国邮政集团公司无锡市大宗邮件处理中心",
                "30": "南阳市大宗邮件集中收寄处理中心",
                "31": "中邮石家庄仓",
                "32": "荆州区荆中支局",
                "33": "南昌市函件局",
                "34": "大连大宗收寄中心",
                "35": "中国邮政集团公司济南市函件广告局大宗业务中心",
                "36": "宜昌包裹快递部",
                "37": "南通邮政局函件局",
                "38": "中山市邮政局函件集邮局商函广告公司"
            },
            "channel": 1
        },
    ]
}
                        

返回错误示例

{
    "timestamp": "2018-06-06 13:56:00",
    "message": "API key is unauthorized",
    "code": 4000
}
                        

运单跟踪信息API接口

API资源地址:https://www.wishpost.cn/api/v2/tracking

HTTP方法

POST提交XML格式(参数详见表格),提交的ContentType属性为text/xml

参数名 类型 长度 说明
language string 2 跟踪信息语言:cn或en
barcode string 1-14 运单号

(最多一次提交10个<track>)

返回内容:XML文档

Time stamp => 时间
Status => 状态码
barcode => 运单号
date => 日期
status_number => 运单状态码
status_desc => 运单状态描述
remark => 备注
运单状态码:
1:运单已生成
2:货物入库扫描
3:货物出库扫描
4:货物退回
5:收寄局收寄
6:邮政处理中直封封发
7:空港配载启运
8:到达目的国

示例

<?xml version="1.0" ?>
<tracks>
	<language>cn</language>
	<track>
		<barcode>WS000000041SH</barcode>
	</track>
	<track>
		<barcode>RH091135288CN</barcode>
	</track>
</tracks>

                            

返回成功示例

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:56:09</timestamp>
	<status>0</status>
	<tracks barcode=" WS000000041SH" error_message="">
		<track>
			<date>2014-2-6</date>
			<status_number>1</status_number>
			<status_desc>运单已生成</status_desc>
			<remark/>
		</track>
		<track>
			<date>2014-2-6</date>
			<status_number>2</status_number>
			<status_desc>货物入库扫描</status_desc>
			<remark/>
		</track>
	</tracks>
	<tracks barcode="RH091135288CN" error_message="">
		<track>
			<date>2014-2-5</date>
			<status_number>1</status_number>
			<status_desc>运单已生成</status_desc>
			<remark/>
		</track>
		<track>
			<date>2014-2-5</date>
			<status_number>2</status_number>
			<status_desc>货物入库扫描</status_desc>
			<remark/>
		</track>
	</tracks>
</root>

                        

返回错误示例:

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:54:39</timestamp>
	<status>1</status>
	<error_message>一次最多提交10个barcode</error_message>
</root>

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:56:09</timestamp>
	<status>0</status>
	<tracks barcode="WS000000141SH" error_message="无此运单号"/>
	<tracks barcode="RH091135288CN" error_message="">
		<track>
			<date>2014-2-5</date>
			<status_number>1</status_number>
			<status_desc>运单已生成</status_desc>
			<remark/>
		</track>
		<track>
			<date>2014-2-5</date>
			<status_number>2</status_number>
			<status_desc>货物入库扫描</status_desc>
			<remark/>
		</track>
	</tracks>
</root>

获取PDF标签API接口

API资源地址:https://www.wishpost.cn/api/v2/generate_label

HTTP方法

POST提交XML格式(参数详见表格),提交的ContentType属性为text/xml

参数名 类型 长度 说明
access_token string 1-50 用户认证后生成的访问令牌
printlang integer 1 标签语言:1=英语,2=到达国语
printcode integer 1 标签格式(英寸): 2=4×4,3=4×2(DLP专用)
barcode string 1-16 运单号

(最多一次提交50个<barcode>)

返回内容:XML文档

Timestamp => 时间
Status => 状态码
PDF_URL => PDF标签下载地址
error_message => 错误说明

示例

<?xml version="1.0" ?>
<root>
	<access_token>f06d703a71e4412aad8a579925aef656</access_token>
	<printlang>2</printlang>
	<printcode>1</printcode>
	<barcodes>
		<barcode>01922451085</barcode>
		<barcode>RQ990073255CN</barcode>
	</barcodes>
</root>

                            

返回成功示例

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:56:09</timestamp>
	<status>0</status>
	<PDF_URL>https://www.wishpost.cn/api/v2/download_label?access_token=f06d703a71e4412aad8a579925aef656&use_local=False&api_orderid=bfff4eb25aa731e6923260a44c5bad70&format=10</PDF_URL>
</root>

                        

返回错误示例:

<?xml version="1.0" ?>
<root>
	<timestamp>2014-2-7 11:54:39</timestamp>
	<status>1</status>
	<error_message>Unauthorized Request</error_message>
</root>