[关闭]
@Brave 2016-09-02T11:15:55.000000Z 字数 65475 阅读 12150

车护宝移动平台API接口文档

@(车护宝)

接口通用信息

  1. 接口基于HTTP RESTFul思想架构设计,接口文档内容与格式基于Markdown语法。
  2. 接口地址(URL)统一采用:http://api.域名/版本/请求资源?过滤参数的格式。例如:http://api.chehubao.com/v1/accounts?limit=10&offset=10
  3. 请求参数默认为JSON格式传输,响应内容默认JSON格式返回。
  4. 客户端需要先进行身份验证,才能与服务端交互。客户端拿到服务端分配的API_KEY与CODE获取身份标识TOKEN。
  5. 接口服务使用Baisc Auth方式进行授权,除TOKEN接口外,其他接口需要设置HTTP请求头Authorization来设置授权码,用来调用授权的接口。

接口索引


接口详情

1. 身份验证,令牌(TOKEN)获取

接口说明:该接口用来获取客户端的身份信息,验证是否是合法用户。服务端默认分配API_KEYCODE两个参数,客户端利用该参数向服务端发送HTTP POST请求,以获取最新的令牌TOKEN。

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
code CODE码 由服务端分配CODE值 String(10)
api_key API_KEY 由服务端分配API_KEY值 String(32)

请求实例

  1. POST /v1/createToken HTTP/1.1
  2. Host: api.chehubao.com
  3. {
  4. "code":"third_party",
  5. "api_key":"third_party_api_key"
  6. }
  1. POST v2.0/basic-auth/token HTTP/1.1
  2. Host: api.chehubao.com
  3. {
  4. "code":"third_party",
  5. "api_key":"third_party_api_key"
  6. }

返回结果

  1. {
  2. "error_code":0,
  3. "status":1,
  4. "token":"1efdf3baef67568d35731c69468f9f2dd1afee45"
  5. }

2.汽车品牌列表

接口说明:获取汽车所有品牌名称接口。

请求实例

  1. GET /v1/getAutoBrands HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/automobile/brands HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "brands": [
  6. {
  7. "brand_id": 105,
  8. "brand_name": "中华",
  9. "brand_first_letter": "Z",
  10. "brand_image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9bcf4e0e0.png"
  11. }
  12. ]
  13. }
返回参数 含义 参数类型 长度
brand_id 品牌ID integer -
brand_name 汽车品牌名称 String -
brand_first_letter 汽车品牌名称首字母 String 1
brand_image 汽车品牌Logo String -

3.指定汽车品牌车系

接口说明:根据品牌ID获取品牌的所有车系。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
brand_id 品牌ID 接口返回的品牌ID integer(-)

请求实例

  1. GET /v1/getAutoSeries HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/automobile/series?brand_id=4 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "automakers":[
  6. {
  7. "automaker":"东风本田",
  8. "autoseries":[
  9. {
  10. "auto_series_id":1,
  11. "auto_series_name":"奥迪A3"
  12. }
  13. ]
  14. }
  15. ]
  16. }
返回参数 含义 参数类型 长度
automakers 所有的品牌厂商列表 - -
automaker 品牌厂商名称 string 50
autoseries 品牌厂商车系列表 - -
auto_series_id 车系ID integer -
auto_series_name 车系名称 String 100

4.指定汽车车型

接口说明:根据车系ID获取车型。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
auto_series_id 车系ID 接口返回的车系ID String(integer)

请求实例

  1. GET /v1/getCarModel?auto_series_id=66 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/automobile/models?auto_series_id=66 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "car_models": [
  6. {
  7. "auto_model_id": 3197,
  8. "auto_model_name": "1.5 手动 豪华型",
  9. "auto_model_year": "2014款 "
  10. }
  11. ]
  12. }
返回参数 含义 参数类型 长度
car_models 所有车型列表 - -
auto_model_id 车型ID integer -
auto_model_name 车型名称 String -
auto_model_year 车型年款 String -

5.保养类型列表

接口说明:获取保养套餐的所有类型。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
sort_by 排序列 当前只支持“sort”字段排序 String(4) sort
order 排序值 支持升序,降序 String(4) ASC

请求实例

  1. GET /v1/getServiceTypes?sort_by=sort&order=ASC HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_types":[
  6. {
  7. "service_type_id":1,
  8. "service_type_name":"更换蓄电池"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
service_types 所有保养类型列表 - -
service_type_id 保养类型ID integer -
service_type_name 保养类型名称 string 30

6.保养套餐列表

接口说明:获取指定车型的所有保养套餐列表
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
auto_model_id 车型ID 接口返回的车型ID String
service_type_id 保养类型 保养类型ID String
mileage 里程 v2.0 String
service_shop_id 保养服务店 v2.0 integer
city_id 城市ID编号 客户端定位的城市名称,通过接口43. 获取定位城市编号,拿到该编号 integer
limit 限制大小 指定返回记录的数量,系统会做验证 String 100
offset 偏移量 指定返回记录的开始位置 String 0

请求实例

  1. GET /v1/getServices?auto_model_id=1834&service_type_id=2 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2/getServices?auto_model_id=1834&service_type_id=2 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/maintegerenance/lists?auto_model_id=1834&service_type_id=2&mileage=1000 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "returned": 1,
  6. "total": 1,
  7. "services": [
  8. {
  9. "service_id": 3762,
  10. "service_type_id": 2,
  11. "service_name": "奥迪A6L 2.0T(7500公里或6月先到为准)保养套餐",
  12. "service_price": "483.00",
  13. "service_thumb": "http://i.chehubao.com/pic/goods/2015-01-10/detail-changgui.png",
  14. "service_info": "更换机油机滤",
  15. "service_market_price": "926.00"
  16. }
  17. ]
  18. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
services 指定车型的所有保养套餐列表 - -
service_id 套餐ID integer -
service_type_id 套餐类型ID integer -
service_name 套餐名称 string -
service_price 套餐价格 decimal -
service_thumb 套餐缩略图,是一个URL地址 string -
service_info 套餐信息说明 string -
service_market_price 套餐市场价 decimal -

7.保养套餐详情

接口说明:获取套餐详情数据
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_id 套餐ID 接口返回的套餐ID string

请求实例

  1. GET /v1/getServiceInfo?service_id=495 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/maintegerenance/detail?service_id=495 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_id":1,
  6. "service_name":"起亚全系车型嘉实多磁护合成机油常规保养套餐(商社启迪4S店促销)",
  7. "service_price":640,
  8. "service_market_price":640,
  9. "service_thumb":"http://www.chebubao.com/uploads/389984.jpg",
  10. "service_info":"蓄电池套餐",
  11. "goods":[
  12. {
  13. "goods_id":12,
  14. "goods_name":"嘉实多金嘉护矿物质机油 API SN/CF 10W-40",
  15. "goods_type":"机油",
  16. "goods_unit":"1瓶",
  17. "goods_price":234.00
  18. }
  19. ],
  20. "service_explains":[
  21. {
  22. "service_explain_id":1,
  23. "service_explain_Title":"testing...",
  24. "preview_url":"http://api.chehubao.com/specification/view?service_explain_id=1"
  25. }
  26. ]
  27. }
返回参数 含义 参数类型 长度
service_id 套餐ID integer -
service_name 套餐名称(包含行车公里数) string -
service_price 套餐价格 decimal -
service_market_price 套餐市场价格 decimal -
service_thumb 套餐缩略图,是一个URL地址 string -
service_info 套餐信息说明 string -
goods 套餐商品列表 - -
goods_id 套餐商品ID integer -
goods_name 套餐商品名称 string -
goods_type 套餐商品类型 string -
goods_price 套餐商品价格 decimal -
service_explains 套餐说明列表 - -
service_explain_id 套餐说明模板ID integer -
service_explain_Title 套餐说明模板内容 - -
preview_url 套餐说明模板html5页面 string -

8.商品详情

接口说明:根据车系ID获取车型。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
goods_id 商品ID 接口返回的商品ID String(integer)

请求实例

  1. GET /v1/getGoodsInfo?goods_id=1 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "goods_id":1,
  6. "goods_name":"曼牌机油滤清器W719/45",
  7. "goods_price":"640",
  8. "goods_thumb":"http://www.chebubao.com/uploads/389984.jpg",
  9. "goods_info":"测试内容",
  10. }
返回参数 含义 参数类型 长度
goods_id 套餐商品ID integer -
goods_name 套餐商品名称 string 100
goods_price 套餐商品价格 decimal 11,2
goods_thumb 套餐商品图片 string 150
goods_info 套餐商品详情 text -

9.发送验证码

接口说明:客户端提交手机号码到服务器, 服务器则向该手机号码发送一条带4位数字的手机验证码,有效期为30分钟。30分钟内不断请求接口,都只会返回一个相同的手机验证码。请限制1分钟内只允许发送一次手机验证码。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 用户注册的可用手机号码 integer(11)
  1. POST /v1/sendVerificationCode HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190"
  6. }
  1. POST /v2.0/verification-code HTTP/1.1
  2. Host: api.dev.chehubao.local
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190"
  6. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "timer":14125256578,
  6. "verification_code":1245
  7. }
返回参数 含义 参数类型 长度
timer 时间过期控制器,如果该时间已经过期30分钟,则系统会提示验证码已经过期 integer 10
verification_code 验证码 integer 4

10.手机号码注册

接口说明:手机号码注册接口,客户端填写手机号码、密码、接口9返回的时间过期控制器、验证码到服务器,如果注册成功,则返回账号的基本信息。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 用户注册的可用手机号码 integer(11)
password 密码 密码长度至少6位以上 string(12)
verification_code 验证码 手机短信验证码 integer(4)
timer 时间过期控制器 服务器返回的时间过期控制器 integer(10)
source 注册用户设备类型 注册用户设备类型 1-andriod 2-ios 3-html5 string(1) 1
invitation_code BD推广邀请码 BD推广邀请码,适用v3,v2.0 string

