# 下载 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
{}
```
