---
# System prepended metadata

title: 方案管理

---

# 方案管理

### (OK)[管理] 查看方案列表

Request:

    GET /plan?$queryParams

[Query Params:](Untitled%209/Query%20Params.csv)

Response (成功):

```json=
    {
      "success": true,
      "total": "總數量 <number>",
      "data": [
        {
          "id": "方案編號 <string>",
          "name": "方案名稱 <string>",
          "limit": "授權人數 <number>",
          "updatedAt": "更新時間 <number, bigint>"
        },
        ...
      ]
    }
```
### (OK)查看方案

Request:

    GET /plan/$id

Response (成功):

```json=
    {
      "success": true,
      "data": {
          "id": "方案編號 <string>",
          "name": "方案名稱 <string>",
          "limit": "授權人數 <number>",
          "updatedAt": "更新時間 <number, bigint>"
      } 
    }
```

### (OK)[管理] 新增方案

Request:

    POST /plan

Payload:

```json=
    {
      "id": "方案編號 <string>",
      "name": "方案名稱 <string>",
      "limit": "授權人數 <number>"
    }
```

Response (成功):

```json=
    {
      "success": true,
      "data": {
          "id": "方案編號 <string>",
          "name": "方案名稱 <string>",
          "limit": "授權人數 <number>",
          "updatedAt": "更新時間 <number, bigint>"
      }
    }
```

### (OK)[管理] 編輯方案

Request:

    PUT /plan/$id

Payload:

```json=
    {
      "name": "方案名稱 <string>",
      "limit": "授權人數 <number>"
    }
```

Response (成功):

```json=
    {
      "success": true,
      "data": {
          "id": "方案編號 <string>",
          "name": "方案名稱 <string>",
          "limit": "授權人數 <number>",
          "updatedAt": "更新時間 <number, bigint>"
      }
    }
```

### (OK)[管理] 移除方案

Request:

    DEL /plan/$id

Response (成功):

```json=
    {
      "success": true,
      "data": {}
    }
```