wiki:pcauto_BuyAuto_1.3.0

Version 54 (modified by wuxiaoling, 11 years ago) (diff)

--

1.基本约定

接口通用参数
req_enc=utf-8(必须放url后面)
resp_enc=utf-8(必须放url后面)
common_session_id=xxxx(以cookies中的优先)

接口URL: 接口URL
必填参数:参数名=xxx(多种情况用括号解析)
非必填参数:参数名=xxx(多种情况用括号解析)
说明文档参数:添加某特定参数可以直接看接口文档
是否需要登录:是,否
返回格式:json,ssi,xml
缓存方式:接口缓存(接口中返回的响应头里面的 Cache-Control),对象缓存()
缓存时间:缓存时间
返回结果:结果可能情况


代理环境说明:
192.168.10.198 端口为 1080 连的是v80的测试环境(192.168.74.80)
192.168.10.199 端口为 1080 连的是dev40的开发环境(192.168.75.40)

接口列表

1.历史记录

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/listMinModelPrice.xsp?modelIds=33313,33314,33315&areaId=1

后端接口

 http://price.pcauto.com.cn:8001/interface/iphone/atom/dealer/list_min_model_price_json.jsp?vs=1.3&rId=1&mIds=33313,33314,33315 本地最底价  http://price.pcauto.com.cn/interface/iphone/atom/price/model_basic_json.jsp?vs=1.3&mIds=33313,33314,33315 官方价

说明

areaId不传的情况下默认为1

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
modelIds车型String
areaId地区Idint1

返回

 {
    "models": [
        {
            "mId": 33314,
            "minPrice": 28.3,
            "markDown": 4.99
        },
        {
            "mId": 33315,
            "minPrice": 31.32,
            "markDown": 5.96
        },
        {
            "mId": 33313,
            "minPrice": 26.59,
            "markDown": 4.69
        }
    ],
    "code": 1
}

2.车系列表

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/getSerialListByBrandId.xsp?brandId=1&type=1

后端接口

 http://price.pcauto.com.cn/interface/iphone/serialGroup_list_v2.jsp?vs=1.3&bid=1&type=1 车系列表数据
 http://price.pcauto.com.cn/interface/iphone/atom/price/hot_model_list_json.jsp?vs=1.3&brandId=1 本地热门车型最低价

说明

本地热门车型最低价新加的接口,serials字段下count=0表该车系下无车型,若没有mId则表示没有该热门车型,此时我要询价不可选。

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
brandId品牌int 1
typeId类型Idint1