请求实例

  1. POST /v1/mobileRegister HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190",
  6. "password":"123456@a",
  7. "verification_code":"3838",
  8. "source":1,
  9. "timer":145634566,
  10. "invitation_code":"3456df45"
  11. }
  1. POST /v2/mobileRegister HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190",
  6. "password":"123456@a",
  7. "verification_code":"3838",
  8. "source":1,
  9. "timer":145634566,
  10. "invitation_code":"3456df45"
  11. }
  1. POST /v3/mobile/registration HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190",
  6. "password":"123456@a",
  7. "verification_code":"3838",
  8. "source":1,
  9. "timer":145634566,
  10. "invitation_code":"3456df45"
  11. }
  1. POST /v2.0/account/registration HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":"18615788190",
  6. "password":"123456@a",
  7. "verification_code":"3838",
  8. "source":1,
  9. "invitation_code":"3456df45"
  10. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "account_id": 21,
  6. "username":"demo",
  7. "mobile":"15898784512",
  8. "email":"demo@chehubao.com",
  9. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  10. "avatar":"http://www.chehubao.com/avatar/demo.png"
  11. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string 200

11.检查短信验证码

接口说明:客户端提交手机号码与短信验证码到服务器。验证手机号码是否有效。该接口主要是在用户未注册的情况下提交订单时使用。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
verification_code 验证码 手机短信验证码 integer(4)
timer 时间过期控制器 服务器返回的时间过期控制器 integer(10)
mobile 手机号码 用户注册的可用手机号码 integer(11)
source 注册用户设备类型 注册用户设备类型 1-andriod 2-ios 3-html5 string(1) 1

请求实例

  1. POST /v1/verifySmsCode HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "verification_code":"58971",
  6. "timer":"14125256578",
  7. "mobile":"18615788190",
  8. "source":1
  9. }
  1. POST /v2.0/sms-verification HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":18615788190,
  6. "verification_code":2722,
  7. "source":1
  8. }

返回结果

2.0版本后不再返回以下内容

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "account_id": 21,
  6. "username":"demo",
  7. "mobile":"15898784512",
  8. "email":"demo@chehubao.com",
  9. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  10. "avatar":"http://www.chehubao.com/avatar/demo.png"
  11. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string 200

12.根据手机号/用户名/邮箱获取账号信息

接口说明:客户端提交手机号码/用户名/邮箱到服务器。服务器返回该账号的基础信息。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account 账号 可以是手机号码/用户名/邮箱 mix(40)
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v1/getAccountInfo?account=156 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/account/information?access_token=OTEyODk5OWY4MDU3ZTBmZTE3NzA2MDIzMzExMjQzZWY= HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48687,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "e7fe8b88db51d86ef2f5e169144b9c1b",
  11. "access_token": "OTEyODk5OWY4MDU3ZTBmZTE3NzA2MDIzMzExMjQzZWY=",
  12. "refresh_token": "MWY0MzZkOGRiMTI1YmE2MDkzZjBmOWU0NTBjMjhiZDM=",
  13. "access_token_expires_time": 1435130705
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10

13.已登陆修改密码

接口说明:用户修改密码的一种方式。用户在登陆状态下,调用该接口修改密码。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID v1 integer
origin_password 密码字符 原始的密码 string
password 密码字符 新设置的密码 string
login_expiry_time 登陆过期时间 v1 integer
access_token 用户授权Token v2.0 string

请求实例

  1. POST /v1/resetPassword HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"12",
  6. "origin_password":"123456",
  7. "password":"123456@a",
  8. "login_expiry_time":1412345687
  9. }
  1. POST /v2.0/account/password HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token": "YTJkZjY2NjE5NzEzOGQwYmZjZmE5MTk2ZDA3YjA3YzY=",
  6. "origin_password": "123456@a",
  7. "password": "123456"
  8. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10

14.绑定新手机号码

接口说明:用户需要修改现有的手机号码,需要提交新的手机号码到服务器。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 用户注册的账号ID integer(-)
mobile 新手机号码 新手机号码 string(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/bindNewMobile HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"21",
  6. "mobile":"13625484568",
  7. "login_expiry_time":1412345687
  8. }
  1. POST /v2.0/new-mobile-binding HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token":"OTEyODk5OWY4MDU3ZTBmZTE3NzA2MDIzMzExMjQzZWY=",
  6. "mobile":"13625484568"
  7. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer 10

15.账号登陆

接口说明:用户可以通过手机号码、邮箱、用户名直接登录
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account 账号 可以是手机号码/用户名/邮箱 string
password 密码 登陆密码 string

请求实例

  1. POST /v1/login HTTP/1.1
  2. Host: api.chehubao.com
  3. {
  4. "account":"18615788190",
  5. "password":"123456@a"
  6. }
  7. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. POST /v2.0/account/login HTTP/1.1
  2. Host: api.chehubao.com
  3. {
  4. "account":"18615788190",
  5. "password":"123456@a"
  6. }
  7. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer 10

16.修改用户头像

接口说明:修改用户的头像
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号ID integer(-)
file_key:avatar 头像文件 头像文件文件名称是avatar string(200)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/modifyAvatar HTTP/1.1
  2. Authorization: 7cc7163f186e0b873b95770341f8c9dfd2337107
  3. Content-Disposition: form-data; name="account_id"
  4. Content-Disposition: form-data; name="avatar"; filename="image.png"
  5. Content-Disposition: form-data; name="login_expiry_time"
  1. POST /v2.0/account/avatar HTTP/1.1
  2. Authorization: 7cc7163f186e0b873b95770341f8c9dfd2337107
  3. Content-Disposition: form-data; name="access_token"
  4. Content-Disposition: form-data; name="avatar"; filename="image.png"

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer 10

17.修改用户名

接口说明:修改用户名称
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID v1 integer,
username 用户名 v1,v2.0 string
login_expiry_time 登陆过期时间 v1 integer
access_token 用户授权Token 用户授权Token,v2.0 string

请求实例

  1. POST /v1/modifyUsername HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"47292",
  6. "username":"134",
  7. "login_expiry_time":1440796070
  8. }
  1. PUT /v2.0/account/username HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token":"ODJkZmIzZWI1YzVlNmRjNmZhZjA3NWZlMjE4YTFjMjc=",
  6. "username":"13434"
  7. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer 10

18.我的优惠券

接口说明:获取用户的优惠券信息,客户端可以通过不同的参数获取已经使用/为使用/所有的用户优惠券信息。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID v1 integer
is_used 是否使用 0未使用 1已使用 2获取所有的优惠券 3已过期,v1,v2.0 integer 2
login_expiry_time 登陆过期时间 v1 integer
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /dev/v1/getCoupons?account_id=48687&login_expiry_time=1442345687 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/account/coupons?access_token=YjdhM2IxNjVhMTQwYTYwMGM3MjFkMjY5NDJlODc4ZjA=&is_used=2 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "cupons": [
  6. {
  7. "coupon_id":1,
  8. "coupon_user_id":1004,
  9. "coupon_name":"双十一优惠券",
  10. "coupon_expiry_date":"2014.11.11",
  11. "coupon_denomination":"25",
  12. "coupon_limit_price":132.00
  13. }
  14. ]
  15. }
返回参数 含义 参数类型 长度
cupons 用户的所有优惠券信息 - -
coupon_id 优惠券ID integer -
coupon_user_id 用户的优惠券ID integer -
coupon_name 优惠券名称 string -
coupon_expiry_date 优惠券过期时间 date -
coupon_denomination 优惠券面额 decimal -
coupon_limit_price 限制可使用于最低订单金额 decimal -

19.我的车型

接口说明:获取用户的所有车型信息
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号信息 integer(-)
is_delete 是否删除 1未删除 2已删除 3所有 integer(-) 1
auto_model_id 车型编号 车型编号 integer
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. GET /v1/getCarModelByUser?account_id=46263&is_delete=3&login_expiry_time=1412345687 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/account/automobile-models?access_token=ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=&auto_model_id=1245 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "car_models": [
  6. {
  7. "brand_id": 33,
  8. "auto_series_id": 358,
  9. "auto_model_id": 9552,
  10. "automobile_brand_name": "福特",
  11. "automobile_series_name": "福克斯-两厢",
  12. "automobile_model_name": "2013款 1.8 手自一体 经典款 百万纪念版",
  13. "car_model_full_name": "福特 福克斯-两厢 2013款 1.8 手自一体 经典款 百万纪念版",
  14. "is_default": true,
  15. "logo": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d968539efc.png",
  16. "vin": "",
  17. "plate_number": "",
  18. "buy_time": "",
  19. "road_time": "",
  20. "mileage": ""
  21. }
  22. ]
  23. }
返回参数 含义 参数类型 长度
car_models 所有车型列表 - -
brand_id 品牌ID integer -
auto_series_id 车系ID integer -
auto_model_id 车型ID integer -
automobile_brand_name 品牌名称 string -
automobile_series_name 车系名称 string -
automobile_model_name 车型名称 string -
car_model_full_name 品牌 车系 车型名称 String -
is_default 是否是默认 boolean -
logo 品牌logo地址 string -
vin VIN码 string -
plate_number 车牌号码 string -
buy_time 购买时间 string -
road_time 上路时间 string -
mileage 当前行驶里程 string -

20.添加我的车型

接口说明:用户在客户端登陆后, 可以通过筛选不同的品牌,车系,车型来添加自己的车型.
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号信息 integer(-)
car_model_id 车型ID 接口返回的车型ID integer(-)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. POST /v1/addUserCarModel HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"1",
  6. "car_model_id":"1",
  7. "login_expiry_time":1412345687
  8. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "account_id":1
  6. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -

