wiki:pcauto_BuyAuto_1.2.0

Version 32 (modified by lanzhenhua, 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 连的是v36的测试环境(192.168.74.36)
192.168.10.199 端口为 1080 连的是dev40的开发环境(192.168.75.40)

接口列表

=======================================================功能优化==============================================

2.1 车型参配


mrobot请求url:http://mrobot.pcauto.com.cn/buy/price/modelDetail/{modelId}?areaId=1&fmt=json
现应用接口:

http://price.pcauto.com.cn/interface/iphone/atom/price/model_overview.jsp?mid={modelId} 基础数据
http://price.pcauto.com.cn/interface/iphone/atom/price/model_params.jsp?mid=34224 参数


原接口:

http://price.pcauto.com.cn/interface/iphone/model_detail.jsp?mid=34224


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

参数名类型必须说明
modelIdStringY车型ID
areaIdStringY地区id


返回结果:
{ "baseParameter": [

"厂商", "一汽奥迪", "级别", "中大型车", "上市时间", "2014-01", "发动机"...],

"gfPrice": "38.3万",

"groupNameArray": [

"询价订单", "价格", "基本参数", "车身", "发动机", "电动机", "变速箱", "底盘转向",

...

], "kind": "中大型车", "manufacturer": "一汽奥迪", "minPrice": "5.75万", "modelName": "奥迪A6L 2014款 2.0 TFSI 手动基本型", "price": "38.3", "serialGorup": "奥迪A6L", "serialGorupId": 4313, "shortName": "2.0 TFSI 手动基本型", "state": "在售", "total": "0", "url": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1208/21/c7/13077074_13077074_1345530200671_80x60.jpg", "url_120x90": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1208/21/c7/13077074_13077074_1345530200671_120x90.jpg", "url_400x300": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1208/21/c7/13077074_13077074_1345530200671_400x300.jpg", "groupNameArray":[ "询价订单", "价格", "基本参数", "车身", "发动机", "电动机"...], "gfprice":"38.3万", "brand":"奥迪", "detail":[ {

"groupDetail": [

"全国4S店", "0笔"

], "groupName": "询价订单"

}......]

}

2.2 我要优惠


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/getPromotion.xsp?v=1.1.0&modelId=20062&modelName=奥迪&serialId=4313&areaId=1&dealerId=65469&name=tt&tel=13588888888&appKey=34ca62060a1474350000052f&chId=app_store&devId=cb2039424107a8f6d3847fd390d81e60ba7ab516&referer=sg_discount


现应用接口:

http://price.pcauto.com.cn/dealer/interface/order/recommend_dealer.jsp?rid=" + areaId + "&sgid=" + serialId + "&type=0
http://mrobot.pcauto.com.cn/v3/price/provinceCityList城市数据


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

参数名类型必须说明
modelIdintY车型ID
modelNameintY车型名称
areaIdintY地区id
serialIdintY车系id
dealerIdintN经销商id
nameStringN提交名称
telStringN提交电话号码
appKeyStringN魔方appKey
chIdStringN设备类型
devIdintN设备ID
refererStringN备注
vStringN版本号

2.3优惠详情


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/promotionDetail.xsp?marketId=7033340&modelId=33314&areaId=1


现应用接口:

http://price.pcauto.com.cn/interface/iphone/atom/dealer/dealer_market_info_json.jsp?marketId={marketId}+&modelId={modelId}
http://price.pcauto.com.cn/interface/iphone/atom/dealer/dealer_market_model_json.jsp?marketId={marketId}


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

参数名类型必须说明
modelIdintY车型ID
marketIdintY优惠ID
areaIdintY地区ID

2.4 车型列表


mrobot请求url:http://mrobot.pcauto.com.cn/buy/price/getModelListBySerialId_v4_v12/{serialGroupId}?pageNo=1&pageSize=20&areaId=1


现应用接口:

http://price.pcauto.com.cn/interface/iphone/atom/price/serial_group_basic_json.jsp?serialGroupId=8670
http://price.pcauto.com.cn/interface/iphone/atom/price/model_list_by_sg_json.jsp?serialGroupId=8670
http://price.pcauto.com.cn/interface/iphone/atom/dealer/model_list_news_price_json.jsp?serialGroupId=8670&rId=1;

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

参数名类型必须说明
serialGroupIdintY车型ID
areaIdintY地区ID

