更改交易的收货地址

只能更新一笔交易里面的买家收货地址
只能更新发货前(即买家已付款,等待卖家发货状态)的交易的买家收货地址
更新后的发货地址可以通过taobao.trade.fullinfo.get查到
参数中所说的字节为GBK编码的(英文和数字占1字节,中文占2字节)

1.请求参数:

请求URL:

POST https://kf.fw199.com/gateway/taobao/order/shippingaddress/update

参数名 类型 必须 示例值 说明
appid String true uwkahf@jfs92 合作伙伴AppId
timestamp String true 1633618722 当前时间戳
tb_seller_nick String true kingdo 淘宝卖家店铺登录账号,非店铺名称
sign String true 999de41d862efaa6f1084ead3b3ba480 如何计算生成见示例代码
tid Number true 123456789 交易编号。
receiver_name String false 马云 收货人全名。最大长度为50个字节。
receiver_phone String false 123456789 固定电话。最大长度为30个字节。
receiver_mobile String false 13600000000 移动电话。最大长度为11个字节。
receiver_state String false 浙江 省份。最大长度为32个字节。如:浙江
receiver_city String false 杭州 城市。最大长度为32个字节。如:杭州
receiver_district String false 西湖区 区/县。最大长度为32个字节。如:西湖区
receiver_address String false xx路xx号 收货地址。最大长度为228个字节。
receiver_zip String false 310001 邮政编码。必须由6个数字组成。
receiver_town String false 五常街道 四级地址。最大长度为32个字节。如:五常街道

2. 请求示例代码(Java)

    @Test
    public void  TaoBaoOrderShippingAddressUpdate() throws Exception {

        String tb_seller_nick = Config.TBSellerNick ;
        //业务参数
        Map<String, String> data = new HashMap<String, String>();
        data.put("appid",  Config.AppId);
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        data.put("tb_seller_nick", Config.TBSellerNick);
        data.put("tid", "2145482892651565830");
        data.put("receiver_name", "习大牛");
        data.put("receiver_mobile", "13817778899"); 
        // 签名
        data.put("sign", Utils.Sign(data,Config.AppSecret));
        // 调用服务API
        doHttpRequest(Config.TaoBaoOrderShippingAddressUpdateUrl ,data);

    }

3. 返回结果

返回结果如下

{
    "code":0,
    "message":"ok",
    "data":{
        "request_id":"h26zqqddmyhz",
        "trade":{
            "modified":"2021-10-09 11:48:10",
            "tid":"2145482892651565830"
        }
    },
    "trace_id":""
}

说明: code为0表示成功,非0为失败,message会包含失败原因。

文档更新时间: 2023-03-14 16:30   作者:admin