> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sunnymeteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 场站信息维护

> 光伏/风电场站增删改查

## 接口概述

维护场站主数据（名称、类型、经纬度、装机、倾角等）。采集层会按坐标聚合去重后再请求 Open-Meteo。

| 项目 | 说明 |
| - | - |
| 覆盖范围 | 用户自定义场站（全球坐标均可登记；卫星辐照度主要覆盖东亚 Himawari 范围） |
| 更新频率 | 即时读写；不涉及定时下载 |
| 时区 | 业务时间多为北京时间；场站预报库内为 UTC，响应同时提供本地时间 |
| 鉴权 | 请求头 `X-API-Key`；需开通对应模块权限 |

### 相关参考

* [辐照度实况](https://docs.sunnymeteo.com/zh/products/power-condition.md)
* [小时预报](https://docs.sunnymeteo.com/zh/products/power-hourly.md)

## 接口列表

| 方法 | 路径 | 说明 |
| - | - | - |
| GET | `/v1/power/stations` | 列表 |
| GET | `/v1/power/stations/{station_id}` | 详情 |
| POST | `/v1/power/stations` | 新增 |
| PATCH | `/v1/power/stations/{station_id}` | 更新 |
| DELETE | `/v1/power/stations/{station_id}` | 删除（默认软删） |

### GET 列表参数

| 参数 | 类型 | 说明 |
| - | - | - |
| `station_type` | string | `pv` / `wind` |
| `is_active` | boolean | 是否有效 |
| `limit` | integer | 1–1000，默认 200 |
| `offset` | integer | 默认 0 |

### POST Body

| 字段英文名 | 类型 | 单位 | 中文名 |
| - | - | - | - |
| `station_alias` | string | — | 内部别名（必填，唯一） |
| `station_name` | string | — | 名称（必填） |
| `station_type` | string | — | `pv` 或 `wind`（必填） |
| `latitude` | number | ° | 纬度（必填） |
| `longitude` | number | ° | 经度（必填） |
| `capacity_mw` | number | MW | 装机容量 |
| `tilt` | number | ° | 光伏倾角，空则下载默认 45 |
| `azimuth` | number | ° | 方位角 |
| `owner` | string | — | 业主 |
| `user_id` | string | — | 用户标识 |
| `is_active` | boolean | — | 是否有效，默认 true |
| `is_power` | boolean | — | 是否做功率预测，默认 false；为 false 时 hourly/15min 的 `power` 为空 |

### DELETE 参数

| 参数 | 说明 |
| - | - |
| `hard=true` | 物理删除；默认软删（`is_active=false`） |

### 响应场站对象

| 字段英文名 | 类型 | 单位 | 中文名 |
| - | - | - | - |
| `station_id` | integer | — | 场站 ID（管理用） |
| `station_alias` | string | — | 内部别名 |
| `station_name` | string | — | 场站名称 |
| `station_type` | string | — | 类型：`pv` / `wind` |
| `latitude` | number | ° | 纬度 |
| `longitude` | number | ° | 经度 |
| `capacity_mw` | number | MW | 装机容量 |
| `tilt` | number | ° | 光伏倾角 |
| `azimuth` | number | ° | 方位角（0=南） |
| `is_power` | boolean | — | 是否做功率预测 |
| `distance_km` | number | km | 按经纬度查询时的距离 |
| `is_active` | boolean | — | 是否有效 |
| `created_at` | string | ISO8601 | 创建时间 |
| `updated_at` | string | ISO8601 | 更新时间 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.