21.账号登出

接口说明:用户在APP端快速登出
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/logout HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. POST /v2.0/account/logout HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token":"YjdhM2IxNjVhMTQwYTYwMGM3MjFkMjY5NDJlODc4ZjA="
  6. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1
  5. }

22.省份筛选接口

接口说明:获取所有的省份信息

请求实例

  1. GET /v1/getProvinces HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/provinces HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "provinces":[
  6. {
  7. "province_id":1,
  8. "province_name":"四川省"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
provinces 省份信息列表 - -
province_id 省份ID integer -
province_name 省份名称 String -

23.城市筛选接口

接口说明:通过省份ID获取所有的城市信息.
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
province_id 省份ID 省份ID integer(11)

请求实例

  1. GET /v1/getCities?province_id=22 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/cities?province_id=22 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "cities":[
  6. {
  7. "city_id":1,
  8. "city_name":"成都市"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
cities 城市列表 - -
city_id 城市ID integer -
city_name 城市名称 String -

24.区域筛选接口

接口说明:获取城市的所有区域信息。V2版本会显示所有的区县的数据
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
city_id 城市ID 城市ID integer(11)

请求实例

  1. GET /v1/getDistricts?city_id=45052 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2/getDistricts?city_id=45052 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/getDistricts?city_id=45052 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "districts":[
  6. {
  7. "district_id": 345,
  8. "city_id": 45052,
  9. "district_name": "万州区"
  10. }
  11. ]
  12. }
返回参数 含义 参数类型 长度
districts 区域信息列表 - -
district_id 区域ID integer -
city_id 城市ID integer -
district_name 区域名称 String -

25.服务店列表

接口说明:根据省份/城市/区域/评价/服务车次条件筛选服务店信息。该接口逻辑更新如下: 客户端选择车型 =》客户端定位城市 =》 选择套餐 =》 (传入套餐ID)筛选服务店。该接口返回区域里的服务店,同时返回该省份/城市/区域库,客户端拿到该省份/城市/区域后,绑定到客户端筛选栏。返回该省份/城市/区域库参考下面返回值。取消客户端地址筛选栏的省市区接口。

请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_id 套餐ID 套餐ID integer(11)
province_id 省份ID 省份ID integer(11)
city_id 城市ID 城市ID integer(11)
district_id 区域ID 区域ID integer(11)
sort_by 排序字段 (comment_num:评论次数, service_num: 服务次数) string(10)
order 降序或升序 降序还是升序(DESC, ASC) string(10)
limit 限制大小 指定返回记录的数量,系统会做验证 string(integer) 50
offset 偏移量 指定返回记录的开始位置 string(integer) 0

请求实例

  1. GET /v1/getServiceShops?service_id=23&province_id=23&city_id=385&district_id=4226 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/motor-repair-shop/lists?service_id=23&province_id=23&city_id=385&district_id=4226&sort_by=service_num&order=DESC HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "returned": 4,
  6. "total": 4,
  7. "service_shops": [
  8. {
  9. "service_shop_id": 7060,
  10. "service_shop_name": "成都悦达起亚汽车维修有限公司",
  11. "service_shop_address": "青羊区日月大道200号",
  12. "comment_average": "6.0",
  13. "service_times": 0,
  14. "star": "B",
  15. "service_shop_map": "103.941479,30.688412",
  16. "service_shop_img": "http://i.dev.chehubao.com/pic/company/2015-02-28/54f12a3419081.jpg"
  17. }
  18. ],
  19. "provinces": [
  20. {
  21. "province_id": 1,
  22. "province_name": "北京市"
  23. }
  24. ],
  25. "cities": [
  26. {
  27. "city_id": 385,
  28. "province_id": 23,
  29. "city_name": "成都市"
  30. }
  31. ],
  32. "districts": [
  33. {
  34. "district_id": 345,
  35. "city_id": 45052,
  36. "district_name": "万州区"
  37. }
  38. ]
  39. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
service_shops 服务店列表 - -
service_shop_id 服务店ID integer -
service_shop_name 服务店名称 String -
service_shop_address 服务店地址 String -
comment_average 服务店点评平均分数 float -
star 评价星级,共5个星级 A-二星级 B-三星级 C-四星级 D-五星级 float -
service_times 服务次数 integer -
service_shop_map 服务店地图坐标 string -
service_shop_img 服务店图片 string -
provinces 省份信息列表 - -
province_id 省份ID integer -
province_name 省份名称 String -
cities 城市列表 - -
city_id 城市ID integer -
province_id 省份ID,用于筛选归类 integer -
city_name 城市名称 String -
districts 区域信息列表 - -
district_id 区域ID integer -
city_id 城市ID, 用于筛选归类 integer -
district_name 区域名称 String -

26.使用优惠券

接口说明:在提交订单时,可以使用优惠券。APP端先调用18. 我的优惠券接口,然后在选择一个可用优惠券提交到服务器。服务器会自动计算最终的套餐价格并返回。

请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_id 套餐ID 套餐ID integer(11)
coupon_user_id 用户的优惠券ID 用户的优惠券ID integer(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. GET /v1/useCoupon HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "service_id":1,
  6. "coupon_user_id":2,
  7. "login_expiry_time":1412345687
  8. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_price":750,
  6. "coupon_denomination":25,
  7. "service_actual_price":725,
  8. "unused_coupons":1,
  9. "promotion_price":750.00,
  10. "coupon_limit_price":132.00
  11. }
返回参数 含义 参数类型 长度
service_price 套餐价格 decimal(11,2) -
coupon_denomination 优惠券价格 decimal(11,2) -
service_actual_price 应付款 decimal(11,2) -
unused_coupons 用户剩余的优惠券 integer -
promotion_price 促销价,如果该价格存在,则套餐价格就要显示为该价格 decimal(11,2) -
coupon_limit_price 限制可使用于最低订单金额 decimal 11,2

27.提交订单

接口说明:用户在选择了套餐和服务店后,通过该接口提交他的订单。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 用户ID 用户ID integer(11)
auto_model_id 车型ID 车型ID integer(11)
service_id 套餐ID 套餐ID integer(11)
coupon_user_id 用户优惠券ID 用户优惠券ID integer(11)
service_shop_id 服务店ID 服务店ID integer(11)
booking_time 预约时间 预约时间,格式为'2014-11-12' string
contact_number 联系电话 手机号码 integer(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
source 注册用户设备类型 注册用户设备类型 1-andriod 2-ios 3-html5 string(1) 1
access_token 用户授权Token 用户授权Token string
mileage 里程数 版本适用:v2.0 integer
visit_address 上门服务地址 版本适用:v2.0 string
comment 备注信息 版本适用:v2.0 string
district 区编号 用于上门保养限定区域优惠价格,版本:v2.0 integeregter
qr_code 二维码判断符号 1-》订单金额减去38,其只能用一次 0=》无 integeregter 0

请求实例

  1. POST /v1/createOrder HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":48533,
  6. "auto_model_id":453,
  7. "service_id":455,
  8. "coupon_user_id":2006,
  9. "service_shop_id":166,
  10. "booking_time":"2014-11-12",
  11. "contact_number":18615788190,
  12. "login_expiry_time":1429151756,
  13. "source":1
  14. }
  1. POST /v2.0/account/order HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token": "YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=",
  6. "auto_model_id":453,
  7. "service_id":455,
  8. "coupon_user_id":2006,
  9. "service_shop_id":166,
  10. "booking_time":"2014-11-12",
  11. "contact_number":18615788190,
  12. "source":1,
  13. "comment":"test",
  14. "district":372
  15. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "order_id":112,
  6. "order_sn":"2011225520202"
  7. }
返回参数 含义 参数类型 长度
order_id 订单ID integer -
order_sn 订单编号 string 15

28.服务店详情

接口说明:获取服务店详情页面数据

请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_shop_id 服务店ID 服务店ID integer(11)

请求实例

  1. GET /v1/getServiceShopInfo?service_shop_id=7024 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2/getServiceShopInfo?service_shop_id=7024 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/motor-repair-shop/detail?service_shop_id=7024 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_shop_id":"1",
  6. "service_shop_name":"百年之星服务",
  7. "service_shop_address":"武侯区高攀路19号",
  8. "comment_average":7.8,
  9. "service_times":200,
  10. "service_shop_tel":"028-78955455",
  11. "service_shop_img":"http://www.chehubao.com/images/232345.jpg",
  12. "service_shop_desc":"我不是明星,我只为屌丝服务",
  13. "service_shop_total_comments":223,
  14. "service_shop_gold_user":[
  15. {
  16. "account_id":1,
  17. "avatar":"http://i.chehubao.com/image.png",
  18. "username":"用户名称",
  19. "rate":8.3,
  20. "comment":"为师傅点赞",
  21. "car_model_full_name":"车型全称",
  22. "comments_images":[
  23. {
  24. "image_of_comment":"http://i.chehubao.com/image.png"
  25. }
  26. ]
  27. }
  28. ],
  29. "service_shop_projects":[
  30. {
  31. "service_shop_project_name":"大保养"
  32. }
  33. ],
  34. "service_shop_map":"116.733695,39.986619"
  35. }
返回参数 含义 参数类型 长度
service_shop_id 服务店ID integer -
service_shop_name 服务店名称 String -
service_shop_address 服务店地址 String -
comment_average 服务店点评平均分数 float(11,2) -
service_times 服务次数 integer -
service_shop_tel 服务店联系电话 string 11
service_shop_img 服务店图片 string 200
service_shop_desc 服务店简介 string -
service_shop_total_comments 服务店评论总数 integer -
service_shop_gold_user 服务店金牌会员信息 integer -
account_id 账号ID integer -
avatar 用户头像 string 200
username 用户名 string 40
rate 用户评分 float(11,2) -
comment 用户评论 string -
car_model_full_name 车型全称(厂商,车系) string -
comments_images 评价晒单图片列表 - -
image_of_comment 晒单图片 string -
service_shop_projects 服务店服务项目信息列表 - -
service_shop_project_name 服务店服务项目名称 string 20
service_shop_map 服务店地图坐标 string 100

29.服务店评价列表

接口说明:获取服务店所有的评价信息
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_shop_id 服务店ID 服务店ID integer(11)
sort_by 排序字段 根据排序字段进行排序(sort) string(10) sort
order 降序或升序 降序还是升序(desc,asc) string(10) desc
limit 限制大小 指定返回记录的数量,系统会做验证 string(integer) 100
offset 偏移量 指定返回记录的开始位置 string(integer) 0

请求实例

  1. GET /v1/getServiceShopComments?service_shop_id=45&sort_by=sort&order=desc&limit=100&offset=0 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/motor-repair-shop/comments?service_shop_id=45&sort_by=sort&order=desc&limit=100&offset=0 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "returned": 100,
  6. "total": 284,
  7. "service_shop_name":"百年之星服务",
  8. "comment_average":7.8,
  9. "comments":[
  10. {
  11. "account_id":2,
  12. "username":"用户名称",
  13. "avatar":"http://i.chehubao.com/image.png",
  14. "rate":8.3,
  15. "comment":"为师傅点赞",
  16. "comment_time":"2014.11.11",
  17. "car_model_full_name":"车型全称",
  18. "comments_images":[
  19. {
  20. "image_of_comment":"http://i.chehubao.com/image.png"
  21. }
  22. ]
  23. }
  24. ]
  25. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
service_shop_name 服务店名称 String -
comment_average 服务店点评平均分数 float(11,2) -
comments 用户评论列表 - -
account_id 账号ID integer
username 用户名 string 40
avatar 用户头像 string 200
rate 用户评分 float(11,2) -
comment 用户评论 string -
comment_time 用户评论时间 string -
car_model_full_name 车型全称(厂商,车系) string -
comments_images 评价晒单图片列表 - -
image_of_comment 晒单图片 string -

30.订单筛选列表

接口说明:用户可以通过菜单栏查看自己的所有订单,支持订单不同状态进行查看,也可以查看全部订单。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 用户ID 用户ID integer(11)
order_request_status 订单状态 1全部 2待付款 3待服务4 待评价 5已完成 integer 1
limit 限制大小 指定返回记录的数量,系统会做验证 string(integer) 100
offset 偏移量 指定返回记录的开始位置 string(integer) 0
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v1/getOrders?account_id=1&order_request_status=1&limit=100&offset=0&login_expiry_time=1412345687 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /dev/v2.0/account/order-lists?access_token=YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=&order_request_status=1&limit=100&offset=0 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "returned": 2,
  6. "total": 2,
  7. "pending": 14,
  8. "service_pending": 1,
  9. "comment_pending": 2,
  10. "orders": [
  11. {
  12. "order_id": 939,
  13. "order_sn": "201504110931288",
  14. "booking_time": "2015.04.11",
  15. "service_shop_id": 96,
  16. "service_shop_name": "熊斌汽修",
  17. "service_shop_address": "长寿区桃花大道(净化总厂大门正对面路口进10米处)",
  18. "service_shop_map": "地图坐标",
  19. "service_name": "起亚锐欧 1.4L 1.6L(52500公里或42月先到为准)保养套餐",
  20. "service_price": "219.00",
  21. "service_thumb": "http://i.chehubao.com/pic/goods/2015-01-10/detail-changgui.png",
  22. "car_model_full_name": "起亚 锐欧 2010款 1.6 手动 Prime",
  23. "order_price": "219.00",
  24. "order_status": "已完成",
  25. "main_opreate": "评价",
  26. "other_opreate": null,
  27. "service_type": 57,
  28. "service_type_name": "保养",
  29. "order_coupons": [
  30. {
  31. "coupon_id": 1,
  32. "coupon_user_id": 2,
  33. "coupon_name": "App测试优惠券,暂不要删除",
  34. "coupon_expiry_date": "2015.02.28",
  35. "coupon_denomination": 25,
  36. "coupon_limit_price": 500
  37. }
  38. ]
  39. }
  40. ]
  41. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
pendding 等待付款的订单数量 integer -
service_pending 等待服务的订单数量 integer -
comment_pending 等待评价的订单数量 integer -
order_id 订单ID integer -
service_shop_id 服务店ID integer -
service_shop_name 服务店名称 String -
service_name 套餐名称 String -
service_price 套餐价格 float(11,2) -
service_thumb 套餐缩略图,是一个URL地址 string 150
car_model_fullname 车型全称(厂商,车系) string -
order_price 订单价格 float(11,2) -
order_status 订单状态 string -
main_opreate 当前可以执行的主要操作 string -
other_opreate 当前可以执行的另外操作 string -
service_type_id 保养类型ID integer -
service_type_name 保养类型名称 string 30
order_coupons 订单优惠券信息, 如果未使用则无参数返回, 使用过则返回优惠券列表 - -

31.订单详情

接口说明:获取订单的详情页面数据
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
order_id 订单ID 订单ID integer(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. GET /v1/getOrderInfo&order_id=1&login_expiry_time=1412345687 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/order/detail?order_id=1091 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "order_id":"15",
  6. "order_price":780,
  7. "order_sn":"201142514555",
  8. "order_status":"待付款",
  9. "service_shop_id":12,
  10. "service_shop_name":"百年之星服务",
  11. "service_shop_address":"武侯区高攀路19号",
  12. "service_shop_map":"116.733695,39.986619",
  13. "service_shop_tel":"028-85693254",
  14. "booking_time":"2014-11-12",
  15. "goods":[
  16. {
  17. "goods_id":12,
  18. "goods_name":"嘉实多金嘉护矿物质机油 API SN/CF 10W-40",
  19. "goods_type":"机油",
  20. "goods_unit":"1瓶",
  21. "goods_price":234.00
  22. }
  23. ],
  24. "services":[
  25. {
  26. "service_name":"起亚全系车型嘉实多磁护合成机油常规保养套餐(商社启迪4S店促销)",
  27. "service_price":640,
  28. "service_thumb":"http://www.chebubao.com/uploads/389984.jpg",
  29. "car_model_fullname":"车型全称",
  30. "service_market_price":548,
  31. }
  32. ],
  33. "coupon_price":25,
  34. "main_opreate":"付款",
  35. "other_opreate":"取消订单",
  36. }
返回参数 含义 参数类型 长度
order_id 订单ID integer -
order_price 订单价格 float(11,2) -
order_sn 订单编号 string 15
order_status 订单状态 string -
service_shop_id 服务店ID integer -
service_shop_name 服务店名称 String -
service_shop_address 服务店地址 String -
service_shop_map 服务店地图坐标 string 100
service_shop_tel 服务店电话 string 100
booking_time 预约时间,格式为'2014-11-12' string -
goods 套餐商品列表 - -
goods_id 套餐商品ID integer -
goods_name 套餐商品名称 string 100
goods_type 套餐商品类型 string 50
goods_price 套餐商品价格 decimal 11,2
services 指定车型的所有保养套餐列表 - -
service_name 套餐名称 string 100
service_price 套餐价格 decimal 11,2
service_thumb 套餐缩略图,是一个URL地址 string 150
car_model_fullname 车型全称(厂商,车系) string -
service_market_price 套餐市场价 decimal 11,2
main_opreate 当前可以执行的主要操作 string -
other_opreate 当前可以执行的另外操作 string -

32.订单评价

接口说明:获取订单的详情页面数据。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
order_id 订单ID 订单ID integer(11)
service_shop_id 服务店ID 服务店ID integer(11)
account_id 用户ID 用户ID integer(11)
order_score 订单评分 五星(非常好)10分、四星(很好)8分、三星(好)6分、两星(一般)4分、一星(差)2分 float(11,2)
comment 评论内容 最多200个字符 string(200)
images_of_comment[] 晒单图片 将上传参数写成[]。以支持多个图片 string
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/addOrderComment HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "order_id":1,
  6. "service_shop_id":1,
  7. "account_id":2,
  8. "order_score": 6,
  9. "comment":"这里是内容",
  10. "login_expiry_time":1412345687
  11. }
  1. POST /v2/addOrderComment HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. Content-Disposition: form-data; name="account_id"
  5. 109
  6. Content-Disposition: form-data; name="service_shop_id"
  7. 12
  8. Content-Disposition: form-data; name="login_expiry_time"
  9. 135656578
  10. Content-Disposition: form-data; name="order_score"
  11. 6
  12. Content-Disposition: form-data; name="comment"
  13. 34343
  14. Content-Disposition: form-data; name="images_of_comment[]"; filename="45.pic.jpg"
  15. Content-Disposition: form-data; name="order_id"
  16. 1097
  1. POST /v2.0/order/comment HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. Content-Disposition: form-data; name="access_token"
  5. YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=
  6. Content-Disposition: form-data; name="service_shop_id"
  7. 12
  8. Content-Disposition: form-data; name="order_score"
  9. 6
  10. Content-Disposition: form-data; name="comment"
  11. 34343
  12. Content-Disposition: form-data; name="images_of_comment[]"; filename="45.pic.jpg"
  13. Content-Disposition: form-data; name="order_id"
  14. 1097

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "order_id":12,
返回参数 含义 参数类型 长度
order_id 订单id integer -

