Wish邮API文档

Order


Create an order

API端点: https://wishpost.wish.com/api/v2/create_order

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
api_key string 83-84 用来验证身份
mark string 0-50 如果需要多个标签在一个PDF文件中, 请提交前一次返回的mark
bid int 0-99999 用户提供的单次提交唯一标识
guid string 100 用户提供的运单唯一标识,将跟随运单号返回
otype string 1-50 中邮小包平邮=0
中邮小包挂号=1
中邮简易小包平邮=33-0
--------------------------------------
DLE=10-1
E邮宝=11-1
英伦速邮=14-0
IB快速服务=21-1
IB标准服务=22-1
Sinotrans(中外运)=23-1
DHLe经济小包=30-0
DHLe标准小包=31-1
Wishpost EPC=36-1
Wishpost YunExpress 专线=37-1
Wishpost WiseExpress 专线=44-1
顺友国际小包(挂号)=49-1(线上结算)
顺友国际小包(平邮)=54-0(线上结算)
飞特挂号小包=55-1
飞特经济小包=56-0
TopYou平邮小包-普货=77-0(线上结算)
TopYou平邮小包-特货=78-0(线上结算)
TopYou挂号小包-普货=79-1(线上结算)
TopYou挂号小包-特货=80-1(线上结算)
欧洲经济小包=200-0
欧洲标准小包=201-1
Wish达=300-1
更多渠道otype 请调用get channels API
from string 0-100 寄件人姓名(留空将使用地址簿默认信息)
sender_province string 0-100 寄件人省名(留空将使用地址簿默认信息)
sender_city string 0-100 寄件人城市名(留空将使用地址簿默认信息)
sender_addres string 0-100 寄件人地址(留空将使用地址簿默认信息)
sender_phone string 0-20 寄件人电话(留空将使用地址簿默认信息. 号码可以以一个+开头,可以以-连接或以()围住. 不可以包含其他符号或其他语言字符)
sender_zipcode string 1-200 寄件人邮编(留空将使用地址簿默认信息,地址簿寄件人邮编为空将使用310000)
pickup_service string 1-100 揽收服务,针对于EPC渠道,如果doorpickup选择1(上门揽收),则必填25-1(4PX揽收)或者27-1(WISE揽收)或者42-0(燕文揽收)或者47-0(顺友揽收),如果doorpickup选择0(自寄),则可不填,对于其他渠道,均不填写此字段
pickup_from_local string 1-100 揽收人姓名(当地国语言),Sinotrans、IB、EPC、YunExpress和Wiseexpress必填
pickup_phone string 1-250 揽收人电话,Sinotrans、IB、EPC、YunExpress和Wiseexpress必填
pickup_zip_code string 1-200 揽收人邮编
pickup_addres_local string 1-200 揽收人地址(当地国语言),Sinotrans、IB、EPC、YunExpress和Wiseexpress必填
pickup_province_local string 1-1000 揽收人省名(当地国语言),Sinotrans、IB、EPC、YunExpress和Wiseexpress必填
pickup_city_local string 1-1000 揽收人城市名(当地国语言),Sinotrans、IB、EPC、YunExpress和Wiseexpress必填
pickup_from string 1-100 揽收人姓名英文
pickup_addres string 1-200 揽收人地址英文
pickup_province string 1-1000 揽收人省名英文
pickup_city string 1-1000 揽收人城市名英文
pickup_country_local string 1-500 揽收人国家(当地国语言)
pickup_country string 1-500 揽收人国家英文
pickup_country_code string 3 揽收人国家代码
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_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_addres_local string 0-100 收件人地址(到达国语言, 留空将使用英文信息)
type_no int 1 内件类型代码
1=礼品
2=文件
3=商品货样
4=其他

from_country string string 货物原产国(英文)
content string 1-100 内件物品的详细名称(英文), 必须包含至少一个英文字母
content_chinese string 1-50 内件物品的详细中文名称(必填,必须包含中文)
num int 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_addres string 0-100 揽收信息(必须中文)
receive_phone string 0-20 揽收信息电话
warehouse_code int 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 int 1 是否上门揽收
0=自送
1=上门揽收
has_battery int 1 是否带电,
必填
0=不带电,
1=带电,
EPC订单包含特货此项也须传1,EPC特货清单链接:
https://s3.cn-north-1.amazonaws.com.cn/wishpost-production-wishpost-announcement/EPC特货清单.xlsx
product_url string string 产品网页链接(必填)

