充电桩接口文档

一、获取所以充电桩信息列表

请求

  • URLhttps://ds9pvd7kzuz0.ngrok.xiaomiqiu123.top/charging-piles/list
  • 方法GET
  • 认证:不需要

响应

  • 状态码200 成功

响应体

json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"code": 200,
"msg": "成功",
"total": 4,
"data": [
{
"chargingPileId": 1,
"location": "789 Pine Blvd",
"status": "maintenance",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:23",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
},
{
"chargingPileId": 2,
"location": "789 Pine Blvd",
"status": "maintenance",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
},
{
"chargingPileId": 3,
"location": "1010 Birch Lane",
"status": "available",
"type": "Level 3 Charger",
"power": 20.00,
"voltage": 480.00,
"current": 100.00,
"connectorType": "CHAdeMO",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "FastCharge Corp",
"priceInfo": 0.25
},
{
"chargingPileId": 4,
"location": "555 Cedar Road",
"status": "occupied",
"type": "AC Fast Charger",
"power": 22.00,
"voltage": 240.00,
"current": 32.00,
"connectorType": "Type 1",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "QuickCharge Ltd",
"priceInfo": 0.18
}
]
}

字段说明

字段名 类型 描述
chargingPileId int 充电桩ID
location string 充电桩位置
status string 充电桩状态(available、occupied、maintenance)
type string 充电桩类型
power decimal 充电功率
voltage decimal 电压
current decimal 电流
connectorType string 充电接口类型
creationDate string 创建日期
lastMaintenanceDate string 最后维护日期
operator string 运营商
priceInfo decimal 价格信息
1
2
3
4
5
6
{
"code": 400,
"msg": "没有充电桩",
"total": 0,
"data": null
}

二、获取单个充电桩信息

描述

此接口用于根据充电桩的 ID 获取单个充电桩的详细信息。

请求

  • URLhttps://ds9pvd7kzuz0.ngrok.xiaomiqiu123.top/charging-piles/getById
  • 方法POST
  • Content-Typeapplication/json
  • 请求体

json

1
2
3
{
"id": 2
}

响应

  • 状态码200 OK

成功响应的 JSON 示例

json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"code": 200,
"msg": "成功",
"total": 1,
"data": {
"chargingPileId": 2,
"location": "789 Pine Blvd",
"status": "maintenance",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
}
}

字段说明

字段名 类型 描述
chargingPileId int 充电桩ID
location string 充电桩位置
status string 充电桩状态(maintenance、available、occupied)
type string 充电桩类型
power decimal 充电功率
voltage decimal 电压
current decimal 电流
connectorType string 充电接口类型
creationDate string 创建日期
lastMaintenanceDate string 最后维护日期
operator string 运营商
priceInfo decimal 价格信息

错误响应

  • 状态码400 Bad Request
  • 响应体

json

1
2
3
4
5
6
{
"code": 400,
"msg": "没有充电桩",
"total": 0,
"data": null
}

三、获取快充充电桩列表接口

描述

此接口用于获取当前没有被使用的快充充电桩的详细信息。

请求

  • URLhttps://ds9pvd7kzuz0.ngrok.xiaomiqiu123.top/charging-piles/lowCharge
  • 方法GET
  • 认证:不需要

响应

  • 状态码200 OK

成功响应的 JSON 示例

json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"code": 200,
"msg": "成功",
"total": 2,
"data": [
{
"chargingPileId": 1,
"location": "789 Pine Blvd",
"status": "维护",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:23",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
},
{
"chargingPileId": 2,
"location": "789 Pine Blvd",
"status": "维护",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
}
]
}

字段说明

字段名 类型 描述
chargingPileId int 充电桩ID
location string 充电桩位置
status string 充电桩状态(维护、可用、占用)
type string 充电桩类型
power decimal 充电功率
voltage decimal 电压
current decimal 电流
connectorType string 充电接口类型
creationDate string 创建日期
lastMaintenanceDate string 最后维护日期
operator string 运营商
priceInfo decimal 价格信息

错误响应

  • 状态码400
  • 响应体

json

1
2
3
4
5
6
{
"code": 400,
"msg": "No FastChargeCharging",
"total": 0,
"data": null
}

四、获取慢充电桩列表接口

描述

此接口用于获取当前没有被使用的慢充充电桩的详细信息。

请求

  • URLhttps://ds9pvd7kzuz0.ngrok.xiaomiqiu123.top/charging-piles/lowCharge
  • 方法GET
  • 认证:不需要

响应

  • 状态码200 OK

成功响应的 JSON 示例

json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"code": 200,
"msg": "成功",
"total": 2,
"data": [
{
"chargingPileId": 1,
"location": "789 Pine Blvd",
"status": "维护",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:23",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
},
{
"chargingPileId": 2,
"location": "789 Pine Blvd",
"status": "维护",
"type": "Tesla Supercharger",
"power": 120.00,
"voltage": 480.00,
"current": 200.00,
"connectorType": "Tesla",
"creationDate": "2024-11-13T18:54:34",
"lastMaintenanceDate": null,
"operator": "Tesla Energy",
"priceInfo": 0.20
}
]
}

字段说明

字段名 类型 描述
chargingPileId int 充电桩ID
location string 充电桩位置
status string 充电桩状态(维护、可用、占用)
type string 充电桩类型
power decimal 充电功率
voltage decimal 电压
current decimal 电流
connectorType string 充电接口类型
creationDate string 创建日期
lastMaintenanceDate string 最后维护日期
operator string 运营商
priceInfo decimal 价格信息

错误响应

  • 状态码:`400
  • 响应体

json

1
2
3
4
5
6
{
"code": 400,
"msg": "No LowChargeCharging",
"total": 0,
"data": null
}