> ## 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.

# 上传服务提供商徽标

> 为 Yuno 自有的服务提供商上传您自己的徽标。图片以 base64 形式放在 JSON 中传输，而不是 multipart。

为此服务提供商上传您自己的徽标。图片**以 base64 形式放在 JSON 中**传输，而不是 multipart。

> [!WARNING]
>
> 徽标是服务提供商的身份，而不是其文字，因此它遵循与 `name` 相同的规则：**仅接受 Yuno 自有的服务提供商**，即目录 id 中包含 `YUNO` 的服务提供商，例如 `YUNO_3DS` 或 `YUNO_FRAUD_SCREENING`。为其他任何服务提供商上传徽标都会被驳回并返回 `400`。

写入徽标不会影响说明覆盖，也不会将该服务提供商添加到您的允许列表中。

### 图片要求

| 规则 | 详情 |
| - | - |
| 格式 | PNG 或 JPEG，由**文件本身的字节**决定：重命名为 `.png` 的 SVG 会被拒绝。 |
| 形状 | 正方形。它会被绘制到与目录自身图标相同的固定框中。 |
| 最小尺寸 | 200x200 像素。 |
| 最大大小 | 解码后 64 KB。 |
| 请求体 | 最多 256 KB，包含 base64。更大的请求体会被驳回并返回 `413`。 |

### 路径参数

**provider\_id** `string` *required*

Yuno 目录中的服务提供商 id，采用 UPPER\_SNAKE\_CASE，并且必须是 Yuno 自有的服务提供商（id 中包含 `YUNO`）。不区分大小写：会被标准化为大写。

### 请求体

**file\_name** `string` *required*

原始文件名，最多 255 个字符。仅为显示而存储：格式由字节决定，从不由此扩展名决定。

**base64\_data** `string` *required*

图片本身，采用 base64 编码。

### 响应

**status** `string`

成功时始终为 `stored`。

存储的键不会被返回。请使用[检索服务提供商叠加层](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/retrieve-provider.md)再次读取该服务提供商，以获取新的预签名 `logo_url`，这是它唯一存在的 URL 类型。

```bash cURL theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
curl -X PUT 'https://api.y.uno/v1/whitelabel/providers/YUNO_3DS/logo' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "file_name": "acme.png",
    "base64_data": "<BASE64_ENCODED_IMAGE>"
  }'
```

```json 200 OK theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "status": "stored"
}
```

```json 400 — image too small theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "title": "Invalid provider logo",
  "status": 400,
  "detail": "The logo was rejected",
  "violations": [
    "The logo must be at least 200x200 pixels. This image is 1x1."
  ]
}
```

> [!NOTE]
>
> `violations` 会一次性列出图片的**所有**问题（尺寸、形状和格式一起列出），而不是每次往返只列出一个。

### 错误

| HTTP | 信封结构 | 触发时机 |
| - | - | - |
| `400` | `VALIDATION_ERROR` | `provider_id` 不是有效的目录 id。 |
| `400` | problem+json | 徽标被驳回：不是 PNG/JPEG、不是正方形、小于 200x200、解码后大于 64 KB、缺少字段，或该服务提供商不是 Yuno 自有的。 |
| `401` | `NOT_AUTHENTICATED` | API 密钥缺失或无效。 |
| `413` | — | 请求体大于 256 KB。 |


## OpenAPI

````yaml openapi/zh-hans/organizations/whitelabel/upload-provider-logo.json PUT /whitelabel/providers/{provider_id}/logo
openapi: 3.1.0
info:
  title: White-label Providers API - Upload Logo
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /whitelabel/providers/{provider_id}/logo:
    put:
      summary: 上传服务提供商 logo
      description: >-
        为该服务提供商上传您自己的 logo。图片以 base64 形式放在 JSON 中传输，而不是 multipart。


        Logo 代表服务提供商的身份，而不是措辞，因此与 `name` 适用相同的规则：仅接受 Yuno 自有的服务提供商（目录 ID 包含
        `YUNO`），对其他服务提供商会被拒绝并返回 `400`。文件必须是 PNG 或 JPEG（根据文件本身的字节判断，绝不根据扩展名，因此改名为
        `.png` 的 SVG 会被拒绝），必须为正方形，至少 200x200 像素，解码后最大 64 KB。被拒绝时，`violations`
        会一次性列出所有违规项。


        不会返回存储的键：请重新读取该服务提供商以获取新的预签名 `logo_url`。写入 logo
        不会影响说明覆盖，也不会将服务提供商加入您的允许列表。
      operationId: upload-whitelabel-provider-logo
      parameters:
        - name: provider_id
          in: path
          required: true
          description: UPPER_SNAKE_CASE 格式的 Yuno 目录服务提供商 ID。不区分大小写；会被规范化为大写。
          schema:
            type: string
            example: YUNO_3DS
      requestBody:
        required: true
        description: Logo，base64 编码。
        content:
          application/json:
            schema:
              type: object
              required:
                - file_name
                - base64_data
              properties:
                file_name:
                  type: string
                  maxLength: 255
                  description: 原始文件名，最多 255 个字符。仅用于显示存储；格式由字节决定，绝不由此扩展名决定。
                  example: acme-risk.png
                base64_data:
                  type: string
                  description: >-
                    图片本身，base64 编码。仅限 PNG 或 JPEG（根据文件的 magic bytes 检查），必须为正方形，至少
                    200x200 像素，解码后最大 64 KB。
                  example: >-
                    iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==
      responses:
        '200':
          description: Logo 已存储。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: 成功时始终为 `stored`。
                    example: stored
        '400':
          description: >-
            Logo 被拒绝：provider_id 无效、不是 PNG/JPEG、不是正方形、小于 200x200、解码后大于 64
            KB，或该服务提供商不是 Yuno 自有的。
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: about:blank
                  title:
                    type: string
                    example: Invalid provider logo
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: The logo was rejected
                  violations:
                    type: array
                    description: 请求的所有违规项，一并报告，而不是每次往返只报告一项。
                    items:
                      type: string
                    example:
                      - >-
                        The logo must be at least 200x200 pixels. This image is
                        1x1.
        '401':
          description: 未授权：API 密钥无效或缺失。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_AUTHENTICATED
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Not authenticated
        '413':
          description: 请求体超过 256 KB。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Request body is too large
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.