wiki:pcauto_4.6.0/interface

Version 28 (modified by wuhuixuan, 11 years ago) (diff)

--

1.基本约定


web开发机代理:192.168.10.199 端口为 1080
接口通用参数
req_enc=utf-8(必须放url后面)
resp_enc=utf-8(必须放url后面)
common_session_id=xxxx(以cookies中的优先)
接口URL: 接口URL

参数名类型必须说明

说明文档参数:添加某特定参数可以直接看接口文档
是否需要登录:是|否
返回格式:json|xml|ssi,
缓存方式:接口缓存(接口中返回的响应头里面的 Cache-Control),对象缓存()
缓存时间:缓存时间
返回结果:结果可能情况

2.接口列表

2.1 资讯

2.1.1 文章收藏批量操作

请求url:
后端地址:
请求方式:
是否需要登录:是
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
请求参数:

参数名类型必须说明


返回结果:

2.1.2 获取账号的收藏文章

请求url:
后端地址:
请求方式:
是否需要登录:是
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
请求参数:

参数名类型必须说明


返回结果:

3.1 找车

3.1.1 车系车型图片筛选条件

请求url:http://mrobot.pcauto.com.cn/v2/price/pictureConditions?serialId=7889&modelId=0&colorId=0&typeId=0&v=4.5.0
后端地址:
请求方式:GET
是否需要登录:否
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
请求参数:

参数名类型必须说明
serialIdstring必须车系id
modelIdstring可选车型id,查车系的时候不用传
colorIdstring可选颜色id,查全部颜色的时候不用传
typeIdstring可选类型id,查全部类型得时候不用传
vstring必须v=4.5.0 4.5版本增加类型细化,颜色值


返回结果:

{
  colors: [
    {
      count: "479",
      id: "44908",
      isMetal: "0",
      name: "平安白",
      value: "(245,245,245)"
    }
  ],
  models: [
    {
      count: "91",
      id: "34205",
      name: "2015款 1.4 手动 舒适版"
    }
  ],
  types: [
    {
      id: "1",
      name: "外观",
      section: [
        {
          id: "1",
          name: "全部"
        }
      ]
    }
  ]
}


3.1.2 车型综述页

请求url:
说明:

客户端4.5版本的请求url:http://mrobot.pcauto.com.cn/v3/price/modelsv45/${modelId}?areaId=1&modelIds=modelIds=28350,32262
客户端4.6新增一个跳转协议,为了不影响4.5版本使用,4.6需要使用新版本接口


新增协议如下:
点击竞争车型协议pcautobrowser://model/30499?serialId=(车系id) 30499为车型id

3.1.3 热门品牌

(接口已完成上线,品牌可从madmin.pconline.com.cn的管理配置pcauto_hot_brands中修改)
请求url:http://mrobot.pcauto.com.cn/configs/pcauto_hot_brands
后端地址:无
请求方式:get
是否需要登录:否
返回格式:JSON
缓存方式:无
缓存时间:0
请求参数:

参数名类型必须说明


返回结果:

"brands": [
  {
    "id": 2,
    "letter": "D",
    "logo": "http://www1.pcauto.com.cn/piclib/2.png",
    "name": "大众"
  },
  {
    "id": 10,
    "letter": "F",
    "logo": "http://www1.pcauto.com.cn/piclib/10.png",
    "name": "丰田"
  },
  ……
]

3.1.4 条件筛选增加产地


说明:找车条件筛选新增产地这个选项
请求url:

(1)http://mrobot.pcauto.com.cn/buy/price/chooseOption
(2)http://mrobot.pcauto.com.cn/buy/price/search
(3)http://mrobot.pcauto.com.cn/v3/price/search


后端地址:
请求方式:
是否需要登录:是
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
请求参数:

参数名类型必须说明


返回结果:

4.1 个人中心

4.1.1 获取系统消息

(接口已完成,测试请连web开发机代理)
说明:需要新版本接口,因为4.5要过滤a标签,4.6不需要过滤
原请求url:http://mrobot.pcauto.com.cn/v3/bbs/getSysNotice?status=-1&pageSize=20&pageNo=1&common_session_id=DA4C99E3FDF2FDE541D7A9319891798C2DD2AFCE4E6EEB28
后端地址: http://bip.pcauto.com.cn/intf/sysnotice.jsp
请求方式:GET
是否需要登录:是
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
请求参数:

参数名类型必须说明
statusstring必须-1为已读和未读,0表示未读,1表示已读
common_session_idstring必须 登录session
vstring可选 4.6.0表示4.6版本,不过滤<a>标签
pageNostring可选页码
pageSizestring可选一页条数,默认20,最大500


返回结果:

{
  pageCount: 1,
  pageNo: 1,
  pageSize: 20,
  resultList: [
    {
      accountId: 33375426,
      content: "年底抢楼送大奖,说出对新年愿望祝福——送儿童安全座椅、投影机、行车记录仪、京东购物卡、移动电源!!!http://bbs.pcauto.com.cn/topic-5955076.html",
      createTime: 1417500858000,
      groupSend: 1,
      groupType: 0,
      id: 124624885,
      senderId: 0,
      siteId: 2,
      status: 1,
      type: {
        groupType: 1,
        id: 0,
        name: "系统消息",
        siteId: 0,
        templateId: 0
      },
      typeId: 41
    }
  ],
  total: 13
}