响应

参数名称 描述
Timestamp 时间
Status 状态码
wish_standard_tracking_id 物流订单号
barcode 物流跟踪单号
mark 标识字符串
PDF_10_EN_URL PDF标签10*10英文版下载地址
PDF_10_LCL_URL PDF标签10*10到达国版下载地址
error_message 错误说明
PDF_15_EN_URL PDF标签10*5下载地址
recipient_country 到达国家(如:法国)
recipient_country_short 国家简码(如:FR)
c_code 产品代码(如:C02 )
q_code 渠道代码(如:Q03)
y_ code 验证码(如:9709)
user_desc 用户自定义信息
reference_qrcode 瑞典渠道二维码

示例请求

                                
<?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>
        <content_chinese>发光二极管</content_chinese>
        <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>
        <content_chinese>发光二极管</content_chinese>
        <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>
        <content_chinese>发光二极管</content_chinese>
        <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>
        <content_chinese>发光二极管</content_chinese>
        <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>
        <content_chinese>发光二极管</content_chinese>
        <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>12345</guid>
        <otype>33-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>
        <content_chinese>发光二极管</content_chinese>
        <type_no>1</type_no>
        <weight>0.15</weight>
        <num>5</num>
        <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>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">PP001764319BJ</barcode>
    <mark>1e191d851b3b49a248f4ea62f6b06410</mark>
    <PDF_10_EN_URL>http://wishpost.wish.com/api/v2/download_label?access_token
    =f06d703a71e4412aad8a579925aef656&format=10&use_local=false&mark
    =7fcb4b1c5aa611e6932260a44c5bad70</PDF_10_EN_URL>
    <PDF_10_LCL_URL>http://wishpost.wish.com/api/v2/download_label
    ?access_token=f06d703a71e4412aad8a579925aef656&format=10&use_local=true
    &mark=7fcb4b1c5aa611e6932260a44c5bad70</PDF_10_LCL_URL>
</root>

or

<?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="Reviewing"></barcode>
    <mark>1e191d851b3b49a248f4ea62f6b06410</mark>
    <PDF_10_EN_URL>http://wishpost.wish.com/api/v2/download_label?access_token
    =f06d703a71e4412aad8a579925aef656&format=10&use_local=false&mark
    =7fcb4b1c5aa611e6932260a44c5bad70</PDF_10_EN_URL>
    <PDF_10_LCL_URL>http://wishpost.wish.com/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" encoding="utf-8"?>
<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&amp;format=10&amp;use_local=false&amp;mark=9445c60a58bd11e880c90242ac110005</PDF_10_EN_URL>
    <PDF_10_LCL_URL>https://wishpost.corp.contextlogic.com/api/v2/download_label?access_token=e7339bc2203f41fdbeaba7c78ba7e37e&amp;format=10&amp;use_local=true&amp;mark=9445c60a58bd11e880c90242ac110005</PDF_10_LCL_URL>
</root>
        

Order Status


Get order status

API端点: https://wishpost.wish.com/api/v3/order_status

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
wish_standard_tracking_ids list 1-500 Wish 运单号 List

响应

参数名称 描述
timestamp 时间
message 接口返回消息
code 接口返回状态码
wish_standard_tracking_id Wish 运单号
logistics_order_code 运单物流单号
state_code 订单状态码
state_name 订单状态名字
message 订单详情
PDF_10_EN_URL PDF标签10*10英文版下载地址
PDF_10_LCL_URL PDF标签10*10到达国版下载地址

附录

订单状态码 订单状态名字
0 错误
1 已创建
2 无效
3 拒绝
4 取消
5 审核中
6 已接受
7 运输中
8 已完成

示例请求

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

响应成功

                                
{
  "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": ""
       },
       {
            "PDF_10_LCL_URL": "",
            "message": "invalid post code",
            "state_name": "Rejected",
            "PDF_10_EN_URL": "",
            "logistics_order_code": "",
            "wish_standard_tracking_id": "WOSP000000023915USA",
            "state_code": 3
        },
   ]
}

