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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 下载报告

> 使用报告 ID 检索已生成报告的下载链接。

> [!WARNING]
>
> **Endpoint 近期更新**
>
> 此 endpoint 近期已更新到版本 2（参见 URL 中的“V2”）。版本 1 已弃用，建议您尽快切换到 V2。

要检索文件内容，请使用您的 API 凭证访问报告对象 `id` 所指定的文件。

> [!NOTE]
>
> **下载报告**
>
> API 响应将包含一个用于下载报告的链接。在浏览器中打开该链接即可访问数据。

浏览以下链接，查看各种报告示例：

> [card] [支付](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-payments-csv.zip)

> [card] [结算与费用](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-settlement-fees-report.csv.zip)

> [card] [结算 payout](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-settlement-payouts-report.csv.zip)

> [card] [交易报告](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-transaction-report-csv.zip)

> [card] [对账概览](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-reconciliation-overview-report.csv.zip)

> [card] [通信](https://github.com/yuno-payments/yuno-docs/raw/refs/heads/main/raw-files/report-examples/example-communications-csv.zip)


## OpenAPI

````yaml openapi/zh-hans/reports/download-a-report.json GET /reports/{report_id}/download 
openapi: 3.1.0
info:
  title: reports-download-a-report-v2
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v2
  - url: https://api.y.uno/v2
security:
  - sec0: []
    sec1: []
paths:
  /reports/{report_id}/download:
    get:
      summary: 下载报表
      operationId: download-a-report
      parameters:
        - name: X-Organization-Code
          in: header
          required: true
          schema:
            type: string
          description: 与请求关联的组织代码。
        - name: report_id
          in: path
          required: true
          description: 报表的唯一标识符。
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    type: TRANSACTIONS
                    download_link: https://s3.amazonaws.com/.../report.csv
                    status: AVAILABLE
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: TRANSACTIONS
                  download_link:
                    type: string
                    example: https://s3.amazonaws.com/.../report.csv
                  status:
                    type: string
                    example: AVAILABLE
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Bad Request:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - Invalid request
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_CREDENTIALS
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid credentials
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````

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