33.订单取消

接口说明:用户取消订单。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
order_id 订单ID 订单ID integer(11)
account_id 账号ID 账号ID integer(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/cancelOrder HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "order_id":1,
  6. "account_id":2,
  7. "login_expiry_time":1412345687
  8. }
  1. DELETE /v2.0/order/cancelling HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token": "YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=",
  6. "order_id": 1091
  7. }
  1. DELETE /v2.0/order/cancellation?access_token=YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=&order_id=1091 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "order_id":12,
返回参数 含义 参数类型 长度
order_id 订单id integer -

34.关于车护宝

接口说明:获取关于车护宝页面内容

请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
article_id 文章ID 关于车护宝页面的ID integer(11) 8

请求实例

  1. GET /v1/getAbout?article_id=8 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "article_id":1,
  6. "article_url":"http://api.chehubao.com/specification/article?article_id=8"
  7. }
返回参数 含义 参数类型 长度
article_id 关于车护宝页面ID integer -
article_url html5页面 string -

35.用户反馈

接口说明:用户在APP上的添加用户反馈内容。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号ID integer(11)
source 用户返回来源 1-andriod 2-ios 3-html5 integer
feedback 反馈内容 用户输入的反馈内容 string(200)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. POST /v1/addFeedback HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":1,
  6. "source":1,
  7. "feedback":"Testing...",
  8. "login_expiry_time":1412345687
  9. }
  1. POST /v2/addFeedback HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":1,
  6. "source":1,
  7. "feedback":"Testing...",
  8. "login_expiry_time":1412345687
  9. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "feedback_id":1,
  6. }