{
  "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": []
}

 

Label


Generate a Label

API端点: https://wishpost.wish.com/api/v2/generate_label

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
api_key string 83-84 用来验证身份
printlang int 1 标签语言:1=英语,2=到达国语
printcode int 1 标签格式(英寸): 2=4×4,3=4×2(DLP专用)
barcode string 1-16 运单号

响应

参数名称 描述
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://wishpost.wish.com/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>
        

Tracking


Get tracking info

API端点: https://wishpost.wish.com/api/v2/tracking

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
api_key string 83-84 用来验证身份
barcode string 1-14 运单号
language string 2 跟踪信息语言:cn或en

响应

参数名称 描述
Time stamp 时间
Status 状态码
barcode 运单号
date 日期
status_number 运单状态码
status_desc 运单状态描述
remark 备注
city 城市
state
country_code 国家代码

附录

状态码 描述
1 Wishpost订单已生成
2 揽件
3 到达头程分拣中心
4 在头程分拣中心处处理
5 离开头程分拣中心
6 头程分拣中心退回
7 到达物流服务商处
8 在物流服务商处处理
9 从物流服务商处发出
10 物流服务商退回
11 到达始发国海关
12 始发国海关清关失败
13 离开始发国海关
14 计划交航
15 到达始发国机场
16 从机场发往目的国
17 到达目的国海关
18 目的国海关清关失败
19 离开目的国海关
20 到达目的国
21 到达收寄站
22 尝试投递
23 妥投
24 签收
25 海外退回
27 跟踪结束
28 到达中转中心
29 离开中转中心
30 到达目的国机场

示例请求

                                
<?xml version="1.0" ?>
<tracks>
    <language>cn</language>
    <track>
        <barcode>85632702094</barcode>
    </track>
    <track>
        <barcode>RW022229594CN</barcode>
    </track>
</tracks>

响应成功

                                

<?xml version="1.0" encoding="utf-8"?>
<root>
    <status>0</status>
    <timestamp>2017/10/11 19:03:41</timestamp>
    <tracks barcode="85632702094">
        <track>
            <date>2017-09-05 10:51:35</date>
            <status_number>1</status_number>
            <status_desc>Wishpost订单已生成</status_desc>
            <remark></remark>
            <city></city>
            <state></state>
            <country_code></country_code>
        </track>
    </tracks>
    <tracks barcode="RW022229594CN">
        <track>
            <date>2017-09-07 15:30:34</date>
            <status_number>1</status_number>
            <status_desc>Wishpost订单已生成</status_desc>
            <remark></remark>
            <city></city>
            <state></state>
            <country_code></country_code>
        </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>
                    

Channel


Get Channels

API端点: https://wishpost.wish.com/api/v3/get_channels

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
channels list 1-100 WishPost渠道otype的第一位数字,例如:E邮宝otype=11-1,E邮宝对应的channels值即为11;中邮挂号小包otype=1,中邮对应的channels值即为1

响应

参数名称 描述
otype 渠道otype
channel_name 渠道名称
channel_name_en 渠道英文名称
is_only_online_payment 是否仅支持线上结算
allow_battery 允许电池
is_registered 是否挂号
pickup_service 揽收服务
support_warehouses 是否分仓
warehouses 仓库列表
warehouses_return_address 退件单位

示例请求

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

