获取店铺信息

生成授权链接,商家点击跳去授权时, 开始使用本接口检测商家是否授权 , 授权以后,会返回获取店铺授权信息。

这个接口,一般是商家跳去授权的时候, 开始轮询用这个接口,判断商家授权是否完成.

  1. 如果本接口返回成功了,就停止轮询.
  2. 如果超过一定时间,比如3分钟,还没有返回, 也停止轮询了, 界面上提示商家,授权超时.

1.请求参数:

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

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

2. 请求示例代码(Java)

 @Test
    public void getShopInfo() 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", "101");
        data.put("state_id", "abc1322232200"); 
        // 参数签名
        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": {
        "sys_id": "101",
        "seller_nick": "xxxxx",
        "dead_line": "2025-10-05 00:00:00",
        "state_id": "888777",
        "shop_name": "xx店"
    },
    "trace_id": ""
}

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

文档更新时间: 2026-09-14 16:52   作者:admin