返回参数 含义 参数类型 长度
feedback_id 反馈内容ID integer -

36.获取套餐说明模板

接口说明:获取套餐的说明模板内容。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_explain_id 套餐说明模板ID 套餐说明模板ID integer(11)

请求实例

  1. GET /v1/getServiceExplain?service_explain_id=7 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/maintegerenance/explanation?service_explain_id=1 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_explain_id": 7,
  6. "service_explain_Title": "App测试说明模板,暂不要删除",
  7. "preview_url":"http://api.chehubao.com/specification/view?service_explain_id=1"
  8. }
返回参数 含义 参数类型 长度
service_explain_id 套餐说明模板ID integer -
service_explain_Title 套餐说明模板内容 - -
preview_url 套餐说明模板html5页面 string 50

37.获取可用的优惠券

接口说明:获取用户的可用的优惠券信息。当在下单时,系统会检测用户的优惠券与服务店信息是否匹配。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号ID integer(-)
service_shop_id 服务店ID 服务店ID integer(-)
service_id 套餐ID 套餐ID integer(-)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v1/getAvailableCoupons?account_id=46921&service_shop_id=46&service_id=96&login_expiry_time=1420611968 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/account/available-coupons?access_token=YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=&service_shop_id=7068&service_id=487 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "cupons": [
  6. {
  7. "coupon_id":1,
  8. "coupon_user_id":1004,
  9. "coupon_name":"双十一优惠券",
  10. "coupon_expiry_date":"2014.11.11",
  11. "coupon_denomination":"25",
  12. "coupon_limit_price":132
  13. }
  14. ]
  15. }
返回参数 含义 参数类型 长度
cupons 用户的所有优惠券信息 - -
coupon_id 优惠券ID integer -
coupon_user_id 用户的优惠券ID integer -
coupon_name 优惠券名称 string 100
coupon_expiry_date 优惠券过期时间 date -
coupon_denomination 优惠券面额 decimal 11,2

38.未登陆密码重置

接口说明:用户在未登陆时,如果忘记密码,可以通过该接口进行密码找回。
处理流程: A). APP调用12. 根据手机号/用户名/邮箱获取账号信息,=> B). 服务器检测用户的账号信息,响应结果 => C). 如果成功返回用户信息 => D). APP调用9. 发送验证码向手机发送一条验证码 => E). APP调用11. 验证短信验证码 => F). 如果验证通过 => G). 调用38.未登陆密码重置 => H). 完成密码重置

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号ID integer(-)
password 密码字符 重置的密码 string(6-30)
access_token 用户授权Token 用户授权Token string

请求实例

  1. POST /v1/forgotPassword? HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"21",
  6. "password":"password"
  7. }
  1. GET /v2.0/password HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token":"YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=",
  6. "password":"password"
  7. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "account_id": 21,
  6. "username":"demo",
  7. "mobile":"15898784512",
  8. "email":"demo@chehubao.com",
  9. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  10. "avatar":"http://www.chehubao.com/avatar/demo.png"
  11. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string 200

39.获取地图周边服务店

接口说明:在地图中获取周边服务店信息。app需要传入当前定位的经纬度的周边最大的经纬度,最小的经纬度给服务端,服务端根据这两个值计算出该范围内的所有服务店信息。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
max_pointeger 最大经纬度坐标 手机获取地图中心点的范围最大经纬度坐标值 string(20)
min_pointeger 最小经纬度坐标 手机获取地图中心点的范围最小经纬度坐标值 string(20)

请求实例

  1. GET /v1/getServiceShopsByMap?max_pointeger=106.478162,29.471734&min_pointeger=96.478162,20.471734 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/motor-repair-shop/map-lists?max_pointeger=104.038223,30.569211&min_pointeger=120.976425,33.663759 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "returned": 100,
  6. "total": 284,
  7. "service_shops":[
  8. {
  9. "service_shop_id":"1",
  10. "service_shop_name":"百年之星服务",
  11. "service_shop_address":"武侯区高攀路19号",
  12. "comment_average":"7.8",
  13. "star":"A",
  14. "service_times":"200",
  15. "service_shop_map":"116.733695,39.986619",
  16. "service_shop_img":"http://i.chehubao.com/image/img.jpg",
  17. "is_home_service":true
  18. }
  19. ]
  20. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
service_shops 服务店列表 - -
service_shop_id 服务店ID integer -
service_shop_name 服务店名称 String -
service_shop_address 服务店地址 String -
comment_average 服务店点评平均分数 float -
star 评价星级,共5个星级 A-二星级B-三星级 C-四星级 D-五星级 float -
service_times 服务次数 integer -
service_shop_img 服务店图片 string -
is_home_service 是否上门车服务 boolean -

40.检查更新

接口说明:APP升级检查接口,用户点击检查更新按钮,调用该接口检测该APP是否有升级信息。如果发现更新资源,系统会返回该APP的下载地址。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
client_version 版本号 客户端APP已有的版本号,默认版本号是1 integer(1) 1
model 手机类型 手机设备类型: 0-andriod 1-ios integer(1) 0

请求实例

  1. POST /v1/checkUpgrade HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "client_version":1,
  6. "model":0
  7. }
  1. POST /v2.0/version-release HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "client_version":1,
  6. "model":0
  7. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "latest":2,
  6. "upgrade_log":"增加第三方登陆",
  7. "download_url":"http://www.chehubao.com/statics/v2.0.apk",
  8. "upgrade":1
  9. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
latest 最新版ID integer -
upgrade_log 升级日志 string(200) -
download_url 下载地址 string(200) -
upgrade 升级状态 1-升级 2 - 强制升级 -

41.获取订单消费码

接口说明:获取订单的消费码。当用户付款之后,需要该消费码到服务店进行消费。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
order_id 订单ID 订单ID integer(11)
account_id 账号ID 账号ID integer(11)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v1/getConsumerCode?order_id=12&account_id=14&login_expiry_time=1412345687 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/order/consumer-code?access_token=YzU4ZmRhZGY2M2Y5M2Q1ZTNhNzljYjk5ZTljYTVmYmU=order_id=12 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_shop_name":12,
  6. "consumer_code":"001245862"
返回参数 含义 参数类型 长度
service_shop_name 服务店名称 string 200
consumer_code 消费码 string 10

42.获取默认城市列表

接口说明:获取默认城市列表,默认城市:重庆市,用于套餐列表定位筛选。

请求实例

  1. GET /v1/getLocationServices HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  1. GET /v2.0/default-city HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "cities": [
  6. {
  7. "city_id": 162,
  8. "city_name": " 南京市",
  9. "is_default": 0
  10. },
  11. ]
  12. }
返回参数 含义 参数类型 长度
cities 城市列表 string -
city_id 城市ID integer 10
city_name 城市名称 string 10
is_default 是否是默认城市,0不是1是 integer 1

43.获取定位城市编号

接口说明:客户端通过GPS获取地图上的城市名称,然后通过该接口,获取系统城市ID编号。在通过该编号获取套餐列表数据。
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
name 城市名 客户端定位的城市名称 string(10)

请求实例

  1. GET /v1/getLocationCity?name=123 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "city_id": "45052",
  6. "city_name": "重庆"
  7. }
返回参数 含义 参数类型 长度
cities 城市列表 string -
city_id 城市ID integer 10
city_name 城市名称 string 10

44.删除我的车型

接口说明:用户在客户端删除我的车型

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 账号ID 账号信息 integer(-)
car_model_id 车型ID 接口返回的车型ID integer(-)
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer(10)

请求实例

  1. POST /v1/deleteUserCarModel HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "account_id":"1",
  6. "car_model_id":"1",
  7. "login_expiry_time":1412345687
  8. }

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "account_id":1
  6. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -

45.筛选套餐详情

接口说明:获取套餐详情数据, 与接口7.保养套餐详情区别是,该接口会根据传入的车型ID与套餐进行验证。如果套餐与车型不匹配, 则返回空。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
service_id 套餐ID 接口返回的套餐ID String(integer)
car_model_id 车型ID 接口返回的车型ID integer(-)

请求实例

  1. GET /v2/filter_service_info?auto_model_id=9718&service_id=17 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "service_id":1,
  6. "service_name":"起亚全系车型嘉实多磁护合成机油常规保养套餐(商社启迪4S店促销)",
  7. "service_price":640,
  8. "service_market_price":640,
  9. "service_thumb":"http://www.chebubao.com/uploads/389984.jpg",
  10. "service_info":"蓄电池套餐",
  11. "goods":[
  12. {
  13. "goods_id":12,
  14. "goods_name":"嘉实多金嘉护矿物质机油 API SN/CF 10W-40",
  15. "goods_type":"机油",
  16. "goods_unit":"1瓶",
  17. "goods_price":234.00
  18. }
  19. ],
  20. "service_explains":[
  21. {
  22. "service_explain_id":1,
  23. "service_explain_Title":"testing...",
  24. "preview_url":"http://api.chehubao.com/specification/view?service_explain_id=1"
  25. }
  26. ]
  27. }