返回

  {
   "manufacturers":[{
        "brandName": "奥迪",
        "name": "测试的",
        "brandIntroduction": "http://baike.pcauto.com.cn/204.html",
        "serials": []
    },
    {
        "brandName": "奥迪",
        "name": "一汽奥迪",
        "brandIntroduction": "http://baike.pcauto.com.cn/204.html",
        "serials": [
            {
                "id": 3524,
                "name": "奥迪A4L",
                "kind": "中型车",
                "priceRange": "27.28~57.81 万",
                "isNew": 0,
                "sellStatus": 3,
                "carVersion": 1,
                "carField": 4,
                "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1408/11/c1/37285606_37285606_1407725980801_180x135.jpg",
                "count": 43,
                "mId": 30822,
                "mName":"车型名称",
                "mPhoto":"车型图片"
            } .....
   ]
   } 

3.发起投票

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/buy/price/vote/initiateVote

说明

发起投票接口

提交方式

POST

参数

参数名 参数含义 类型 默认值 是否必须
param投票json数据json

请求参数格式

  {
    “deviceId”: ”设备唯一标识”,
    “text”: ”帮我选车吧”,
    “validTime”: 3,
    “cars”: [
        {
            “serialId”: 4313,
            “areaId”: 12,
            “name”: ”奥迪A4L”,
            “image”: ”图片url”,
            “price”: ”¥27~30万”
        },
        {
            “serialId”: 4313,
            “areaId”: 12,
            “name”: ”奥迪A4L”,
            “image”: ”图片url”,
            “price”: ”¥27~30万”
        }
    ]
}

字段说明

参数名 参数含义
deviceId设备唯一标识
text投票文案
validTime有效时间,单位(天),一周7天,一个月30天,三个月90天
cars车系列表,json数组
serialId车系id
areaId投票发起人所在区域id
name车系名称
image车系图片的url
price车系价格

返回值 返回结果:

{
“code”:200,
“msg”:”投票成功”,
“voteId”:”123,
}

返回码 200- 投票成功
405- 需要使用POST请求
400- 请求参数有误
500 - 系统错误

4.投票列表

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/buy/price/vote/getVotes?deviceId={deviceId}
样例: http://mrobot.pcauto.com.cn/buy/price/vote/getVotes?deviceId=4e668331ec9d3275a7da459f6748a76d

说明

查询投票列表接口

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
deviceId设备唯一标识int

返回结果格式

  {
    "votes": [
        {
            "cars": [
                {
                    "areaId": 12,
                    "image": "url",
                    "name": "奥迪 A4L",
                    "price": "¥27~30万",
                    "serialId": 4313
                }
            ],
            "status": 0,
            "validTime": {
                “start”: ”2015-05-30”,
                “end”: ”2015-06-30”
            },
            "voterCount": 8,
            “id”: 3241
        }
    ],
    “code”: 200,
    “msg”: ”成功”
}

字段说明

参数名 参数含义
votes投票列表,json对象
cars车系列表,json对象
serialId车系id
areaId投票发起人所在区域id
name车系名称
image车系图片的url
price车系价格
status投票状态,0:进行中,1:关闭,2:结束
validTime有效时间,json对象
start开始时间,字符串
end结束时间,字符串
id投票唯一标识
code响应码
msg响应信息

返回码 405- 需要使用GET请求
400- 请求参数有误
500 - 系统错误

5.更新投票状态

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/buy/price/vote/operateVote/{voteId}?opId={opId}
样例: http://mrobot.pcauto.com.cn/buy/price/vote/operateVote/2141?opId=1

说明

关闭,删除投票接口

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
voteId投票唯一标识int
opId操作标识,1:关闭,3:删除int

返回结果格式

  {
“code”:200,
“msg”:”成功”
}

返回码
200- 成功
405- 需要使用GET请求
400- 请求参数有误
500 - 系统错误

6.图片终端页

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/pictures.xsp?serialGroupId=4457&pageSize=60&pageNo=1&typeId=1&modelId=36339&colorId=0
后端接口

 http://price.pcauto.com.cn/interface/iphone/photo_page_list.jsp?vs=1.3&typeId=1&pageNo=1&pageSize=20&modelId=36339&serialGroupId=4457&cateId=1&colorId=0基础数据  http://price.pcauto.com.cn/interface/iphone/atom/price/model_basic_json.jsp?vs=1.3&mIds=36339 官方价

说明

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
typeId类型Idint1
pageNo第几页int1
pageSize分页个数int6
serialGroupId车系Idint0
modelId车型Idint0
cateId种类Idint0
colorId颜色Idint0

返回

 {
    "total": 37,
    "pageNo": 1,
    "pageSize": 2,
    "pageCount": 19,
    "title": "外观",
    "data": [
        {
            "modelId": "36339",
            "modelName": "奥迪Q5 2015款 40 TFSI 技术型 ",
            "bigPath": "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487751874_400x300.jpg",
            "smallPath": "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487751874_120x90.jpg",
            "gfPrice": "43.16"
        },
        {
            "modelId": "36339",
            "modelName": "奥迪Q5 2015款 40 TFSI 技术型 ",
            "bigPath": "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487754873_400x300.jpg",
            "smallPath": "http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/25/c1/1097875_1097875_1419487754873_120x90.jpg",
            "gfPrice": "43.16"
        }
    ]
}

7.投票详情

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/buy/price/vote/detailVote/{voteId}
样例: http://mrobot.pcauto.com.cn/buy/price/vote/detailVote/1232[[BR]]

说明

查询投票详细信息接口

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
voteId投票idint

返回结果格式

  {
    "code": 200,
    "msg": "成功",
    "vote": {
        "cars": [
            {
                "areaId": 12,
                "image": "url",
                "name": "奥迪 A4L",
                "price": "¥27~30万",
                "serialId": 4313,
                "ticketCount": 1,
                "percent": 100
            }
        ],
        "id": 1,
        "status": 0,
        "text":'快帮我选车!',
        "tickets": [
            {
                "name": "name",
                "reason": "reason",
                "time": "06-02",
                "picUrl": "url",
                "voter": "voter"
            }
        ],
        "validTime": {
            "end": "2015-06-05",
            "start": "2015-06-02"
        },
        "voteCount": 1
    }
}

字段说明

参数名 参数含义
votes投票列表,json对象
cars车系列表,json对象
serialId车系id
areaId投票发起人所在区域id
name车系名称
image车系图片的url
price车系价格
ticketCount车系得票数
percent车系得票百分数,整数
tickets选票信息,json对象
voter投票人名称
time投票日期
name车系名
reason投票原因
picUrl投票人头像url
status投票状态,0:进行中,1:关闭,2:结束
text投票文案
voteCount总投票次数
validTime有效时间,json对象
start开始时间,字符串
end结束时间,字符串
id投票唯一标识
code响应码
msg响应信息

返回码 405- 需要使用GET请求
400- 请求参数有误
500 - 系统错误

8.车系综述

(mrobot开发已完成,请连开发机进行测试)

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/serial.xsp?v=1.1.0&areaId=3&isSubscribed=0&serialId=4313&modelIds=

后端接口

http://price.pcauto.com.cn/interface/iphone/atom/price/serial_group_basic_json.jsp?serialGroupId=4313  //车系概述基本数据
http://price.pcauto.com.cn/interface/iphone/atom/price/model_list_by_sg_json.jsp?serialGroupId=4313     //车系概述最低价接口
http://price.pcauto.com.cn/interface/iphone/serial_group_compete.jsp?serialGroupId=4313&size=3          //车系对比
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_list_by_sg_json.jsp?regionId=3&serialId=4313  //判断是否有团购
http://price.pcauto.com.cn/interface/iphone/atom/dealer/model_list_news_price_json.jsp?serialGroupId4313&rId=3    //车系概述列表接口
http://price.pcauto.com.cn/interface/iphone/get_lower_modelPrice.jsp?rid=3&sid=4313)             //获取本地最低价
http://price.pcauto.com.cn/interface/cms/region_400_json.jsp?rid=3)             //获取400电话
http://price.pcauto.com.cn/dealer/interface/app/market_groupby_model_json.jsp?vs=1.3&areaId=1&isSubscribed=1&modelId=33393 //通过modelId去取对应的经销商的列表及基础数据


原mrobot接口:http://mrobot.pcauto.com.cn/buy/price/serial/4313?v=1.1.0&areaId=3&isSubscribed=0&modelIds=;
HTTP请求方式:get
是否需要登录:false
返回格式: html
缓存方式:
缓存时间:60
说明:
请求参数:

参数名类型必须说明
areaIdintY地区ID
serialIdintY车系id
isSubscribedintN是否订阅
modelIdintN车型ID

页面内数据说明:在返回的页面里添加了注释数据/*@_HTML_META_START_(数据部分)_HTML_META_END_@*/ 数据内容为:

{
        "kind": "中型车",
        "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1408/11/c1/37285606_37285606_1407725980801_400x300.jpg",
        "priceRange": "27.28~57.81万",
        "cars": [{
                "title": " 1.8T 涡轮增压 160马力",
                "data": [{
                        "id": "33318",
                        "title": "2015款 1.8 30TFSI 手动舒适型",
                        "price": "27.28",
                        "config": "6挡手动 前置前驱 ",
                        "state": "在售",
                        "status": "在售",
                        "isNews": "0",
                        "rjBzzw": 5,
                        "introduce": 0,
                        "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1409/17/c6/38686815_38686815_1410941571968_120x90.jpg",
                        "minPrice": "23.77",
                        "paiLiang": "1.8",
                        "jqx": 950,
                        "glassPercent": 0.0019,
                        "compared": "",
                        "result": {
                                "shoufu": 7.13,
                                "loan": 170000,
                                "monthPay": 0.52,
                                "firstPayTotal": 9.87,
                                "loantotal": 28.7,
                                "total": 26.87
                        }
                
                }]
        },
        {
                "title": " 2.0T 涡轮增压 224马力",
                "data": [{
                        "id": "33319",
                        "title": "2015款 2.0 45TFSI quattro个性运动版",
                        "price": "35.3",
                        "config": "7挡双离合 前置四驱 托森式差速",
                        "state": "在售",
                        "status": "在售",
                        "isNews": "0",
                        "rjBzzw": 5,
                        "introduce": 0,
                        "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1410/22/c6/39977239_39977239_1413950602832_120x90.jpg",
                        "minPrice": "31.42",
                        "paiLiang": "2.0",
                        "jqx": 950,
                        "glassPercent": 0.0019,
                        "compared": "",
                        "result": {
                                "shoufu": 9.43,
                                "loan": 220000,
                                "monthPay": 0.68,
                                "firstPayTotal": 13.41,
                                "loantotal": 37.77,
                                "total": 35.41
                        }
                }
                ]
        }]
}
 协议说明:
 订阅: pcautobuy://addSubscribed/?serialId={{serialId}}&serialName={{serialName}}    取消订阅:pcautobuy://deleteSubscribed/?serialId={{serialId}}&serialName={{serialGroupName}}
 对比:pcaction://compare/?modelId={{id}}&modelName={{title}}&image={{photo}}  取消对比:pcaction://decompare/?modelId={{id}}&modelName={{title}}&image={{photo}}
 去团购:pcautobuy://model-activity-detail/?activityId={{activityId}}&areaId={{areaId}} 求组团:pcautobuy://serial-activity-initiate/?serialId={{serialId}}&serialName={{serialGroupName}}
 询底价:pcautobuy://auto-ask-price/?areaId={{areaId}}&dealerId=0&serialId={{serialId}}&modelId={{modelId}}&modelName={{modelName}}&image={{image}}&isMain=1
 去购车计算:pcautobuy://auto-calculator/{{id}}?modelName={{title}}&price={{minPrice}}&paiLiang={{paiLiang}}&rjBzzw={{rjBzzw}}&introduce={{introduce}}
 400电话咨询:pcaction://webview_tel/{{phone}}?name={{name}}
 我要优惠:pcautobuy://auto-get-promotion/?areaId={{param.areaId}}&dealerId={{dealerId}}&serialId={{../serialId}}&modelId={{../id}}&modelName={{../title}}&image={{../photo}}&isMain=1
 点击车型跳转:pcautobuy://model/?modelId={{id}}&modelName={{title}}&areaId={{areaId}}

9.我要砍价

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/bargain.xsp?areaId=1&modelId=33313&appKey=4f4277c7a1428d2000000483&devId=5cf2e2a4a81f2292f6537c3eedbe681e082b4902&chId=app_store&referer=sg_sum

后端接口

 http://price.pcauto.com.cn/dealer/interface/order/order_info.jsp?m=getCountBySG&sgId=3524
车型基础信息  http://price.pcauto.com.cn/interface/iphone/atom/dealer/get_bargain_json.jsp?mId=33313 砍价基础信息 post我要砍价提交接口: http://price.pcauto.com.cn/dealer/action/do_comm_order_2013.jsp

说明

本地热门车型最低价新加的接口

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
modelId车型int
areaId地区Idint1
appKeyappKeyint1
devId设备Idint1
chId设备类型int1
referer备注int1

10.车型综述

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/model.xsp?modelId=3462&v=1.1.0&areaId=2&isCompared=0&isSubscribed=0}}}

