获取店铺信息

通过授权链接授权以后,获取店铺信息。

1.请求参数:

POST https://kf.fw199.com/gateway/partner/getshopinfo

参数名 类型 说明 示例
appid String 合作伙伴AppId uwkahf@jfs92
timestamp String 当前时间戳
sign String 接口签名 如何计算生成见示例代码
sysid String 必填, 应用ID ,300或301, 必填,不清楚咨询客服
state_id String 必填, 与先前授权链接中的参数一样

2. 请求示例代码(Java)

 @Test
    public void getOrderList() throws Exception {

      String url ="https://kf.fw199.com/gateway/partner/getshopinfo";
        CloseableHttpClient httpclient = HttpClients.createDefault();
        HttpPost httpPost = new HttpPost( url );
        //业务参数
        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("sysid", "300");
        data.put("state_id", "abc100"); 
        // 参数签名
        data.put("sign", Utils.Sign(data,Config.AppSecret));

        List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
        for (Map.Entry<String, String> entry : data.entrySet()) {
            params.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
        }
        //发起POST请求
        try {
            httpPost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
            HttpResponse httpResponse = httpclient.execute(httpPost);
            if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                result =  EntityUtils.toString(httpResponse.getEntity());
            } else {
                result =  ("doPost Error Response: " + httpResponse.getStatusLine().toString());
            }
        } catch (Exception e) {
            e.printStackTrace();

        }

        System.out.println(result);

3. 返回结果如下:

{
    "code": 0,
    "message": "ok",
    "data": {
        "dead_line": "2025-07-10 19:34:22",
        "seller_nick": "pdd7571232322",
        "shop_name": "我的是测试店",
        "sys_id": "300",
        "token": "517f6a09ee7c7aafb66fa41e0cc868e1",
        "user_id": "757127720"
    },
    "trace_id": ""
}

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

文档更新时间: 2025-07-07 15:44   作者:admin