{
  "openapi": "3.0.3",
  "info": {
    "title": "Synleap Open API",
    "version": "1.1",
    "description": "Synleap Open API v1.1。使用用户名和密码登录获取 Token，设备指令响应直接返回设备结果。",
    "x-last-modified": "2026-11-13",
    "x-error-codes": [
      {
        "httpStatus": 401,
        "code": "1050041000",
        "description": "Token 不能用于 /open-api 以外的接口"
      },
      {
        "httpStatus": 401,
        "code": "1050041001",
        "description": "Token 无效或不存在"
      },
      {
        "httpStatus": 401,
        "code": "1050041002",
        "description": "Token 已吊销"
      },
      {
        "httpStatus": 401,
        "code": "1050041003",
        "description": "access token 已过期，请刷新后重试一次"
      },
      {
        "httpStatus": 401,
        "code": "1050041004",
        "description": "Token 所属账号已停用"
      },
      {
        "httpStatus": 403,
        "code": "1050041005",
        "description": "权限（scope）不足"
      },
      {
        "httpStatus": 403,
        "code": "1050041006",
        "description": "tenant-id 不匹配"
      },
      {
        "httpStatus": 403,
        "code": "1050041007",
        "description": "不允许携带 visit-tenant-id"
      },
      {
        "httpStatus": 429,
        "code": "1050041008",
        "description": "超出频率限制，请等待 Retry-After 指定的秒数后重试"
      },
      {
        "httpStatus": 400,
        "code": "1050030014",
        "description": "同一指令发送过于频繁"
      },
      {
        "httpStatus": 401,
        "code": "1050041012",
        "description": "refresh token 无效、已过期或已被使用，详见刷新规则"
      },
      {
        "httpStatus": 404,
        "code": "1050030006",
        "description": "充电桩不存在"
      },
      {
        "httpStatus": 400,
        "code": "1050030009",
        "description": "充电桩离线，无法发送设备指令"
      },
      {
        "httpStatus": 403,
        "code": "1050029000",
        "description": "无权访问该充电桩"
      },
      {
        "httpStatus": 403,
        "code": "1002015001",
        "description": "租户已停用"
      },
      {
        "httpStatus": 403,
        "code": "1002015002",
        "description": "租户已到期"
      },
      {
        "httpStatus": 401,
        "code": "1050041014",
        "description": "登录认证失败"
      },
      {
        "httpStatus": 504,
        "code": "1050041015",
        "description": "设备应答超时；保留 reqId 排查，请勿自动重发"
      }
    ]
  },
  "servers": [
    {
      "url": "https://console.synleapenergy.com"
    }
  ],
  "paths": {
    "/open-api/v1/token/login": {
      "post": {
        "operationId": "login-token",
        "tags": [
          "账户与认证"
        ],
        "summary": "登录获取 Token",
        "description": "使用用户名和密码获取 access token 和 refresh token。\n\n权限：无。limit 全局 30 次 / 分钟；每 IP 10 次 / 分钟；同一用户名失败 5 次后锁定 15 分钟。\n\naccess token 有效期 24 小时，refresh token 有效期 90 天。\n\n登录会签发一组新的 Token，请保存返回的两个 Token。",
        "security": [],
        "parameters": [
          {
            "name": "tenant-id",
            "in": "header",
            "required": false,
            "description": "用于区分跨租户同名用户；刷新时须与 Token 绑定租户一致。",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "accessToken": {
                          "type": "string",
                          "description": "访问 Token，用于调用业务接口。"
                        },
                        "refreshToken": {
                          "type": "string",
                          "description": "刷新 Token，用于获取新的 Token。"
                        },
                        "accessExpiresAt": {
                          "type": "integer",
                          "description": "access token 到期时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "refreshExpiresAt": {
                          "type": "integer",
                          "description": "refresh token 到期时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "accessToken": "sl_open_…",
                    "refreshToken": "sl_open_rt_…",
                    "accessExpiresAt": 1794484800000,
                    "refreshExpiresAt": 1802174400000
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userName": {
                    "type": "string",
                    "description": "用户名，最长 64 个字符。",
                    "maxLength": 64
                  },
                  "password": {
                    "type": "string",
                    "description": "密码，最长 72 个字符。",
                    "maxLength": 72
                  }
                },
                "required": [
                  "userName",
                  "password"
                ]
              },
              "example": {
                "userName": "YOUR_USERNAME",
                "password": "YOUR_PASSWORD"
              }
            }
          }
        },
        "x-error-codes": [
          {
            "httpStatus": 400,
            "code": "400",
            "description": "登录请求无效。请检查 userName、password 是否非空且未超长。"
          },
          {
            "httpStatus": 403,
            "code": "1050041007",
            "description": "不允许携带 visit-tenant-id"
          },
          {
            "httpStatus": 429,
            "code": "1050041008",
            "description": "超出频率限制，请等待 Retry-After 指定的秒数后重试"
          },
          {
            "httpStatus": 429,
            "code": "1050041010",
            "description": "账号同时存在token超过10个"
          },
          {
            "httpStatus": 401,
            "code": "1050041014",
            "description": "登录认证失败"
          },
          {
            "httpStatus": 503,
            "code": "500",
            "description": "服务暂时不可用，请稍后重试。"
          }
        ]
      }
    },
    "/open-api/v1/token/refresh": {
      "post": {
        "operationId": "refresh-token",
        "tags": [
          "账户与认证"
        ],
        "summary": "刷新 Token",
        "description": "使用 refresh token 换取一组新的 access token 和 refresh token。\n\n权限：无。limit 6 次 / 分钟。\n\naccess token 最长 24 小时，refresh token 最长 90 天。\n\n刷新后当前 refresh token 即失效，请立即保存响应中的新 Token 对。",
        "security": [],
        "parameters": [
          {
            "name": "tenant-id",
            "in": "header",
            "required": false,
            "description": "用于区分跨租户同名用户；刷新时须与 Token 绑定租户一致。",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "accessToken": {
                          "type": "string",
                          "description": "访问 Token，用于调用业务接口。"
                        },
                        "refreshToken": {
                          "type": "string",
                          "description": "刷新 Token，用于获取新的 Token。"
                        },
                        "accessExpiresAt": {
                          "type": "integer",
                          "description": "access token 到期时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "refreshExpiresAt": {
                          "type": "integer",
                          "description": "refresh token 到期时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "accessToken": "sl_open_…",
                    "refreshToken": "sl_open_rt_…",
                    "accessExpiresAt": 1793970000000,
                    "refreshExpiresAt": 1801659600000
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refreshToken": {
                    "type": "string",
                    "description": "当前有效的 refresh token。"
                  }
                },
                "required": [
                  "refreshToken"
                ]
              },
              "example": {
                "refreshToken": "YOUR_REFRESH_TOKEN"
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers": {
      "get": {
        "operationId": "list-chargers",
        "tags": [
          "充电桩"
        ],
        "summary": "获取充电桩列表",
        "description": "分页获取充电桩。\n\n权限：read。limit 60 / 每分钟。\n\n未绑定站点的充电桩不会出现在列表中。",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "pageNo",
            "in": "query",
            "required": false,
            "description": "页码。",
            "schema": {
              "type": "integer",
              "description": "页码。"
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "每页条数，默认 20；充电桩列表最大 200。",
            "schema": {
              "type": "integer",
              "description": "每页条数，默认 20；充电桩列表最大 200。"
            },
            "example": 20
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "充电桩档案 ID。"
                              },
                              "sn": {
                                "type": "string",
                                "description": "充电桩序列号。"
                              },
                              "name": {
                                "type": "string",
                                "description": "充电桩名称。"
                              },
                              "model": {
                                "type": "string",
                                "description": "充电桩型号。"
                              },
                              "siteId": {
                                "type": "integer",
                                "description": "所属站点 ID。"
                              },
                              "connectorCount": {
                                "type": "integer",
                                "description": "枪口数量。"
                              },
                              "maxCurrentA": {
                                "type": "number",
                                "description": "最大电流，单位 A。"
                              },
                              "maxPowerKw": {
                                "type": "number",
                                "description": "最大功率，单位 kW。"
                              },
                              "chargingStatus": {
                                "type": "integer",
                                "description": "保留字段。"
                              },
                              "operationalStatus": {
                                "type": "integer",
                                "description": "保留字段。"
                              },
                              "firmwareVersion": {
                                "type": "string",
                                "description": "固件版本。"
                              }
                            }
                          },
                          "description": "当前页的记录列表。"
                        },
                        "total": {
                          "type": "integer",
                          "description": "符合查询条件的记录总数。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "list": [
                      {
                        "id": 1,
                        "sn": "CT26AADA",
                        "name": "Garage",
                        "model": "Synleap One",
                        "siteId": 1,
                        "connectorCount": 1,
                        "maxCurrentA": 32,
                        "maxPowerKw": 22,
                        "chargingStatus": 3,
                        "operationalStatus": 3,
                        "firmwareVersion": "example-version"
                      }
                    ],
                    "total": 1
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/state": {
      "get": {
        "operationId": "get-state",
        "tags": [
          "充电桩"
        ],
        "summary": "读取实时状态",
        "description": "读取云端缓存的最新实时数据，不会向充电桩下发请求。设备每五分钟定时上报实时状态；CP 状态改变、p_error 值变化或调用「查询设备状态」接口时也会更新。\n\n权限：read。limit 60 / 每分钟。\n\n如需最新读数，请调用「查询设备状态」接口（pow）。\n\ndeviceTs 为设备采样时间，receivedAt 为云端写入缓存的时间，均为毫秒级 Unix 时间戳。online=false 表示设备离线。\n\np_energy 为会话累计电量原值（kWh），pow 为功率（W），i_a/b/c 为电流（A），v_a/b/c 为电压（V）。",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "sn": {
                          "type": "string",
                          "description": "充电桩序列号。"
                        },
                        "cid": {
                          "type": "integer",
                          "description": "充电枪编号，从 1 开始。"
                        },
                        "online": {
                          "type": "boolean",
                          "description": "设备是否在线。"
                        },
                        "deviceTs": {
                          "type": "integer",
                          "description": "设备采样时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "receivedAt": {
                          "type": "integer",
                          "description": "云端接收数据的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "dataError": {
                          "type": "boolean",
                          "description": "是否为设备失败应答；true 表示 data 为错误结果，null 按 false 处理。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "设备侧会话 ID；−1 表示无会话。"
                            },
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 服务未初始化，−3 获取失败。"
                            },
                            "cid": {
                              "type": "integer",
                              "description": "充电枪编号，从 1 开始。"
                            },
                            "cp": {
                              "type": "integer",
                              "description": "CP 状态：0/1 未连接车辆，2/3 车辆已连接但未就绪，4 车辆就绪、桩暂停，5 充电中。"
                            },
                            "pp": {
                              "type": "number",
                              "description": "PP 电缆容量，单位 A。"
                            },
                            "pwm": {
                              "type": "number",
                              "description": "CP PWM 占空比，单位 %。"
                            },
                            "i_set": {
                              "type": "number",
                              "description": "下板当前设置电流，单位 A。"
                            },
                            "auth_set": {
                              "type": "boolean",
                              "description": "下板当前授权回写：true 已授权，false 未授权。"
                            },
                            "out_set": {
                              "type": "integer",
                              "description": "期望输出模式：0 空闲，1 三相 TN，2/3/4 单相 TN A/B/C，5 单相 IT，6 三相 IT，7 未设定或清除。"
                            },
                            "v_a": {
                              "type": "number",
                              "description": "A 相电压，单位 V。"
                            },
                            "v_b": {
                              "type": "number",
                              "description": "B 相电压，单位 V。"
                            },
                            "v_c": {
                              "type": "number",
                              "description": "C 相电压，单位 V。"
                            },
                            "i_a": {
                              "type": "number",
                              "description": "A 相电流，单位 A。"
                            },
                            "i_b": {
                              "type": "number",
                              "description": "B 相电流，单位 A。"
                            },
                            "i_c": {
                              "type": "number",
                              "description": "C 相电流，单位 A。"
                            },
                            "pow": {
                              "type": "number",
                              "description": "实时功率，单位 W。"
                            },
                            "forward_energy": {
                              "type": "number",
                              "description": "表计正向历史累计电量原值，单位 kWh。"
                            },
                            "reverse_energy": {
                              "type": "number",
                              "description": "表计反向历史累计电量原值，单位 kWh。"
                            },
                            "p_energy": {
                              "type": "number",
                              "description": "会话累计电量原值，单位 kWh。"
                            },
                            "relay": {
                              "type": "integer",
                              "description": "继电器反馈位图。"
                            },
                            "p_error": {
                              "type": "integer",
                              "description": "功率板错误位图；0 表示正常，故障位含义见功率板错误说明。"
                            },
                            "p_output": {
                              "type": "integer",
                              "description": "实际输出模式：0 空闲，1 三相 TN，2/3/4 单相 TN A/B/C，5 单相 IT，6 三相 IT，7 未设定。"
                            },
                            "energy_set": {
                              "type": "number",
                              "description": "目标电量设定值。"
                            },
                            "grid_sys": {
                              "type": "integer",
                              "description": "电网类型：0 未识别，1 TN 单相，2 TN 三相，3 IT 单相，4 IT 三相。"
                            },
                            "volt_sag": {
                              "type": "boolean",
                              "description": "是否处于掉电维持态。"
                            },
                            "lock_mode": {
                              "type": "integer",
                              "description": "枪锁模式：0 默认（结束或拔枪自动解锁），1 永久锁。"
                            },
                            "lock_status": {
                              "type": "boolean",
                              "description": "枪锁状态：true 已锁定，false 已释放。"
                            }
                          },
                          "description": "设备应答数据。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "sn": "CT26AADA",
                    "cid": 1,
                    "online": true,
                    "deviceTs": 1793952000000,
                    "receivedAt": 1793952000200,
                    "dataError": false,
                    "data": {
                      "id": -1,
                      "code": 0,
                      "cid": 1,
                      "cp": 4,
                      "pp": 32,
                      "pwm": 100,
                      "i_set": 0,
                      "auth_set": false,
                      "out_set": 0,
                      "v_a": 227.8641968,
                      "v_b": 232.5397949,
                      "v_c": 230.9609985,
                      "i_a": 0,
                      "i_b": 0,
                      "i_c": 0,
                      "pow": 0,
                      "forward_energy": 6.909863949,
                      "reverse_energy": 0.029999999,
                      "p_energy": 0,
                      "relay": 256,
                      "p_error": 0,
                      "p_output": 0,
                      "energy_set": 0,
                      "grid_sys": 2,
                      "volt_sag": false,
                      "lock_mode": 0,
                      "lock_status": false
                    }
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/pow": {
      "post": {
        "operationId": "get-pow",
        "tags": [
          "充电桩"
        ],
        "summary": "查询设备状态",
        "description": "查询设备最新数据。\n\n权限：read。limit 6 / 每分钟。\n\n同一充电枪两次请求的间隔不得少于 5 秒。本接口只需 read 权限，但会占用 control 配额。\n\n设备成功应答后会同步更新「读取实时状态」接口的缓存。实时数据包含 pow、i_a、v_a 等字段。\n\n本接口建议配合「读取实时状态」接口使用。\n\ndata.data.code：0 成功，−1 参数非法，−2 未初始化，−3 通用失败。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 服务未初始化，−3 获取失败。"
                            },
                            "cid": {
                              "type": "integer",
                              "description": "充电枪编号，从 1 开始。"
                            },
                            "id": {
                              "type": "integer",
                              "description": "设备侧会话 ID；−1 表示无会话。"
                            },
                            "cp": {
                              "type": "integer",
                              "description": "CP 状态：0/1 未连接车辆，2/3 车辆已连接但未就绪，4 车辆就绪、桩暂停，5 充电中。"
                            },
                            "pp": {
                              "type": "number",
                              "description": "PP 电缆容量，单位 A。"
                            },
                            "pwm": {
                              "type": "number",
                              "description": "CP PWM 占空比，单位 %。"
                            },
                            "i_set": {
                              "type": "number",
                              "description": "下板当前设置电流，单位 A。"
                            },
                            "auth_set": {
                              "type": "boolean",
                              "description": "下板当前授权回写：true 已授权，false 未授权。"
                            },
                            "out_set": {
                              "type": "integer",
                              "description": "期望输出模式：0 空闲，1 三相 TN，2/3/4 单相 TN A/B/C，5 单相 IT，6 三相 IT，7 未设定或清除。"
                            },
                            "v_a": {
                              "type": "number",
                              "description": "A 相电压，单位 V。"
                            },
                            "v_b": {
                              "type": "number",
                              "description": "B 相电压，单位 V。"
                            },
                            "v_c": {
                              "type": "number",
                              "description": "C 相电压，单位 V。"
                            },
                            "i_a": {
                              "type": "number",
                              "description": "A 相电流，单位 A。"
                            },
                            "i_b": {
                              "type": "number",
                              "description": "B 相电流，单位 A。"
                            },
                            "i_c": {
                              "type": "number",
                              "description": "C 相电流，单位 A。"
                            },
                            "pow": {
                              "type": "number",
                              "description": "实时功率，单位 W。"
                            },
                            "forward_energy": {
                              "type": "number",
                              "description": "表计正向历史累计电量原值，单位 kWh。"
                            },
                            "reverse_energy": {
                              "type": "number",
                              "description": "表计反向历史累计电量原值，单位 kWh。"
                            },
                            "p_energy": {
                              "type": "number",
                              "description": "会话累计电量原值，单位 kWh。"
                            },
                            "relay": {
                              "type": "integer",
                              "description": "继电器反馈位图。"
                            },
                            "p_error": {
                              "type": "integer",
                              "description": "功率板错误位图；0 表示正常，故障位含义见功率板错误说明。"
                            },
                            "p_output": {
                              "type": "integer",
                              "description": "实际输出模式：0 空闲，1 三相 TN，2/3/4 单相 TN A/B/C，5 单相 IT，6 三相 IT，7 未设定。"
                            },
                            "energy_set": {
                              "type": "number",
                              "description": "目标电量设定值。"
                            },
                            "grid_sys": {
                              "type": "integer",
                              "description": "电网类型：0 未识别，1 TN 单相，2 TN 三相，3 IT 单相，4 IT 三相。"
                            },
                            "volt_sag": {
                              "type": "boolean",
                              "description": "是否处于掉电维持态。"
                            },
                            "lock_mode": {
                              "type": "integer",
                              "description": "枪锁模式：0 默认（结束或拔枪自动解锁），1 永久锁。"
                            },
                            "lock_status": {
                              "type": "boolean",
                              "description": "枪锁状态：true 已锁定，false 已释放。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "pow/get",
                    "data": {
                      "code": 0,
                      "cid": 1,
                      "id": 12,
                      "cp": 5,
                      "pp": 32,
                      "pwm": 26,
                      "i_set": 16,
                      "auth_set": true,
                      "out_set": 1,
                      "v_a": 220.1,
                      "v_b": 219.8,
                      "v_c": 220.4,
                      "i_a": 15.8,
                      "i_b": 15.7,
                      "i_c": 15.9,
                      "pow": 10420,
                      "forward_energy": 1250,
                      "reverse_energy": 0,
                      "p_energy": 1.25,
                      "relay": 256,
                      "p_error": 0,
                      "p_output": 1,
                      "energy_set": 0,
                      "grid_sys": 2,
                      "volt_sag": false,
                      "lock_mode": 0,
                      "lock_status": true
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  }
                },
                "required": [
                  "cid"
                ]
              },
              "example": {
                "cid": 1
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/soc": {
      "post": {
        "operationId": "get-soc",
        "tags": [
          "充电桩"
        ],
        "summary": "查询设备 SOC",
        "description": "查询车辆通过 ISO 15118 上报的需求电量（EAmount）。\n\n权限：read。limit 6 / 每分钟。\n\nEAmount仅在车辆支持 ISO 15118 时可用。\n\n本接口只需 read 权限，但会占用 control 配额。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "EAmount": {
                              "type": "number",
                              "description": "车辆请求的电量，单位 Wh；可为 null。",
                              "nullable": true
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "soc/get",
                    "data": {
                      "EAmount": 10000
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/limit": {
      "post": {
        "operationId": "set-limit",
        "tags": [
          "充电控制"
        ],
        "summary": "设置电流限值",
        "description": "调整当前充电会话的电流上限，或在不结束会话的情况下暂停充电。\n\n权限：control。limit 60 / 每分钟。\n\ncurr=0 生效后，cp 通常变为 4（充电桩暂停）。\n\n实际使用电流还受 APP 中配置的 circuit 和充电桩最大电流限制，设置值不得超过其中较低的限制。\n\ndata.data.code：0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "charge/set",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "curr": {
                    "type": "integer",
                    "description": "取值范围 −1～64 A。0 表示暂停充电但不结束会话；−1 表示解除本次会话的限流。",
                    "minimum": -1,
                    "maximum": 64
                  }
                },
                "required": [
                  "cid",
                  "curr"
                ]
              },
              "example": {
                "cid": 1,
                "curr": 8
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/phase": {
      "post": {
        "operationId": "set-phase",
        "tags": [
          "充电控制"
        ],
        "summary": "设置相位",
        "description": "设置本次充电会话的输出相位。若充电桩已在 APP 配置输出相位（例如 L1），则不能通过本接口设置临时相位覆盖该配置。\n\n权限：control。limit 1 / 每分钟。\n\n建议单次会话跳相次数不要超过五次。\n\ndata.data.code：0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "charge/set",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "out": {
                    "type": "integer",
                    "description": "out：−1 默认，1 三相，2 单相 A，3 单相 B，4 单相 C。",
                    "enum": [
                      -1,
                      1,
                      2,
                      3,
                      4
                    ]
                  }
                },
                "required": [
                  "cid",
                  "out"
                ]
              },
              "example": {
                "cid": 1,
                "out": 1
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/charge-start": {
      "post": {
        "operationId": "start-charge",
        "tags": [
          "充电控制"
        ],
        "summary": "启动充电",
        "description": "向指定充电枪下发启动充电指令。\n\n权限：control。limit 6 / 每分钟。\n\n未插枪或设备未就绪时，设备可能拒绝启动。请求被受理不代表充电已经开始。实际使用电流仍受 APP 配置的 circuit 和充电桩最大电流限制。\n\ndata.data.code：0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。\n\ncurr 和 out 均为可选参数，不传则保持原值。实际使用电流受 APP 配置的 circuit 和充电桩最大电流限制；已配置输出相位时，不能用临时相位覆盖。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "charge/set",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "curr": {
                    "type": "integer",
                    "description": "可选，本次会话电流上限，范围 −1～64 A；−1 表示不额外限流，0 暂停供电。不传则保持现有电流选择。实际使用电流还受 APP 中配置的 circuit 和充电桩最大电流限制，本接口设置值不得超过这些限制。",
                    "minimum": -1,
                    "maximum": 64
                  },
                  "out": {
                    "type": "integer",
                    "description": "可选，out：−1 默认，1 三相，2 单相 A，3 单相 B，4 单相 C；不传则保持现有相位选择。",
                    "enum": [
                      -1,
                      1,
                      2,
                      3,
                      4
                    ]
                  }
                },
                "required": [
                  "cid"
                ]
              },
              "example": {
                "cid": 1,
                "curr": 16,
                "out": 1
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/charge-stop": {
      "post": {
        "operationId": "stop-charge",
        "tags": [
          "充电控制"
        ],
        "summary": "停止充电",
        "description": "向指定充电枪下发停止充电指令。\n\n权限：control。limit 6 / 每分钟。\n\n停止充电后，充电会话将结束。\n\n如需暂停充电但保留会话，请调用「设置电流限值」并传入 curr=0。\n\ndata.data.code：0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "charge/set",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  }
                },
                "required": [
                  "cid"
                ]
              },
              "example": {
                "cid": 1
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/config": {
      "get": {
        "operationId": "get-config",
        "tags": [
          "指令与配置"
        ],
        "summary": "获取充电限制",
        "description": "获取当前的电流限制和相位输出和授权状态。\n\n权限：read。limit 6 / 每分钟。\n\ndata.data.code：0 成功，−1 通用失败。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 失败。"
                            },
                            "cid": {
                              "type": "integer",
                              "description": "充电枪编号，从 1 开始。"
                            },
                            "auth": {
                              "type": "boolean",
                              "description": "当前枪口的用户授权设置。"
                            },
                            "curr": {
                              "type": "number",
                              "description": "已设置的会话电流上限（A）；−1 表示不限流，0 表示暂停供电。"
                            },
                            "out": {
                              "type": "integer",
                              "description": "已受理的相位选择：−1 默认或未设置，1 三相，2 单相 A，3 单相 B，4 单相 C。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "charge/get",
                    "data": {
                      "code": 0,
                      "cid": 1,
                      "auth": true,
                      "curr": 16,
                      "out": 1
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/sessions": {
      "get": {
        "operationId": "list-sessions",
        "tags": [
          "充电会话"
        ],
        "summary": "查询充电会话",
        "description": "分页查询进行中和历史充电会话，包含起止时间和充电电量。\n\n权限：read。limit 60 / 每分钟。\n\nstartTime 和 endTime 须同时提供，均为毫秒级 Unix 时间戳；建议始终指定时间范围。endTs=null 表示会话仍在进行。startEnergy 和 endEnergy 为会话开始和结束时的电表累计读数，energy 为本次会话电量（kWh）。",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "开始时间，毫秒级 Unix 时间戳；须与 endTime 同时提供。",
            "schema": {
              "type": "integer",
              "description": "开始时间，毫秒级 Unix 时间戳；须与 endTime 同时提供。",
              "format": "int64",
              "minimum": 0
            },
            "example": 1793894400000
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "description": "结束时间，毫秒级 Unix 时间戳；须与 startTime 同时提供。",
            "schema": {
              "type": "integer",
              "description": "结束时间，毫秒级 Unix 时间戳；须与 startTime 同时提供。",
              "format": "int64",
              "minimum": 0
            },
            "example": 1793980800000
          },
          {
            "name": "pageNo",
            "in": "query",
            "required": false,
            "description": "页码。",
            "schema": {
              "type": "integer",
              "description": "页码。"
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "每页条数，默认 20；充电桩列表最大 200。",
            "schema": {
              "type": "integer",
              "description": "每页条数，默认 20；充电桩列表最大 200。"
            },
            "example": 20
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "会话记录 ID。"
                              },
                              "sessionId": {
                                "type": "integer",
                                "description": "设备侧会话 ID；−1 表示无会话。"
                              },
                              "deviceSn": {
                                "type": "string",
                                "description": "充电桩序列号。"
                              },
                              "cid": {
                                "type": "integer",
                                "description": "充电枪编号，从 1 开始。"
                              },
                              "startTs": {
                                "type": "integer",
                                "description": "会话开始时间，毫秒级 Unix 时间戳。",
                                "format": "int64",
                                "minimum": 0
                              },
                              "endTs": {
                                "nullable": true,
                                "description": "会话结束时间，毫秒级 Unix 时间戳；进行中为 null。",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "startReason": {
                                "type": "integer",
                                "description": "开始原因：0 未知，1 D-Bus，2 BLE，3 MQTT，4 RFID，5 OCPP，6 车辆连接，7 UI，8 即插即充，9 预约。"
                              },
                              "endReason": {
                                "nullable": true,
                                "description": "结束原因：0 未知，1 D-Bus，2 BLE，3 MQTT，4 RFID，5 OCPP，6 故障，7 车辆断开，8 UI，9 预约；进行中可为空。",
                                "type": "integer"
                              },
                              "startEnergy": {
                                "type": "number",
                                "description": "开始时累计电量快照，单位 kWh。"
                              },
                              "endEnergy": {
                                "nullable": true,
                                "description": "结束时累计电量快照，单位 kWh。",
                                "type": "number"
                              },
                              "energy": {
                                "type": "number",
                                "description": "本次会话电量，单位 kWh。"
                              },
                              "status": {
                                "type": "integer",
                                "description": "会话状态：0=充电中，1=已结束，2=异常。"
                              }
                            }
                          },
                          "description": "当前页的记录列表。"
                        },
                        "total": {
                          "type": "integer",
                          "description": "符合查询条件的记录总数。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "list": [
                      {
                        "id": 1,
                        "sessionId": 12,
                        "deviceSn": "CT26AADA",
                        "cid": 1,
                        "startTs": 1793980800000,
                        "endTs": null,
                        "startReason": 0,
                        "endReason": null,
                        "startEnergy": 1250,
                        "endEnergy": null,
                        "energy": 0.5,
                        "status": 1
                      }
                    ],
                    "total": 1
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/open-api/v1/platform/keep-alive": {
      "post": {
        "operationId": "keep-alive",
        "tags": [
          "充电控制"
        ],
        "summary": "在线维持",
        "description": "调用此接口后，当前账号下的所有充电桩都会进入第三方系统管理状态。\n\n权限：control。\n\n超过 5 分钟未调用此接口，该账号下的所有充电桩都会进入离线电流充电。\n\n可通过「配置离线电流」接口，为每台充电桩单独设置离线充电电流。\n\n建议每 1 分钟调用一次。",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "code": 0
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/fallback": {
      "post": {
        "operationId": "set-fallback",
        "tags": [
          "充电控制"
        ],
        "summary": "配置离线电流",
        "description": "设置进入 fallback 状态时使用的充电电流。\n\n权限：control。limit 6 / 每分钟。\n\n「在线维持」接口超过 5 分钟未调用时，充电桩使用此电流充电。\n\ndata.data.code：0 成功，−1 参数非法，−2 不支持，−3 未初始化，−4 繁忙，−5 通用失败。\n\n此接口10秒内只可调用一次。",
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string",
                          "description": "本次设备指令的请求编号，用于排查问题。"
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "0 成功，−1 参数非法，−2 不支持，−3 未初始化，−4 繁忙，−5 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "reqId": "9f8b3c21",
                    "cmd": "backplate/set",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1793952000200
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fallback": {
                    "type": "number",
                    "description": "fallback 状态下使用的充电电流，单位 A。",
                    "minimum": 0
                  }
                },
                "required": [
                  "fallback"
                ]
              },
              "example": {
                "fallback": 6
              }
            }
          }
        }
      }
    },
    "/open-api/v1/chargers/{sn}/fallback-current": {
      "post": {
        "operationId": "fallback-current",
        "tags": [
          "已废弃接口"
        ],
        "summary": "设置离线电流",
        "description": "需要每 1 分钟调用一次接口，超过 5 分钟未调用此接口，充电桩进入 fallback 电流充电。\n\n权限：control。limit 6 / 每分钟。\n\n本接口已废弃。\n\n收到设备返回的 code: 0 后，才认为请求完成。\n\n此接口10秒内只可调用一次。",
        "deprecated": true,
        "x-client-read-timeout-seconds": 200,
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "path",
            "required": true,
            "description": "充电桩序列号。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "设备应答。带 code 的设备结果还须检查 data.data.code。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "description": "0 成功，−1 参数非法，−2 未初始化，−3 不支持，−4 繁忙，−5 通用失败。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "code": 0
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "504": {
            "description": "等待设备应答超时。不代表指令未执行，请勿自动重发。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "reqId": {
                          "type": "string"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 1050041015,
                  "data": {
                    "reqId": "9f8b3c21"
                  },
                  "msg": "Device did not respond within 180 seconds, the command timed out"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "description": "每次新调用使用唯一编号。",
                    "minLength": 1
                  },
                  "fallback": {
                    "type": "number",
                    "description": "表示离线时使用的电流，单位 A。",
                    "minimum": 0
                  }
                },
                "required": [
                  "requestId",
                  "fallback"
                ]
              },
              "example": {
                "requestId": "550e8400-e29b-41d4-a716-446655440000",
                "fallback": 16
              }
            }
          }
        }
      }
    },
    "/app-api/synleap/app/command/all": {
      "post": {
        "operationId": "legacy-all",
        "tags": [
          "已废弃接口"
        ],
        "summary": "启动或停止充电",
        "description": "向指定枪口下发启动或停止充电指令。\n\n请求受理后返回指令编号。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "string",
                      "description": "请求受理后返回指令编号。"
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": "cmd-20261021-xxxx",
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sn": {
                    "type": "string",
                    "description": "充电桩序列号，可从充电桩列表获取。"
                  },
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "auth": {
                    "type": "boolean",
                    "description": "true 启动充电，false 停止充电。"
                  },
                  "curr": {
                    "type": "number",
                    "description": "本次会话的最大电流（A），默认 −1。",
                    "minimum": -1
                  },
                  "out": {
                    "type": "integer",
                    "description": "本次会话相位：默认 −1；1 三相，2 单相 A，3 单相 B，4 单相 C。"
                  },
                  "tag": {
                    "type": "string",
                    "description": "充电启动标识。"
                  }
                },
                "required": [
                  "sn",
                  "cid",
                  "auth"
                ]
              },
              "example": {
                "sn": "AF43AAAA",
                "cid": 1,
                "auth": true,
                "curr": -1,
                "out": -1,
                "tag": "ORDER-20261021-0001"
              }
            }
          }
        }
      }
    },
    "/app-api/synleap/app/command/all/resp": {
      "get": {
        "operationId": "legacy-all-result",
        "tags": [
          "已废弃接口"
        ],
        "summary": "查询充电控制结果",
        "description": "使用下发时相同的 sn 和 cid 查询设备应答。\n\npending 等待设备应答；ready 已收到设备应答。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "query",
            "required": true,
            "description": "充电桩序列号，可从充电桩列表获取。",
            "schema": {
              "type": "string",
              "description": "充电桩序列号，可从充电桩列表获取。"
            },
            "example": "AF43AAAA"
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "pending 等待设备应答；ready 已收到设备应答。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "data.code：0 成功，≠0 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "status": "ready",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1792540800000,
                    "cmd": "cmd/all"
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/app-api/synleap/app/command/set-curr": {
      "post": {
        "operationId": "legacy-set-current",
        "tags": [
          "已废弃接口"
        ],
        "summary": "设置电流",
        "description": "设置本次充电会话的电流上限。\n\n请求受理后返回指令编号。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "string",
                      "description": "请求受理后返回指令编号。"
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": "cmd-20261021-xxxx",
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sn": {
                    "type": "string",
                    "description": "充电桩序列号，可从充电桩列表获取。"
                  },
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "curr": {
                    "type": "number",
                    "description": "本次会话的最大电流（A），默认 −1。",
                    "minimum": -1
                  }
                },
                "required": [
                  "sn",
                  "cid",
                  "curr"
                ]
              },
              "example": {
                "sn": "AF43AAAA",
                "cid": 1,
                "curr": -1
              }
            }
          }
        }
      }
    },
    "/app-api/synleap/app/command/set-curr/resp": {
      "get": {
        "operationId": "legacy-current-result",
        "tags": [
          "已废弃接口"
        ],
        "summary": "查询电流设置结果",
        "description": "使用下发时相同的 sn 和 cid 查询设备应答。\n\npending 等待设备应答；ready 已收到设备应答。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "query",
            "required": true,
            "description": "充电桩序列号，可从充电桩列表获取。",
            "schema": {
              "type": "string",
              "description": "充电桩序列号，可从充电桩列表获取。"
            },
            "example": "AF43AAAA"
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "pending 等待设备应答；ready 已收到设备应答。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "data.code：0 成功，≠0 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "status": "ready",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1792540800000,
                    "cmd": "cmd/set_curr"
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/app-api/synleap/app/command/set-output": {
      "post": {
        "operationId": "legacy-set-output",
        "tags": [
          "已废弃接口"
        ],
        "summary": "设置相位",
        "description": "设置本次充电会话的输出相位。\n\n请求受理后返回指令编号。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "string",
                      "description": "请求受理后返回指令编号。"
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": "cmd-20261021-xxxx",
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sn": {
                    "type": "string",
                    "description": "充电桩序列号，可从充电桩列表获取。"
                  },
                  "cid": {
                    "type": "integer",
                    "description": "充电枪编号，从 1 开始。",
                    "minimum": 1
                  },
                  "out": {
                    "type": "integer",
                    "description": "本次会话相位：默认 −1；1 三相，2 单相 A，3 单相 B，4 单相 C。"
                  }
                },
                "required": [
                  "sn",
                  "cid",
                  "out"
                ]
              },
              "example": {
                "sn": "AF43AAAA",
                "cid": 1,
                "out": 1
              }
            }
          }
        }
      }
    },
    "/app-api/synleap/app/command/set-output/resp": {
      "get": {
        "operationId": "legacy-output-result",
        "tags": [
          "已废弃接口"
        ],
        "summary": "查询相位设置结果",
        "description": "使用下发时相同的 sn 和 cid 查询设备应答。\n\npending 等待设备应答；ready 已收到设备应答。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "query",
            "required": true,
            "description": "充电桩序列号，可从充电桩列表获取。",
            "schema": {
              "type": "string",
              "description": "充电桩序列号，可从充电桩列表获取。"
            },
            "example": "AF43AAAA"
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "pending 等待设备应答；ready 已收到设备应答。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "data.code：0 成功，≠0 通用失败。"
                            }
                          },
                          "description": "设备应答数据。"
                        },
                        "timestamp": {
                          "type": "integer",
                          "description": "云端记录设备结果的时间，毫秒级 Unix 时间戳。",
                          "format": "int64",
                          "minimum": 0
                        },
                        "cmd": {
                          "type": "string",
                          "description": "设备命令名，例如 pow/get、charge/set、charge/get。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "status": "ready",
                    "data": {
                      "code": 0
                    },
                    "timestamp": 1792540800000,
                    "cmd": "cmd/set_output"
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    },
    "/app-api/synleap/app/charger/poll-pow": {
      "get": {
        "operationId": "legacy-poll-pow",
        "tags": [
          "已废弃接口"
        ],
        "summary": "获取充电桩数据",
        "description": "查询指定枪口的充电桩数据。\n\n本接口已废弃。",
        "deprecated": true,
        "security": [
          {
            "legacyBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sn",
            "in": "query",
            "required": true,
            "description": "充电桩序列号，可从充电桩列表获取。",
            "schema": {
              "type": "string",
              "description": "充电桩序列号，可从充电桩列表获取。"
            },
            "example": "AF43AAAA"
          },
          {
            "name": "cid",
            "in": "query",
            "required": true,
            "description": "充电枪编号，从 1 开始。",
            "schema": {
              "type": "integer",
              "description": "充电枪编号，从 1 开始。",
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功响应。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "sn": {
                          "type": "string",
                          "description": "充电桩序列号。"
                        },
                        "cid": {
                          "type": "integer",
                          "description": "充电枪编号，从 1 开始。"
                        },
                        "cached": {
                          "type": "boolean",
                          "description": "是否为缓存数据。"
                        },
                        "online": {
                          "type": "boolean",
                          "description": "设备是否在线。"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "integer",
                              "description": "data.code：0 成功，≠0 通用失败。"
                            },
                            "cid": {
                              "type": "integer",
                              "description": "充电枪编号，从 1 开始。"
                            },
                            "v_a": {
                              "type": "number",
                              "description": "A 相电压，单位 V。"
                            },
                            "v_b": {
                              "type": "number",
                              "description": "B 相电压，单位 V。"
                            },
                            "v_c": {
                              "type": "number",
                              "description": "C 相电压，单位 V。"
                            },
                            "i_a": {
                              "type": "number",
                              "description": "A 相电流，单位 A。"
                            },
                            "i_b": {
                              "type": "number",
                              "description": "B 相电流，单位 A。"
                            },
                            "i_c": {
                              "type": "number",
                              "description": "C 相电流，单位 A。"
                            },
                            "pow": {
                              "type": "number",
                              "description": "实时功率，单位 W。"
                            },
                            "p_energy": {
                              "type": "number",
                              "description": "会话累计电量原值，单位 kWh。"
                            },
                            "p_output": {
                              "type": "integer",
                              "description": "实际输出模式：0 空闲，1 三相 TN，2/3/4 单相 TN A/B/C，5 单相 IT，6 三相 IT，7 未设定。"
                            },
                            "p_error": {
                              "type": "integer",
                              "description": "功率板错误位图；0 表示正常，故障位含义见功率板错误说明。"
                            }
                          },
                          "description": "设备应答数据。"
                        }
                      }
                    },
                    "msg": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "code": 0,
                  "data": {
                    "sn": "AF43AAAA",
                    "cid": 1,
                    "cached": true,
                    "online": true,
                    "data": {
                      "code": 0,
                      "cid": 1,
                      "v_a": 230.5,
                      "v_b": 228.9,
                      "v_c": 231.2,
                      "i_a": 15.8,
                      "i_b": 15.6,
                      "i_c": 15.9,
                      "pow": 10920,
                      "p_energy": 3.42,
                      "p_output": 1,
                      "p_error": 0
                    }
                  },
                  "msg": ""
                }
              }
            }
          },
          "400": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "401": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "403": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "404": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "429": {
            "description": "超出配额，按 Retry-After 秒数等待。",
            "headers": {
              "Retry-After": {
                "description": "等待秒数。",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          },
          "503": {
            "description": "错误响应包含 code 和 msg；具体业务码参见接口文档。"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "legacyBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "旧版接口的 Bearer 凭证。"
      }
    }
  }
}
