> ## 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 目录中的文字。

为此服务提供商存储您自己的连接说明，在您覆盖的部分替换 Yuno 目录中的文字。

> [!WARNING]
>
> **文档会被整体存储，而不是合并**。此请求体中省略的字段会被清除，该服务提供商的这个字段将恢复为目录中的值。安全的编辑方式是：使用[检索服务提供商的说明覆盖](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/retrieve-provider-instructions.md)读取当前文档，修改那一个字段，然后将整个文档放回。

`instructions`、`setup_instructions`、`more_info_url` 和 `name` 中至少要有一个。未知的顶层键会被驳回而不是被忽略，并且序列化后的文档不得超过 64 KB。

覆盖服务提供商的文字**不会**将其添加到您的允许列表中：编辑文字从不改变您所提供的内容。

### 路径参数

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

Yuno 目录中的服务提供商 id，采用 UPPER\_SNAKE\_CASE。不区分大小写：会被标准化为大写。

### 请求体

**instructions** `object[]`

向您自己的用户显示的连接步骤。

**步骤**

**step** `integer`

步骤的位置。

**text** `string | object`

步骤的文字。可以是纯字符串，也可以是语言映射，例如 `{"EN": "...", "ES": "..."}`。

**text\_link** `string | object`

链接标签。结构规则与 `text` 相同。

**link** `string`

目标 URL。**必须为 https**：dashboard 会将其渲染为 href。

**type** `string`

步骤类型。

**has\_sub\_instructions** `boolean`

此步骤是否带有嵌套步骤。

**sub\_instructions\_type** `string`

嵌套步骤的类型。

**sub\_instructions** `object[]`

嵌套步骤，结构相同。最多嵌套 3 层。

**setup\_instructions** `object[]`

分组设置步骤。

**分组**

**title** `string`

分组标题。

**order** `integer`

分组的位置。

**instructions\_type** `string`

此分组中步骤的类型。

**instructions** `object[]`

步骤，结构与上方的 `instructions` 相同。

**more\_info\_url** `string`

指向您自己关于此服务提供商的文档的链接。必须为 https URL。

**name** `string`

替换目录中显示名称的显示名称。最多 255 个字符。

**仅接受 Yuno 自有的服务提供商**：即目录 id 中包含 `YUNO` 的服务提供商，例如 `YUNO_3DS` 或 `YUNO_FRAUD_SCREENING`。任何其他服务提供商都会被驳回并返回 `400`。

### 响应

存储后的文档，结构与[检索服务提供商的说明覆盖](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/retrieve-provider-instructions.md)相同，包括只读字段 `created_at`、`updated_at`、`created_by` 和 `updated_by`。

```bash cURL theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
curl -X PUT 'https://api.y.uno/v1/whitelabel/providers/STRIPE/instructions' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "more_info_url": "https://docs.example.com/stripe",
    "instructions": [
      {
        "step": 1,
        "text": { "EN": "Open your Stripe dashboard.", "ES": "Abre tu panel de Stripe." },
        "type": "TEXT"
      },
      {
        "step": 2,
        "text": "Copy the secret API key and paste it below.",
        "text_link": "Where do I find my key?",
        "link": "https://docs.example.com/stripe#api-keys",
        "type": "LINK"
      }
    ]
  }'
```

```json 200 OK theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "provider_id": "STRIPE",
  "more_info_url": "https://docs.example.com/stripe",
  "instructions": [
    {
      "step": 1,
      "text": { "EN": "Open your Stripe dashboard.", "ES": "Abre tu panel de Stripe." },
      "type": "TEXT"
    },
    {
      "step": 2,
      "text": "Copy the secret API key and paste it below.",
      "text_link": "Where do I find my key?",
      "link": "https://docs.example.com/stripe#api-keys",
      "type": "LINK"
    }
  ],
  "created_at": "2026-09-02T13:54:13Z",
  "updated_at": "2026-09-02T13:54:13Z",
  "created_by": "00000000-0000-0000-0000-000000000000",
  "updated_by": "00000000-0000-0000-0000-000000000000"
}
```

```json 400 — rename refused theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "title": "Invalid provider instructions",
  "status": 400,
  "detail": "The instruction override was rejected",
  "violations": [
    "name: only Yuno's own providers can be renamed; 'STRIPE' cannot"
  ]
}
```

> [!NOTE]
>
> `violations` 会一次性列出文档的**所有**问题：请一起修复，而不是反复重新提交来发现下一个问题。

### 错误

| HTTP | 信封结构 | 触发时机 |
| - | - | - |
| `400` | `VALIDATION_ERROR` | `provider_id` 不是有效的目录 id。 |
| `400` | problem+json | 文档被驳回：存在未知的顶层键、`link` 或 `more_info_url` 不是 https、在非 Yuno 自有的服务提供商上设置了 `name`、文档为空，或超过 64 KB。 |
| `401` | `NOT_AUTHENTICATED` | API 密钥缺失或无效。 |
| `413` | — | 请求体大于 256 KB。 |


## OpenAPI

