oTMS logo 开放平台
Documentation Help

收货方/发货方导出

通过收货方/发货方导出,客户系统接入 oTMS 系统,查询 oTMS 收发货方信息和状态。

版本号 文档 说明
0.1 当前版本文档

配置说明

oTMS同时在生产环境和测试环境中提供Web Service接口,其中测试环境用于集成测试。两种环境下都需要由oTMS系统管理员分配API帐号密码后方可使用。

注意: 请合理地调用公共接口。如果发现存在异常调用或者对我们系统性能造成影响等情况,会对API账号的调用进行限制,甚至停用。

目前对该接口的调用限制为每个公司每秒最多个请求

接口说明

公共参数

环境 HTTP请求方法 HTTPS请求地址 请求主体MIME类型 响应主体MIME类型
正式环境 POST https://login.otms.cn/ws/shipPointOutbound application/xml application/xml
沙箱环境 POST https://demo.otms.cn/ws/shipPointOutbound application/xml application/xml

请求参数

字段名 位置 是否必填 描述 Schema
Authorization header Basic Authorization。如果不为空,则优先使用该值作身份认证。否则使用请求报文中的用户名与密码 string
body body 收发货方查询请求。包含用以筛选收发货方的查询条件 ShipPointOutboundRequest

响应参数

状态码 描述 响应模型
200 successful operation ShipPointOutboundResponse

详细描述

In

字段名 类型 是否必填 描述 示例
value array[string] 属性值

Queries

字段名 类型 是否必填 描述 示例
query array[ShipPointQuery] 查询条件。多个查询条件以逻辑‘与’的方式连接。

ShipPoint

字段名 类型 是否必填 描述 示例
name string 该收/发货点的公司名
externalId string 该收/发货点的外部代码。该字段可以在oTMS的基础数据模块中维护
province string 省份名
town string 城市名
county string 区/县名
address string 该收/发货点的地址
zipcode string 邮编
contactName string 联系人的姓名
contactMobile string 联系人的手机
contactPhone string 联系人的电话
contactEmail string 联系人的邮箱
longitude number (double) 经度
latitude number (double) 纬度
locationType integer (int32) 发货方:0,收货方:1

ShipPointOutboundRequest

字段名 类型 是否必填 描述 示例
version string 请求的版本号
login string 用户名。用于 API 调用者身份认证。如果请求头中的Authorization不为空,则该值会被忽略。
password string 密码。用于 API 调用者身份认证。如果请求头中的Authorization不为空,则该值会被忽略。
queries Queries 用以筛选收发货方的查询条件
start integer (int32) 返回订单的起始索引,最小为1。默认值是1。
count integer (int32) 返回的最大收发货点数量。默认值是100。

ShipPointOutboundResponse

字段名 类型 是否必填 描述 示例
shipPoints ShipPoints 返回基础数据收发货方列表
start integer (int32) 返回收发货方的起始索引
count integer (int32) 实际返回的收发货方数量
total integer (int32) 该次查询中筛选出的所有收发货方的数量

ShipPointQuery

字段名 类型 是否必填 描述 示例
attribute string 查询条件的属性名。可以取下列值:
externalId - 收发货方外部代码
locationType - 基础数据类型:收货方,发货方
startDate - 查询增量数据的开始时间
endDate - 查询增量数据的结束时间
eq string 属性值等于该值
ge string 属性值大于或等于该值
le string 属性值小于或等于该值
lk string 属性值模糊匹配该值。不支持日期/时间类型的属性
in In 属性值包含于该列表中。不支持日期/时间类型的属性

ShipPoints

字段名 类型 是否必填 描述 示例
shipPoint array[ShipPoint] 收发货方信息

报文示例

请求示例

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shipPointOutboundRequest version="0.1" login="userName" password="password">
    <queries>
        <query>
            <attribute>updatedOn</attribute>
            <le>2018-01-01</le>
            <ge>2017-01-01</ge>
        </query>
        <query>
            <attribute>externalId</attribute>
            <in>
                <value>111</value>
                <value>222</value>
            </in>
        </query>
        <query>
            <attribute>locationType</attribute>
            <eq>0</eq>
        </query>
    </queries>
    <start>1</start>
    <count>10</count>
</shipPointOutboundRequest>

响应示例

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shipPointOutboundResponse>
    <shipPoints>
        <shipPoint>
            <name>Calvin</name>
            <province>河南省</province>
            <address>西华县迟营乡街道</address>
            <contactName>Calvin</contactName>
            <contactMobile>18666666666</contactMobile>
            <contactPhone>null-null</contactPhone>
            <longitude>114.5351355707259</longitude>
            <latitude>33.75685452141119</latitude>
            <locationType>0</locationType>
        </shipPoint>
        <shipPoint>
            <name>Calvin</name>
            <province>上海市</province>
            <address>浦东新区峨山路91弄100号</address>
            <contactName>Calvin</contactName>
            <contactMobile>18666666666</contactMobile>
            <contactPhone>null-null</contactPhone>
            <longitude>121.53990544590607</longitude>
            <latitude>31.22166237986258</latitude>
            <locationType>0</locationType>
        </shipPoint>
    </shipPoints>
    <start>1</start>
    <count>10</count>
    <total>2</total>
</shipPointOutboundResponse>

错误码解释

全局反馈代码

反馈代码 说明
0客户验证失败。
1不支持的请求版本。
2请求中的提送货点数据过多。

单个请求反馈代码

反馈代码 说明

API工具