返回参数 含义 参数类型 长度
service_id 套餐ID integer -
service_name 套餐名称(包含行车公里数) string 100
service_price 套餐价格 decimal 11,2
service_market_price 套餐市场价格 decimal 11,2
service_thumb 套餐缩略图,是一个URL地址 string 150
service_info 套餐信息说明 string 200
goods 套餐商品列表 - -
goods_id 套餐商品ID integer -
goods_name 套餐商品名称 string 100
goods_type 套餐商品类型 string 50
goods_price 套餐商品价格 decimal 11,2
service_explains 套餐说明列表 - -
service_explain_id 套餐说明模板ID integer -
service_explain_Title 套餐说明模板内容 - -
preview_url 套餐说明模板html5页面 string 50

46.获取车型名称

接口说明:根据车型ID获取车型名称信息
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
auto_model_id 车型ID 接口返回的车型ID integer(-)

请求实例

  1. GET /v2/get_auto_model_name?auto_model_id=9718 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "auto_model_id": 9718,
  6. "car_model_full_name": "福特 蒙迪欧致胜 2013款 2.3 手自一体 豪华型"
  7. }
返回参数 含义 参数类型 长度
auto_model_id 车型ID integer -
car_model_full_name 品牌 车系 车型名称 String 100

47.微信支付

接口说明:客户端传入订单ID, 服务端发起微信令牌验证并签名,然后返回客户端微信支付参数。
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
order_id 订单ID 订单ID integer(11)

请求实例

  1. GET /v2/tenpay?order_id=134 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "tenpay_params": {
  6. "retcode": 0,
  7. "retmsg": "ok",
  8. "appid": "wxf53129f72ee36924",
  9. "noncestr": "e2b03ca31673e913d5b50f428b63305e",
  10. "package": "Sign=WXPay",
  11. "prepayid": "1201000000150127089f37caee6b7797",
  12. "timestamp": 1422340936,
  13. "sign": "9cc73268776109a0e387f1407ef98d595ac5e474",
  14. "partner": "1229399201"
  15. }
  16. }

48.获取品牌基本信息

接口说明:根据品牌ID获取品牌基础信息

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
brand_id 品牌ID 接口返回的品牌ID integer(-)

请求实例

  1. GET /v2/get_auto_brand_info?brand_id=1 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "brand_id": 1,
  6. "brand_name": "安驰",
  7. "brand_first_letter": "A",
  8. "brand_image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9b5237453.png"
  9. }
返回参数 含义 参数类型 长度
brand_id 品牌ID integer -
brand_name 汽车品牌名称 String 20
brand_first_letter 汽车品牌名称首字母 String 2
brand_image 汽车品牌logo String -

49.获取e代驾39元优惠券

接口说明:通过手机号码获取39元e代驾优惠券
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 手机号码 integer(11)

请求实例

  1. GET /v1/Edaijia/bindingCoupon HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile":18615788191
  6. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "coupon_code": 399557111
  6. }
返回参数 含义 参数类型 长度
coupon_code 优惠券 string -

50.检测e代驾39元优惠券是否用完

接口说明:检测e代驾39元优惠券是否用完,如果没有可用的优惠券,则错误码为185
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 手机号码 integer(11)

请求实例

  1. GET /v1/Edaijia/getAvailableCoupon HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }

51.获取城市名称及顶层分类城市

接口说明:根据当前的城市ID获取城市名称以及上一级分类(递归)名称
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
district_id 地区编号 系统提供的省市区街道ID integer(11)

请求实例

  1. GET /v1/city/name?district_id=567 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "cities": [
  6. {
  7. "city_id": 567,
  8. "city_name": "东华门街道",
  9. "level": 4
  10. },
  11. {
  12. "city_id": 37,
  13. "city_name": "东城区",
  14. "level": 3
  15. },
  16. {
  17. "city_id": 45053,
  18. "city_name": "北京市",
  19. "level": 2
  20. },
  21. {
  22. "city_id": 1,
  23. "city_name": "北京市",
  24. "level": 1
  25. }
  26. ]
  27. }
返回参数 含义 参数类型 长度
city_id 城市ID 城市ID -
city_name 城市名称 城市名称 -
level 层级关系 1-省份 2-城市 3-区(县) 4-街道 -

52.注册使用邀请码

接口说明:此接口针对BD推广人员,当用户注册时, 填写一个邀请码,则为BD人员增加现金提成。

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
invitation_code 邀请码 BD推广邀请码 string
register_user_id 注册用户编号 注册用户编号 integer
mobile 手机号码 手机号码 integer
register_user_name 注册用户名称 注册用户名称 string
register_user_realname 真实名称 真实名称 string
automobile_brand 车型品牌名称 车型品牌名称 string
automobile_series 车系名称 车系名称 string
automobile_model 车型名称 车型名称 string
automobile_brand_id 车型品牌编号 车型品牌编号 integer
automobile_series_id 车系编号 车系编号 integer
automobile_model_id 车型编号 车型编号 integer
register_time 注册时间 注册时间,时间戳 integer(10)

请求实例

  1. POST /v3/business-development/invitation-code HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "invitation_code": "1345dwxe",
  6. "register_user_id": 1,
  7. "mobile":"18615637382",
  8. "register_user_name": "用户名",
  9. "register_user_realname": "真实名称",
  10. "automobile_brand": "品牌",
  11. "automobile_series": "车系",
  12. "automobile_model": "车型",
  13. "automobile_brand_id": 1,
  14. "automobile_series_id": 2,
  15. "automobile_model_id": 3,
  16. "register_time": "1378373744"
  17. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }
返回参数 含义 参数类型 长度

53.微配省份筛选接口

接口说明:用户微配项目省份筛选列表

请求实例

  1. GET /v1/weipei/provinces HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "provinces":[
  6. {
  7. "province_id":1,
  8. "province_name":"四川省"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
provinces 省份信息列表 - -
province_id 省份ID integer -
province_name 省份名称 String -

54.微配城市筛选接口

接口说明:用户微配项目城市筛选接口,需要传入省份编号
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
province_id 省份ID 省份ID integer(11)

请求实例

  1. GET /v1/weipei/cities?province_id=23s HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1,
  5. "cities":[
  6. {
  7. "city_id":1,
  8. "city_name":"成都市"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
cities 城市列表 - -
city_id 城市ID integer -
city_name 城市名称 String -

55.BD推广注册用户下单提成接口

接口说明:BD人员推广注册用户在下单成功支付后,BD人员获取提成接口
请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 推广注册用系统编号 系统用户编号 integer
order_id 推广注册用户下单编号 订单编号 integer

请求实例

  1. POST /v1/business-development/order-commission-fee HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. account_id=48681&order_id=1096

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1
  5. }

56.服务店确认消费(订单完成)- BD推广人员收入可提现接口

接口说明:BD人员推广注册用户在下单成功支付后,服务店操作已经完成,使用该接口获取提成

请求参数:

参数名 含义 规则说明 参数类型 是否必须 缺省值
account_id 推广注册用系统编号 系统用户编号 integer
order_id 推广注册用户下单编号 订单编号 integer

请求实例

  1. POST /v1/business-development/order-commission-total-fee HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. account_id=48681&order_id=1096

返回结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1
  5. }

57.专题活动首页

接口说明:发现活动页面默认的图片列表

请求实例

  1. GET /v2.0/special-topic/default-resources HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "lists": [
  6. {
  7. "image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9781828c3.png",
  8. "url": "http://www.chehubao.com/",
  9. "topic": "专题一",
  10. "weight": 1
  11. },
  12. {
  13. "image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9781828c3.png",
  14. "url": "http://www.chehubao.com/",
  15. "topic": "专题一",
  16. "weight": 0.7
  17. }
  18. ]
  19. }
返回参数 含义 参数类型 长度
weight 权重 float -
image 专题图片 string -
url 专题地址 string -
topic 主题 string -

58.服务记录

接口说明:获取用户车型的保养记录

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
auto_model_id 车型编号 车型编号 integer

请求实例

  1. GET /v2.0/account/service-records?access_token=OWFjNWM1MDY0NWNmMzc0ZjJiZWFiOGI2YzRjYzc4YzE=&auto_model_id=567 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "service_count": 2,
  6. "services": [
  7. {
  8. "service_time": "01月01号 1970",
  9. "service_type": 57,
  10. "service_type_name": "保养",
  11. "order_id": 100
  12. }
  13. ]
  14. }
返回参数 含义 参数类型 长度
service_count 服务次数 integer -
services 服务列表 - -
service_time 服务时间 string -
service_type 服务类型编号 integer -
service_type_name 服务类型名称 integer -
order_id 订单号 integer -

59.更新用户车型信息

接口说明:更新用户的车型基本信息

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
vin vin码 vin码 string
license_number 车牌号码 车牌号码 string
buy_time 购买时间 购买时间 string
road_time 上路时间 上路时间 string

请求实例

  1. PUT /dev/v2/account/automobile-model HTTP/1.1
  2. Authorization: <your_authorization_token_here>

响应结果

  1. {
  2. "error_msg":"",
  3. "error_code":0,
  4. "status":1
  5. }

60.刷新授权

接口说明:使用refresh_token进行刷新access_token,实现免密码登陆

参数名 含义 规则说明 参数类型 是否必须 缺省值
refresh_token 刷新Token 刷新Token string