后端接口

http://price.pcauto.com.cn/interface/iphone/atom/price/model_overview.jsp?mid=34626 车型基本信息
http://price.pcauto.com.cn/interface/iphone/atom/price/model_params.jsp?mid=34626 参数信息
http://price.pcauto.com.cn/interface/iphone/atom/price/model_calculator_basic_json.jsp?mIds=34626 基础数据如排量等
http://price.pcauto.com.cn/interface/iphone/dealer_page_list_json.jsp?modelId="+modelId+"&rId="+areaId+"&pageNo=1&pageSize=1000 经销商信息
http://price.pcauto.com.cn/interface/iphone/get_lower_modelPrice.jsp?mid=" + modelId + "&rid=" + areaId 车型本地最低价
http://mall.pcauto.com.cn/autoMall/interface/auto_mall_gct_list_by_sg_json.jsp?regionId=1&serialId=4313车系下是否有团购信息

[BR]原mrobot接口:http://mrobot.pcauto.com.cn/buy/price/model/34626?pageSize=20&pageNo=1;
HTTP请求方式:get
是否需要登录:false
返回格式:html
缓存方式:
缓存时间:60
说明:
请求参数:

参数名类型必须说明
areaIdintN地区ID
modelIdintN车型ID
vstringN版本号
isComparedintN是否已比较
isSubscribedintN是否已订阅

