# 下載 EDINET 文件

**API:** Data API

**Endpoint:** `GET /v1/beta/edinet/documents/{docID}`

**Tags:** EDINET

下載透過 get_edinet_documents 中的 docID 指定的申報。type=1 傳回 ZIP 封存檔，type=2 傳回 PDF。解析前請檢查 Content-Type：檔案回應為二進位，而錯誤回應可能是 JSON。

### 計費參考

- 計量方式：以成功請求為固定成本基礎。
- 參考請求估算：1e-05 美元。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 Felo 額度。最終費用依 Felo 計費記錄為準。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `docID` | path | yes | string | 來自文件清單 API 的文件管理識別碼。 |
| `type` | query | yes | integer, enum: 1, 2, 3, 4, 5 | 要下載的檔案類型：1 表示申報本文與稽核報告 ZIP，2 表示 PDF，3 表示替代文件與附件 ZIP，4 表示英文文件 ZIP，5 表示由 XBRL 轉換的 CSV ZIP。 |

## Responses

### 200 — 依 Content-Type 傳回二進位 ZIP/PDF 檔案內容或 JSON 錯誤內容。

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
```

**application/octet-stream**

Schema: string, (binary)

```json
{
  "type": "string",
  "format": "binary"
}
```

**application/pdf**

Schema: string, (binary)

```json
{
  "type": "string",
  "format": "binary"
}
```

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```