响应成功

                                
{
    "channels": [
        {
            "support_warehouses": true,
            "channel_name": "WISH邮中国邮政",
            "channel_name_en": "Wishpost - China Post",
            "is_only_online_payment": false,
            "otype": "0",
            "allow_battery": false,
            "pickup_service": {},
            "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
}
 

Announcements


Get Announcements

API端点: https://wishpost.wish.com/api/v3/announcements

探索API

参数

参数名称 类型 长度 描述
access_token string 1-50 用户认证后生成的访问令牌
start_date string %Y-%m-%d 获取公告的起始时间,最早不得早于2016年4月4日
end_date string %Y-%m-%d 获取公告的终止时间,最晚比起始时间晚30天
offset int 1-100 获取公告的起始位置
limit int 1-50 获取公告每页条数,最多一次50条

响应

参数名称 描述
announcement 公告列表
title 公告标题
url 公告链接
text 公告文本,最长为500个字符,如需完整的请点击url
publish_time 公告发布时间
pagination 分页详情
total 所有页面总数
next 下一页,如果是最后一页,则为空
limit 下一页公告总数
offset 下一页公告起始位置
previous 上一页,如果是第一页,则为空
limit 上一页公告总数
offset 上一页公告起始位置
start_date 公告起始时间
end_date 公告截止时间

示例请求

                                
{
  "access_token": "b1c18f0ba16b44c0bf6a16733da4a36f",
  "offset": 3,
  "limit": 3,
  "start_date": "2018-09-17",
  "end_date": "2018-10-17"
}

响应成功

                                
{
    "timestamp": "2018-10-22 15:28:36",
    "message": "All success",
    "code": 0,
    "data": {
        "announcements": [
            {
                "url": "https://wishpost.corp.contextlogic.com/announcement?announcement_id=5b8507913691176b431368b7",
                "text": [
                    "Both cn and en"
                ],
                "publish_time": "2018-08-28",
                "title": "Create test"
            },
            {
                "url": "https://wishpost.corp.contextlogic.com/announcement?announcement_id=5b023ebe04ba544051210e9d",
                "text": [
                    "
尊敬的Wish平台商户:
 
您好!
 
近期部分商户在使用Wish官方物流渠道-中邮小包时出现了一些不合规的操作,请各商户进行自查,避免出现类似问题,影响包裹的正常运输。
 
1、包裹面单打印不规范
主要存在邮件条码打印精度过低、面单过小、收件人名址不全等问题。当操作人员发现邮件条码扫描困难、面单小于10cm*10cm的邮件时,会将包裹退回商户,最终会影响订单的整体配送时效,请相应不合规的商户尽快进行调整。
 
2、 包装封装不规范
超小邮件必须包装包装后邮件最大面积不小于10cm*10cm,封装时严禁使用玻璃胶覆盖面单条码部分,对于圆柱形、圆球形、细条尖锐等异形邮件,请使用矩形硬皮包装。
 
3、禁运产品
严禁使用Wish官方物流产品配送粉末类产品、牙签弩等武器类产品。
近期出现的禁运品的寄送,造成航空安检整票扣留,影响67个邮政大包,900KG、约9000+个Wish邮商户包裹运输,请各位商户知晓此类事件的严重性。
 
感谢您使用Wish邮!
 
Wish Post
 


 
"
                ],
                "publish_time": "2018-05-21",
                "title": "History data No.4"
            },
            {
                "url": "https://wishpost.corp.contextlogic.com/announcement?announcement_id=5b023ebe04ba544051210e9e",
                "text": [
                    "
尊敬的Wish平台商户:
 
从2017年6月23日起,中国邮政将停止接收寄往南极、喀麦隆、加那利群岛、关岛、几内亚比绍、马约特岛、密克罗尼西亚、黑山、纽埃岛、帕劳、圣马丁、斯瓦尔巴群岛、叙利亚、托克劳群岛、美国本土外小岛屿、也门、桑给巴尔、布韦岛、赫德岛和麦克唐纳群岛、英属印度洋领地、法属南部和南极领地、圣巴泰勒米岛、库拉索、圣马丁岛等24个地区的邮件。
 
在6月22日及之前已经交给中国邮政的邮件不受影响,会正常寄送。6月23日及之后接收的邮件,中国邮政将会联系商户安排退回。
 
感谢使用Wish邮!
 
Wish Post

 
"
                ],
                "publish_time": "2018-05-21",
                "title": "History data No.5"
            },
        ],
        "pagination": {
            "total": 66,
            "next": {
                "limit": 3,
                "offset": 6
            },
            "previous": {
                "limit": 3,
                "offset": 0
            }
        },
        "extra_data": null,
        "start_date": "2017-09-17",
        "end_date": "2018-10-17"
    }
}

错误响应

                                
{
    "timestamp": "2018-10-22 15:06:04",
    "message": "End date should be later than start date.",
    "code": 1000
}
{
    "timestamp": "2018-10-22 15:27:17",
    "message": "Start date should not be earlier than 30 days ago.",
    "code": 1000
}