````yaml openapi/zh-hans/organizations/whitelabel/replace-provider-instructions.json PUT /whitelabel/providers/{provider_id}/instructions
openapi: 3.1.0
info:
  title: White-label Providers API - Replace Instructions
  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}/instructions:
    put:
      summary: 替换服务提供商的说明覆盖
      description: >-
        为该服务提供商存储您自己的连接说明，在您覆盖的部分替代 Yuno 目录中的措辞。


        文档是整体存储的，不会合并。请求体中省略的字段会被清除，服务提供商会在该字段上恢复为目录中的值，因此请先用 `GET`
        读取当前文档，编辑后再整体放回。`instructions`、`setup_instructions`、`more_info_url` 和
        `name` 中至少要有一个，未知的顶层键会被拒绝而不是被忽略，序列化后的文档不得超过 64 KB。


        每个 `link` 以及 `more_info_url` 都必须是 https。`name` 用于重命名服务提供商，且仅接受 Yuno
        自有的服务提供商（目录 ID 包含 `YUNO`）；其他任何服务提供商都会被拒绝，并返回 `400`。被拒绝时，`violations`
        会一次性列出所有违规项。


        覆盖服务提供商的措辞不会将其加入您的允许列表。
      operationId: replace-whitelabel-provider-instructions
      parameters:
        - name: provider_id
          in: path
          required: true
          description: UPPER_SNAKE_CASE 格式的 Yuno 目录服务提供商 ID。不区分大小写；会被规范化为大写。
          schema:
            type: string
            example: STRIPE
      requestBody:
        required: true
        description: 完整的覆盖文档。
        content:
          application/json:
            schema:
              type: object
              description: 完整的覆盖文档。至少要有一个属性。
              minProperties: 1
              properties:
                instructions:
                  type: array
                  description: 向您自己的用户显示的连接步骤。每个 `link` 都必须是 https。
                  items:
                    type: object
                    additionalProperties: true
                    description: >-
                      一个说明步骤。接受
                      `step`、`text`、`text_link`、`link`、`type`、`has_sub_instructions`、`sub_instructions_type`
                      和 `sub_instructions`（最多嵌套 3 层）。`text` 和 `text_link`
                      可以是纯字符串，也可以是语言映射，例如 `{"EN": "...", "ES": "..."}`。每个 `link`
                      都必须是 https。
                setup_instructions:
                  type: array
                  description: 分组设置步骤。
                  items:
                    type: object
                    additionalProperties: true
                    description: >-
                      一个设置分组。接受 `title`、`order`、`instructions_type` 和
                      `instructions`（步骤结构相同）。
                more_info_url:
                  type: string
                  format: uri
                  description: 指向您自己为该服务提供商编写的文档的链接。必须是 https URL。
                  example: https://docs.example.com/stripe
                name:
                  type: string
                  maxLength: 255
                  description: >-
                    替代目录名称的显示名称。仅接受 Yuno 自有的服务提供商（目录 ID 包含 `YUNO`，例如
                    `YUNO_3DS`）；其他任何服务提供商都会被拒绝，并返回 `400`。
                  example: Acme Risk
      responses:
        '200':
          description: 已存储的覆盖。
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider_id:
                    type: string
                    description: Yuno 目录服务提供商 ID，UPPER_SNAKE_CASE 格式。
                    example: STRIPE
                  instructions:
                    type: array
                    description: 替代目录连接步骤的连接步骤。
                    items:
                      type: object
                      additionalProperties: true
                      description: >-
                        一个说明步骤。接受
                        `step`、`text`、`text_link`、`link`、`type`、`has_sub_instructions`、`sub_instructions_type`
                        和 `sub_instructions`（最多嵌套 3 层）。`text` 和 `text_link`
                        可以是纯字符串，也可以是语言映射，例如 `{"EN": "...", "ES": "..."}`。每个
                        `link` 都必须是 https。
                  setup_instructions:
                    type: array
                    description: 替代目录设置步骤的分组设置步骤。
                    items:
                      type: object
                      additionalProperties: true
                      description: >-
                        一个设置分组。接受 `title`、`order`、`instructions_type` 和
                        `instructions`（步骤结构相同）。
                  more_info_url:
                    type: string
                    format: uri
                    description: 被覆盖时替代目录文档链接的文档链接。始终为 https。
                    example: https://docs.example.com/stripe
                  name:
                    type: string
                    description: 被覆盖时替代目录名称的显示名称。只有 Yuno 自有的服务提供商才能设置。
                    example: Acme Risk
                  created_at:
                    type: string
                    format: date-time
                    readOnly: true
                    description: 覆盖首次写入的时间。
                    example: '2026-09-02T13:54:13Z'
                  updated_at:
                    type: string
                    format: date-time
                    readOnly: true
                    description: 覆盖最近一次写入的时间。
                    example: '2026-09-02T13:54:13Z'
                  created_by:
                    type: string
                    format: uuid
                    readOnly: true
                    description: >-
                      创建它的 Dashboard 用户。通过此 API 写入的覆盖带有全零哨兵值
                      `00000000-0000-0000-0000-000000000000`，表示“通过 API 写入”，而不是由
                      Dashboard 中的某个人写入。
                    example: 00000000-0000-0000-0000-000000000000
                  updated_by:
                    type: string
                    format: uuid
                    readOnly: true
                    description: 最近一次更新它的 Dashboard 用户，哨兵值规则与 `created_by` 相同。
                    example: 00000000-0000-0000-0000-000000000000
        '400':
          description: >-
            文档被拒绝：provider_id 无效、键未知、link 不是 https、在非 Yuno 自有的服务提供商上设置了
            `name`，或超过 64 KB。
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: about:blank
                  title:
                    type: string
                    example: Invalid provider instructions
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: The instruction override was rejected
                  violations:
                    type: array
                    description: 请求的所有违规项，一并报告，而不是每次往返只报告一项。
                    items:
                      type: string
                    example:
                      - >-
                        name: only Yuno's own providers can be renamed; 'STRIPE'
                        cannot
        '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.