[BR]返回结果: {

"advantage": "动力输出流畅,后段爆发力足,整体隔音优秀", "bbsId": "17365", "brand": "奥迪", "brandId": "1", "disadvatage": "后排腿部空间和头部空间较为局促", "displacement": "1.4T 2.0T", "gearbox": "手动 双离合", "kind": "紧凑型SUV", "manufacturer": "一汽奥迪", "manufacturerId": "1", "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1410/14/c4/39635392_39635392_1413256391078_120x90.jpg", "photoTotal": 2501, "photo_400x300": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1410/14/c4/39635392_39635392_1413256391078_400x300.jpg", "priceRange": "24.98~42.88万", "sections": [

{

"data": [

{

"config": "7挡双离合 前置前驱 ", "id": "33293", "introduce": 0, "isNews": "0", "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1404/28/c15/33660207_1398675582054_120x90.jpg", "price": "28.98", "rjBzzw": 5, "state": "在售", "status": "在售", "title": "2015款 35 TFSI 进取型"

}

], "serialGroupName": "奥迪Q3", "sgAverageScore": 4.33, "shareUrl": " http://price.pcauto.com.cn/sg8670/", "structure": "SUV"

}

2.5 优惠列表


PS:(加多了一个areaId参数,models里及里层的dealers里面添加totalPrice,giftPackage,modelType)


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/promotionList.xsp?areaId={}&pageNo=1&pageSize=20&sgId={serialId}&mfId={mfId}&modelId={modelId}


现应用接口:

http://price.pcauto.com.cn/dealer/interface/app/market_json.jsp 基础数据包含models,dealers
增加三个字段:totalPrice全款购车 giftPackage 礼包 modelType   //现车情况 amelistRange(// 销售范围,0:本市,1:本省,2:全国,3:售多市(用户自定义的,不作显示))出现非约定值

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

参数名类型必须说明
areaIdintY地区ID
modelIdintN车型ID
sgIdintN车系ID
mfIdintNmfId

[BR]返回结果: {

"models": [

{

"dealers": [

{

"address": "广州市白云区机场路888号广物汽贸(别克销售中心)", "areaName": "白云区", "dealerId": 15269, "dealerPrice": 26.99, "discount": 0, "discountPrice": 26.99, "giftPackage": {

"giftPackage": "", "giftPrice": "", "otherGift": ""

}, "totalPrice":"12.33", "is400": 1, "is4S": 1, "latitude": "23.192980475373542", "longitude": "113.26646061581265", "modelType": "接受预定", "name": "广东物资君豪别克", "namelistRange": 0, "newsId": 6577743, "phone": "400-860-0462", "price": 26.99

}.....

], "discount": 0, "discountPrice": 26.99, "giftPackage": {

"giftPackage": "", "giftPrice": "", "otherGift": ""

},

"modelId": 34369, "modelType": "接受预定", "name": "昂科威 2015款 28T 四驱精英型 ", "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1410/31/c10/40404789_40404789_1414750174280.jpg", "price": 26.99, "totalPrice":"12.99"

}

], "pageCount": 2723, "pageNo": 1, "pageSize": 1, "total": 2723

}

==================================================性能优化=====================================================

3.1 车系参配


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/serialDetail.xsp?serialId=4313&subscributedIds=30499,36337
现应用接口:

http://dev3.pcauto.com.cn:8001/interface/iphone/atom/price/model_list_by_sg_json.jsp?serialGroupId=4313 车系概览页车型列表接口
http://dev3.pcauto.com.cn:8001/interface/iphone/atom/price/model_overview.jsp?mid=30499 车型概览接口
http://dev3.pcauto.com.cn:8001/interface/iphone/atom/price/model_params.jsp?mid=30499 车型参数接口
http://dev3.pcauto.com.cn:8001/dealer/interface/order/order_info.jsp?m=getMCountBySG&sgId=4313 订单数


原接口:

http://price.pcauto.com.cn/interface/iphone/model_list_v3.jsp?serialId=4313


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

参数名类型必须说明
serialIdStringY车系ID
subscributedIdsStringN已订阅的车型id


返回结果: {

"detailArray": [

{

"detail": [

{

"groupDetail": [

"全国4S店", "2368笔"

], "groupName": "询价订单"

}, {

"groupDetail": [

"前制动器类型", "通风盘式", "后制动器类型", "通风盘式", "驻车制动类型", "电子驻车", "前轮胎规格", "245/45 R18 ", "后轮胎规格", "245/45 R18 ", "备胎规格", "非全尺寸"

], "groupName": "车轮制动"

}... }

], "groupNameArray": [

"询价订单", "价格", "基本参数", "车身", "发动机", "电动机",

.....

]

}

3.2 车型对比


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/detailCompare.xsp?modelIds=34224,30502,30501,30500,30499&subscributedIds=30503,30499,30500
现应用接口:

http://dev3.pcauto.com.cn:8001/interface/iphone/atom/price/model_overview.jsp?mid=30499 车型概览接口
http://dev3.pcauto.com.cn:8001/interface/iphone/atom/price/model_params.jsp?mid=30499 车型参数接口
http://dev3.pcauto.com.cn:8001/dealer/interface/order/order_info.jsp?m=getMCountBySG&sgId=4313 订单数


原接口:

http://price.pcauto.com.cn/interface/iphone/model_detail.jsp?mid=34224


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

参数名类型必须说明
modelIdsStringY车型ID
subscributedIdsStringN已订阅的车型id


返回结果:
{ detailArray: [ {

detail: [

{

groupDetail: [ "全国4S店", "3473笔" ], groupName: "询价订单"

}, ...... isSubscributed: false, metaUrl: " http://price.pcauto.com.cn/interface/iphone/model_detail.jsp?mid=30503", modelId: "30503", modelName: "奥迪A6L 2014款 30 FSI 舒适型 ", shortName: "30 FSI 舒适型" },

...... } ]

3.3 车型综述


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/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/atom/dealer/model_local_min_price.jsp?mid=" + modelId + "&rid=" + areaId
http://price.pcauto.com.cn//interface/iphone/atom/dealer/model_list_news_price_json.jsp?serialGroupId="+jsonX.serialGorupId+"&rId="+areaId)

[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是否已订阅

3.4 车系综述


mrobot请求url:http://mrobot.pcauto.com.cn/xsp/s/auto/buy/v1.2/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://price.pcauto.com.cn/interface/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电话

[BR]原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

}

}, {

"id": "33320", "title": "2015款 1.8 30TFSI 自动舒适型", "price": "29.1", "config": "CVT无级变速(模拟8挡) 前置前驱 ", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1407/03/c3/35925221_35925221_1404357427634_120x90.jpg", "minPrice": "25.6", "paiLiang": "1.8", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 7.68, "loan": 180000, "monthPay": 0.55, "firstPayTotal": 10.9, "loantotal": 30.84, "total": 28.9

}

}]

}, {

"title": " 2.0T 涡轮增压 179马力", "data": [{

"id": "33313", "title": "2015款 2.0 35TFSI 自动标准型", "price": "31.28", "config": "CVT无级变速(模拟8挡) 前置前驱 ", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", "minPrice": "27.84", "paiLiang": "2.0", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 8.35, "loan": 190000, "monthPay": 0.58, "firstPayTotal": 12.4, "loantotal": 33.44, "total": 31.4

}

}, {

"id": "33314", "title": "2015款 2.0 35TFSI 自动舒适型", "price": "33.29", "config": "CVT无级变速(模拟8挡) 前置前驱 ", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1408/11/c1/37285606_37285606_1407725980801_120x90.jpg", "minPrice": "29.13", "paiLiang": "2.0", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 8.74, "loan": 200000, "monthPay": 0.62, "firstPayTotal": 12.83, "loantotal": 34.98, "total": 32.83

}

}, {

"id": "33315", "title": "2015款 2.0 35TFSI 自动技术型", "price": "37.28", "config": "CVT无级变速(模拟8挡) 前置前驱 ", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1408/11/c6/37300232_37300232_1407743541947_120x90.jpg", "minPrice": "33.17", "paiLiang": "2.0", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 9.95, "loan": 230000, "monthPay": 0.71, "firstPayTotal": 14.36, "loantotal": 39.83, "total": 37.36

}

}, {

"id": "33316", "title": "2015款 2.0 35TFSI 自动豪华型", "price": "40.2", "config": "CVT无级变速(模拟8挡) 前置前驱 ", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", "minPrice": "35.78", "paiLiang": "2.0", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 10.73, "loan": 250000, "monthPay": 0.77, "firstPayTotal": 15.26, "loantotal": 42.95, "total": 40.26

}

}]

}, {

"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

}

}, {

"id": "33317", "title": "2015款 2.0 45 TFSI quattro运动型", "price": "47.36", "config": "7挡双离合 前置四驱 托森式差速", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", "minPrice": "41.68", "paiLiang": "2.0", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 12.5, "loan": 290000, "monthPay": 0.89, "firstPayTotal": 17.82, "loantotal": 49.94, "total": 46.82

}

}]

}, {

"title": " 3.0L 机械增压 272马力", "data": [{

"id": "33321", "title": "2015款 3.0 50TFSI quattro旗舰型", "price": "57.81", "config": "7挡双离合 前置四驱 托森式差速", "state": "在售", "status": "在售", "isNews": "0", "rjBzzw": 5, "introduce": 0, "photo": " http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", "minPrice": "7.0", "paiLiang": "", "jqx": 950, "glassPercent": 0.0019, "compared": "", "result": {

"shoufu": 2.1, "loan": 50000, "monthPay": 0.15, "firstPayTotal": 3.2, "loantotal": 8.73, "total": 8.2

}

}]

}]

}