请求实例

  1. POST http://api.chehubao.com/v2.0/refresh-token HTTP/1.1
  2. Authorization: d92a77a415a46e860440d75b61e35253c80ced77
  3. {
  4. "refresh_token":"ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE="
  5. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "account_id": 48681,
  6. "username": "186****8190",
  7. "mobile": "18615788190",
  8. "email": "",
  9. "avatar": "",
  10. "encrypted_password": "9ff32fce4ebc7f01206f8f989c198f11",
  11. "access_token": "ZmZjYTE5YTZhMjBmYWQ3MjM4ODFhYzg0MTk1YWY0M2E=",
  12. "refresh_token": "ZTAyMzc4YWVjMzE3NDJkNTRjYTcyZDdhNDI0NzRmZDE=",
  13. "access_token_expires_time": 1434551905
  14. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string 20
mobile 手机号码 integer 11
email 邮箱 string 20
encrypted_password 加密密码 string 32
avatar 头像 string -
access_token 访问授权 string -
refresh_token 刷新授权 string -
access_token_expires_time 授权过期时间 integer 10
login_expiry_time 登陆过期时间 用户登陆后,会有30分钟有效时间,如果过期后,需要重新的登陆 integer 10

61.*专题活动列表 *

接口说明:发现活动页面更多的图片列表

请求实例

  1. GET /v2.0/special-topic/more-resources HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "returned": 4,
  6. "total": 4,
  7. "lists": [
  8. {
  9. "image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9781828c3.png",
  10. "url": "http://www.chehubao.com/",
  11. "topic": "专题一"
  12. }
  13. ]
  14. }
返回参数 含义 参数类型 长度
returned 当前返回记录数量 integer -
total 总记录数量 integer -
image 专题图片 string -
url 专题地址 string -
topic 主题 string -

62.获取品牌名称

接口说明:获取品牌名称

请求实例

  1. GET http://api.chehubao.com/v1/automobile-brand/name?brand_id=13 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "brand_name": "别克"
  6. }
返回参数 含义 参数类型 长度
brand_name 品牌名称 integer -

63.获取车系名称

接口说明:获取车系名称

  1. GET /automobile-series/name?auto_series_id=107 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "auto_series_name": "艾力绅"
  6. }
返回参数 含义 参数类型 长度
auto_series_name 车系名称 string -

64.获取车型名称

接口说明:获取车型名称

请求实例

  1. GET http://api.chehubao.com/v1/automobile-model/name?auto_model_id=465 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "automobile_model_name": "2005款 2.4 3.2T 手动 傲龙CUV"
  6. }
返回参数 含义 参数类型 长度
automobile_model_name 车型名称 string -

65.添加/更新我的车型

接口说明:用户在客户端登陆后, 可以通过筛选不同的品牌,车系,车型来添加、修改自己的车型
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
automobile_logo 车型图片 车型图片 string
car_model_id 车型ID 接口返回的车型ID integer
buy_time 购买时间 时间格式:2015-06-18 string
road_time 上路时间 时间格式:2015-06-18 string
vin VIN码 VIN码 string
plate_number 车牌号码 车牌号码 string
mileage 行驶里程 数字格式:整型 integer

请求实例

  1. POST /v2.0/account/automobile-model HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. Content-Disposition: form-data; name="access_token"
  5. OTEyODk5OWY4MDU3ZTBmZTE3NzA2MDIzMzExMjQzZWY=
  6. Content-Disposition: form-data; name="automobile_logo"; filename="45.pic.jpg"
  7. Content-Disposition: form-data; name="auto_model_id"
  8. 465
  9. Content-Disposition: form-data; name="buy_time"
  10. 2015
  11. Content-Disposition: form-data; name="plate_number"
  12. 1
  13. Content-Disposition: form-data; name="vin"
  14. 34343
  15. Content-Disposition: form-data; name="road_time"
  16. 2015
  17. Content-Disposition: form-data; name="mileage"
  18. 13

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "brand_id": 44,
  6. "auto_series_id": 0,
  7. "auto_model_id": 465,
  8. "automobile_brand_name": "黄海",
  9. "automobile_series_name": "",
  10. "automobile_model_name": "2005款 2.4 3.2T 手动 傲龙CUV",
  11. "car_model_full_name": "黄海 2005款 2.4 3.2T 手动 傲龙CUV",
  12. "is_default": false,
  13. "logo": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9e5764d83.png",
  14. "automobile_image": "http://i.dev.chehubao.com/pic/avatar/94592687f06ce.jpg",
  15. "vin": "34343",
  16. "plate_number": "1",
  17. "buy_time": 1435061700,
  18. "road_time": 1435061700,
  19. "mileage": 13
  20. }
返回参数 含义 参数类型 长度
brand_id 品牌ID integer -
auto_series_id 车系ID integer -
auto_model_id 车型ID integer -
automobile_brand_name 品牌名称 string -
automobile_series_name 车系名称 string -
automobile_model_name 车型名称 string -
car_model_full_name 品牌 车系 车型名称 String -
is_default 是否是默认 boolean -
logo 品牌logo地址 string -
automobile_image 车型logo,如果不存在则返回false string -
vin VIN码 string -
plate_number 车牌号码 string -
buy_time 购买时间 string -
road_time 上路时间 string -
mileage 当前行驶里程 string -

66.删除我的车型

接口说明:删除用户车型
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
car_model_id 车型ID 接口返回的车型ID integer

请求实例

  1. DELETE v2.0/account/automobile-model-deletion HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 7cc7163f186e0b873b95770341f8c9dfd2337107
  4. {
  5. "access_token": "NzQyMGY1NzllMTA5ODI3MzFiNzhkZDFkYzRmZjhhNTU=",
  6. "auto_model_id": 7780
  7. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }

67.端午节地推活动专题接口

接口说明:用户使用手机号码领取邀请码
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 11位时有效的手机号码 integer

请求实例

  1. POST /v2.0/special-topic/dwj HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 7cc7163f186e0b873b95770341f8c9dfd2337107
  4. {
  5. "mobile":18615788190
  6. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }

68.绑定优惠券

接口说明:用户可以使用他人分享的优惠券码进行绑定
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
coupon_code 优惠券码 优惠券码 string

请求实例

  1. POST /v2.0/account/coupon HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token":"YjdhM2IxNjVhMTQwYTYwMGM3MjFkMjY5NDJlODc4ZjA=",
  6. "coupon_code":"GQNF55W8T8"
  7. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }

69.定制套餐

接口说明:用户提交定制化需求
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
mobile 手机号码 手机号码 integer
name 称呼 称呼 string
auto_model_id 车型编号 车型编号 integer
mileage 里程 行驶里程 integer
buy_year 购买年份 年份 integer
buy_month 购买月份 购买月份 integer
demand 需求 需求说明 string

请求实例

  1. POST /v2.0/customization HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "mobile": "18615788190",
  6. "name": "chenghuiyong",
  7. "auto_model_id": 465,
  8. "mileage": 2000,
  9. "buy_year": 2015,
  10. "buy_month": 10,
  11. "demand": 56
  12. }

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }

70.账户邀请码

接口说明:获取用户的邀请码
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v2.0/account/invitation-code?access_token=MWVmYjEwYzNkZDJlNDU5M2JiYzFjZTkyMWVmMjRlODU= HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "invitation_code": "2da00b06"
  6. }
返回参数 含义 参数类型 长度
invitation_code 邀请码 string -

71.账户邀请记录

接口说明:获取用户的邀请记录
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string

请求实例

  1. GET /v2.0/account/invitation-code-records?access_token=MWVmYjEwYzNkZDJlNDU5M2JiYzFjZTkyMWVmMjRlODU= HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "invitee": [
  6. {
  7. "account_id": 4623,
  8. "username": "奔跑的数",
  9. "mobile": "18983675880",
  10. "email": "zhangqi7176@163.com",
  11. "avatar": "",
  12. "invitation_time": "2015-06-19 16:18"
  13. }
  14. ]
  15. }
返回参数 含义 参数类型 长度
account_id 账号ID integer -
username 用户名 string -
mobile 手机号码 integer -
email 邮箱 string -
avatar 头像 string -
invitation_time 邀请时间 string -

72.快修服务类型

接口说明:获取快修服务类型子分类

请求实例

  1. GET /v2.0/fast-repair-items HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

返回结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "service_types": [
  6. {
  7. "service_type_id": 43,
  8. "service_type_name": "更换刹车盘"
  9. }
  10. ]
  11. }
返回参数 含义 参数类型 长度
service_types 所有保养类型列表 - -
service_type_id 保养类型ID integer -
service_type_name 保养类型名称 string -

73.首页Banner

接口说明:APP首页Banner列表

请求实例

  1. GET /v2.0/banners HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "lists": [
  6. {
  7. "image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9781828c3.png",
  8. "url": "http://www.chehubao.com/",
  9. "topic": "专题一",
  10. "weight": 1
  11. },
  12. {
  13. "image": "http://i.dev.chehubao.com/pic/car/2014-11-20/546d9781828c3.png",
  14. "url": "http://www.chehubao.com/",
  15. "topic": "专题一",
  16. "weight": 0.7
  17. }
  18. ]
  19. }
返回参数 含义 参数类型 长度
weight 权重 float -
image 专题图片 string -
url 专题地址 string -
topic 主题 string -

74.提交自定义车型信息

接口说明:用户发现APP上无自己的车型时,可以选择提交自己的车型

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
access_token 用户授权Token 用户授权Token string
model 车型名称 车型名称 string

请求实例

  1. POST /v2.0/custom-automobile HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b
  4. {
  5. "access_token": "ODJkZmIzZWI1YzVlNmRjNmZhZjA3NWZlMjE4YTFjMjc=",
  6. "model": "科鲁兹2016款"
  7. }

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": ""
  5. }
返回参数 含义 参数类型 长度

75.获取城市名称

接口说明:根据城市ID获取城市名称

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
city_id 城市编号 城市编号 integer