content字段的跳转内容加上html标签,客户端做识别和跳转

5.1 优惠

5.1.1 优惠降价列表

(接口开发完成已上线)
请求url:http://mrobot.pcauto.com.cn/v3/price/promotionList?areaId=1&pageNo=1&pageSize=20&orderBy=discountRange
HTTP请求方式:GET
是否需要登录:false
返回格式:JSON
缓存方式:接口缓存
缓存时间:60分钟
说明:增加价格区间和级别的筛选条件
请求参数:

参数名类型必须说明
areaIdstring必须地区id
brandIdstring可选品牌id
serialIdstring可选车系id
modelIdstring可选车型id
orderBystring必须popularity, newest, discountRange, lowestPrice;分别指按车型热度,按最新,按降价幅度,按最低价格
psstring可选最低价格,如13,单位万元
pestring可选最高价格,单位万元
jbstring可选级别,如71


返回结果:

{
  "data": [
    {
      "area": "广州",
      "createTime": 1406602096000,
      "dealerId": "45742",
      "dealerName": "进口大众广州鸿众",
      "dealerNewsId": "5154551",
      "dealerType": "综合店",
      "decline": "35.0",
      "discount": "163400",
      "image": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1308/01/c8/24016521_1375350331166_350x260.jpg",
      "is400": "1",
      "isShow24Icon": 1,
      "modelId": "32583",
      "modelName": "高尔夫(进口) 2014款 2.0 TSI R敞篷版",
      "modelPrice": "46.68",
      "phone": "400-860-0819",
      "price": "30.34",
      "serialGroupId": 4391,
      "serialGroupName": "高尔夫(进口)"
    }
  ],
  "pageNo": 1,
  "pageSize": 20,
  "total": 6559
}

3.车型库+商城优化的接口列表

3.1 索引表


mrobot请求url:
原接口:
HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.2 车系综述页


mrobot请求url:http://mrobot.pcauto.com.cn/v3/price/serialv45/4665?rid=1013
原接口:

http://price.pcauto.com.cn/interface/iphone/model_list_v3.jsp?serialId=4665
http://price.pcauto.com.cn/interface/iphone/serial_group_compete.jsp?serialGroupId=4665
http://price.pcauto.com.cn/interface/iphone/get_serialGroup_dealerCount.jsp?serialGroupId=4665&rid=4
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_list_by_sg_json.jsp?regionId=1&serialId=933&callback=list


HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.3 车型综述页


mrobot请求url:  http://mrobot.pcauto.com.cn/v3/price/modelsv45/20208?areaId=117
原接口:

http://price.pcauto.com.cn/interface/iphone/model_detail.jsp?mid=9398
http://price.pcauto.com.cn/interface/iphone/dealer_page_list.jsp?modelId=20208&areaId=117
http://price.pcauto.com.cn/interface/iphone/model_compete.jsp?mid=20208
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_list_by_sg_json.jsp?regionId=1&serialId=933&callback=list


HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.4 车系车型优惠列表


mrobot请求url:  http://mrobot.pcauto.com.cn/v3/price/promotionList?areaId=1&pageNo=1&pageSize=20&orderBy=discountRange&serialId=3225
原接口: http://price.pcauto.com.cn/dealer/interface/app/market_json.jsp
HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.5 促销优惠终端页


mrobot请求url:  http://mrobot.pcauto.com.cn/v3/price/promotionDetailv45/6874084?type=0&modelId=23170
原接口: http://price.pcauto.com.cn/dealer/interface/app/dealer_market_json.jsp
HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.6 活动列表


mrobot请求url:  http://mrobot.pcauto.com.cn/v3/price/activityListv45/1?pageNo=1&pageSize=20
原接口: http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_list_json.jsp?regionId=1
HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.7 活动详情页


mrobot请求url:

http://mrobot.pcauto.com.cn/v3/price/activityDetailv45/552?areaId=1&serialId=0&modelId=0&name=&tel=&dId=d5d5ceb98978c614d82e578320e1fce6c0e2bea9


原接口:

http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_detail_json.jsp
http://price.pcauto.com.cn/dealer/interface/tuangou/dealer_serialgroup_photo_json.jsp
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_models_json.jsp
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_dealers_json.jsp
http://price.pcauto.com.cn/interface/cms/region_400_json.jsp


HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

3.8 车系经销商


mrobot请求url: {{{  http://mrobot.pcauto.com.cn/v3/price/dealersSerialv45?serialId=3225&areaId=1 }}}
原接口:{{{  http://price.pcauto.com.cn/interface/iphone/dealer_page_list.jsp?serialId=3544&areaId=1&pageNo=1&pageSize=20&dealerType=1 }}}
HTTP请求方式:
是否需要登录:false
返回格式:
缓存方式:
缓存时间:
说明:
请求参数:

参数名类型必须说明


返回结果:

Attachments