11.点击投票提交接口

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/record.xsp

说明

点击投票后插入record表

提交方式

post

参数

参数名 参数含义 类型 默认值 是否必须
voter微信名string
openId微信Idstring
picUrl微信头像string
voteId投票Idint
serialId车系Idint
name车系名string
reason原因string

ps:reason是配置  http://mrobot.pconline.com.cn/configs/pcauto_buy_votes_reason 

的key+备注框里面的内容 eg:"reason1。我觉得挺适合我用的" 

返回

  成功:{code:1,"msg":"提交成功"}
  失败:{code:-1,"msg":"提交失败"}
 

12.投票结果页面

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/voteDetail_wx.xsp?voteId=18

说明

包括已关闭已结束已投票

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
voteId投票IDint 1

13.找车

 http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/chooseOption.xsp[[BR]]

说明

找车条件新接口,去掉安卓闪退的原因

提交方式

GET

参数

参数名 参数含义 类型 默认值 是否必须
{
    "choose": [
        {
            "name": "自定义最低价",
            "value": "ps",
            "options": []
        },....

    ]
}

14.车系终端微信页

参数说明在 http://trac.pc.com.cn/iphone/wiki/pcauto_BuyAuto_1.3.0#a8.车系综述,该微信页只需要在原url上加一个参数isWeiXin=1表微信端

说明

跳转我要询价调用新接口: http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/askprice_wx.xsp?areaId=1&dealerId=0&serialId=4457&chId=yingonghui&devId=dbaa5fbc440330039c2fe97fba7b0ece&referer=sg_sum 跳转我要优惠页调用新接口: http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.3/getPromotion_wx.xsp?v=1.1.0&modelId=35607&image=http://img.pcauto.com.cn/images/upload/upc/tx/auto5/1412/30/c0/1282648_1282648_1419907749179_120x90.jpg&modelName=%E9%94%90%E7%95%8C%202015%E6%AC%BE%202.0GTDi%20%E4%B8%A4%E9%A9%B1%E7%B2%BE%E9%94%90%E5%9E%8B%20&serialId=11607&areaId=1&dealerId=36406&name=Ruining&tel=13526678987&appKey=4f4277c7a1428d2000000483&chId=app_store&devId=5cf2e2a4a81f2292f6537c3eedbe681e082b4902&countDevId=020000000000&referer=discount 其他app协议的功能跳转变成提示

提交方式

GET

Attachments