请求实例

  1. GET /v2.0/town/name?city_id=385 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "city_name": "成都市"
  6. }
返回参数 含义 参数类型 长度
city_name 城市名称 string -

76.获取省份名称

接口说明:根据省份ID获取省份名称

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
province_id 省份编号 省份编号 integer

请求实例

  1. GET /v2.0/province/name?province_id=23 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "province_name": "成都市"
  6. }
返回参数 含义 参数类型 长度
province_name 省份名称 string -

77.获取上门保养套餐列表

接口说明:根据车型编号获取上门保养套餐

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
auto_model_id 车型编号 系统返回的车型编号 integer

请求实例

  1. GET /v2.0/onsite/maintenance/lists?auto_model_id=465 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "services": [
  6. {
  7. "goods_unit": 5,
  8. "service_id": 15731,
  9. "service_type_id": 63,
  10. "service_name": "壳牌灰喜力HX8\\/嘉实多钛极护\\/金美孚1号技师推荐保养套餐",
  11. "service_price": "479.00",
  12. "service_thumb": "http:\\/\\/i.dev.chehubao.com\\/pic\\/item\\/2015-07-21\\/55ae0eed2e70d.jpg",
  13. "service_info": "更换机油机滤",
  14. "service_market_price": 2390,
  15. "man_hour_fee":0,
  16. "goods": [
  17. {
  18. "goods_id": 6752,
  19. "goods_unit": "5L",
  20. "goods_name": "嘉实多钛极护\\/壳牌灰壳HX8\\/金美孚1号",
  21. "goods_type": "润滑油",
  22. "goods_price": 2300,
  23. "goods_thumb": null,
  24. "goods_info": ""
  25. },
  26. {
  27. "goods_id": 6754,
  28. "goods_unit": "1个",
  29. "goods_name": "曼牌\\/马勒\\/索菲玛专用机油滤清器",
  30. "goods_type": "机油滤清器",
  31. "goods_price": 90,
  32. "goods_thumb": null,
  33. "goods_info": ""
  34. }
  35. ]
  36. }
  37. ]
  38. }
返回参数 含义 参数类型 长度
services 指定车型的所有保养套餐列表 - -
goods_unit 套餐机油用量 integer -
service_id 套餐ID integer -
service_type_id 套餐类型ID integer -
service_name 套餐名称 string -
service_price 套餐价格 decimal -
service_thumb 套餐缩略图,是一个URL地址 string -
service_info 套餐信息说明 string -
service_market_price 套餐市场价 decimal -
man_hour_fee 工时费 integer -
goods 套餐商品列表 - -
goods_id 套餐商品ID integer -
goods_unit 套餐商品单位 string -
goods_name 套餐商品名称 string -
goods_type 套餐商品类型 string -
goods_price 套餐商品价格 decimal -
goods_thumb 套餐商品图片 string -
goods_info 套餐商品描述 decimal -

78.获取到店保养套餐列表

接口说明:根据车型编号获取到店保养套餐

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
auto_model_id 车型编号 系统返回的车型编号 integer

请求实例

  1. GET /v2.0/visiting-maintenance/lists?auto_model_id=465 HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "services": [
  6. {
  7. "goods_unit": 5,
  8. "service_id": 15731,
  9. "service_type_id": 63,
  10. "service_name": "壳牌灰喜力HX8\\/嘉实多钛极护\\/金美孚1号技师推荐保养套餐",
  11. "service_price": "479.00",
  12. "service_thumb": "http:\\/\\/i.dev.chehubao.com\\/pic\\/item\\/2015-07-21\\/55ae0eed2e70d.jpg",
  13. "service_info": "更换机油机滤",
  14. "service_market_price": 2390,
  15. "man_hour_fee":0,
  16. "goods": [
  17. {
  18. "goods_id": 6752,
  19. "goods_unit": "5L",
  20. "goods_name": "嘉实多钛极护\\/壳牌灰壳HX8\\/金美孚1号",
  21. "goods_type": "润滑油",
  22. "goods_price": 2300,
  23. "goods_thumb": null,
  24. "goods_info": ""
  25. },
  26. {
  27. "goods_id": 6754,
  28. "goods_unit": "1个",
  29. "goods_name": "曼牌\\/马勒\\/索菲玛专用机油滤清器",
  30. "goods_type": "机油滤清器",
  31. "goods_price": 90,
  32. "goods_thumb": null,
  33. "goods_info": ""
  34. }
  35. ]
  36. }
  37. ]
  38. }
返回参数 含义 参数类型 长度
services 指定车型的所有保养套餐列表 - -
goods_unit 套餐机油用量 integer -
service_id 套餐ID integer -
service_type_id 套餐类型ID integer -
service_name 套餐名称 string -
service_price 套餐价格 decimal -
service_thumb 套餐缩略图,是一个URL地址 string -
service_info 套餐信息说明 string -
service_market_price 套餐市场价 decimal -
man_hour_fee 工时费 integer -
goods 套餐商品列表 - -
goods_id 套餐商品ID integer -
goods_unit 套餐商品单位 string -
goods_name 套餐商品名称 string -
goods_type 套餐商品类型 string -
goods_price 套餐商品价格 decimal -
goods_thumb 套餐商品图片 string -
goods_info 套餐商品描述 decimal -

79.查询车辆检测报告

接口说明:用户通过手机号码查询订单车辆检测报告

请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
verification_code 验证码 手机短信验证码 integer(4)
mobile 手机号码 用户注册的可用手机号码 integer(11)

请求实例

  1. POST /v2.0/inspection-reports HTTP/1.1
  2. Host: api.chehubao.com
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "inspection_reports": {
  6. "inspection_report": {
  7. "order_no": "201508040000390",
  8. "plate_numer": "x70z6",
  9. "maintenance_technician": "13",
  10. "inspection_date": "2015-11-13",
  11. "score": 900,
  12. "next_kilometers": 9999999,
  13. "suggestion": "更换刹车片"
  14. },
  15. "inspection_report_options": {
  16. "1": {
  17. "inspection_type": "发动机室",
  18. "inspection_sub_types": {
  19. "2": {
  20. "inspection_sub_type": "蓄电池",
  21. "inspection_option_values": [
  22. {
  23. "inspection_option": "蓄电池固定状态",
  24. "inspection_option_value": "正常状态"
  25. }
  26. ]
  27. },
  28. "3": {
  29. "inspection_sub_type": "动力转向",
  30. "inspection_option_values": [
  31. {
  32. "inspection_option": "风扇皮带有无松弛",
  33. "inspection_option_value": "近期处理"
  34. }
  35. ]
  36. }
  37. }
  38. }
  39. },
  40. "servers_man": {
  41. "name": "brave",
  42. "picture": "brave",
  43. "contact": "brave"
  44. }
  45. }
  46. }
返回参数 含义 参数类型 长度
inspection_reports 检测报告元素集合 - -
inspection_report 检测报告基本信息 - -
order_no 订单编号 integer -
plate_numer 车牌号 string -
maintenance_technician 检测师傅 string -
inspection_date 检测日期 string -
inspection_report_options 检测项目集合 - -
inspection_type 检测类别名称 string -
inspection_sub_types 检测子类别集合 - -
inspection_sub_type 检测子类别名称 string -
inspection_option_values 检测项目集合 - -
inspection_option 检测项目名称 string -
inspection_option_value 检测项目值 string -
score 检测分数 integer -
next_kilometers 下次保养公里数 integer -
suggestion 保养建议 string -
servers_man 服务管家 Map -
name 管家名称 string -
picture 头像 string -
contact 联系电话 string -

错误状态码说明

状态码(status) 错误消息码(error_code) 错误消息原因(error_msg)
1 0,无错误 "",无错误消息
0 错误状态码 错误状态码含义
tenpay_params 微信支付参数 -

80.修理厂定制套餐列表

接口说明:维修厂定制套餐列表
请求参数

参数名 含义 规则说明 参数类型 是否必须 缺省值
automobile_model 车型编号 汽车车型编号 integer(4)
mobile 维修厂联系电话 该电话与微配系统维修厂账号关联 integer(11)

请求实例

  1. GET /v1/maintenance-lists?automobile_model=1394&mobile=13434674224 HTTP/1.1
  2. Host: backend.weipei.cc
  3. Authorization: 555b2fd1fd99a5fa70ff1c203c673d68e040894b

响应结果

  1. {
  2. "status": 1,
  3. "error_code": 0,
  4. "error_msg": "",
  5. "list": [
  6. {
  7. "name": "捷诚汽修倒车镜调整开关/444元",
  8. "content": "捷诚汽修倒车镜调整开关/444元",
  9. "price": 444,
  10. "automobile_brand": 5,
  11. "automobile_brand_name": "宝马",
  12. "automobile_series": 39,
  13. "automobile_series_name": "3系(进口)",
  14. "automobile_model": 21804,
  15. "automobile_model_name": "2010款 2.0T 手动 320d 敞篷轿跑车 柴油版",
  16. "repair_shop_id": 8808,
  17. "items": [
  18. {
  19. "name": "倒车镜调整开关",
  20. "number": 4,
  21. "price": 111
  22. }
  23. ]
  24. }
  25. ]
  26. }
返回参数 含义 参数类型 长度
list 维修套餐列表 Map -
maintenance 套餐详情 Map -
name 套餐名称 string -
content 套餐内容 string -
price 套餐价格 float -
automobile_brand 汽车品牌 integer -
automobile_brand_name 汽车品牌 string -
automobile_series 汽车车系 integer -
automobile_series_name 汽车车系 string -
automobile_model 汽车车型 integer -
automobile_model_name 汽车车型 string -
repair_shop_id 维修厂编号 integer -
items 套餐明细 Map -
name 配件名称 string -
number 配件数量 integer -
price 配件价格 float -
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注