> ## 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 替换您的组织所提供的整个服务提供商集合。

用请求体中的 id 替换您的组织所提供的整个服务提供商集合。

**请求体中省略的服务提供商将不再被提供**。这是替换，而不是合并：若要更改部分服务提供商而无需重新声明其余服务提供商，请使用[更新多个服务提供商的可见性](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/update-providers-visibility.md)。

移除服务提供商会**保留**其说明覆盖，因此将其关闭后再开启不会丢失您的文字。

### 请求体

**provider\_ids** `string[]` *required*

您的组织所提供的完整服务提供商 id 集合。UPPER\_SNAKE\_CASE 目录 id（`[A-Z0-9_]`），每个最多 100 个字符，最多 500 个条目。不区分大小写：会被标准化为大写。

**空数组是合法请求**，它会清空允许列表，最终状态与[清空服务提供商允许列表](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/clear-provider-allowlist.md)相同。因此，一次保存全部内容的管理界面无需为“取消勾选了最后一个服务提供商”做特殊处理。

> [!WARNING]
>
> 在主动启用规则下，空的 `provider_ids` 会使您的组织完全没有允许列表条目：它**并不是**“显示全部”的开关。请发送您想要提供的 id，而不是通过清空列表来扩大范围。

### 响应

刷新后的叠加层，结构与[列出白标服务提供商叠加层](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/list-providers.md)相同。

**filtered** `boolean`

此次更改后，您的组织是否至少有一个允许列表条目。

**providers** `object[]`

您的允许列表、说明覆盖和徽标覆盖的并集。

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

```json 200 OK theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "filtered": true,
  "providers": [
    {
      "provider_id": "ADYEN",
      "allowed": true,
      "has_instruction_override": false
    },
    {
      "provider_id": "STRIPE",
      "allowed": true,
      "has_instruction_override": true,
      "more_info_url": "https://docs.example.com/stripe"
    },
    {
      "provider_id": "YUNO_3DS",
      "allowed": true,
      "has_instruction_override": false,
      "logo_url": "https://s3.amazonaws.com/whitelabel/logo.png?X-Amz-Signature=..."
    }
  ]
}
```

```json 400 Bad Request theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "title": "Bad Request",
  "status": 400,
  "detail": "provider_ids contains an invalid catalogue id"
}
```

### 错误

| HTTP | 信封结构 | 触发时机 |
| - | - | - |
| `400` | problem+json | 存在未知字段、id 超过 500 个，或某个 id 不是有效的目录 id。 |
| `401` | `NOT_AUTHENTICATED` | API 密钥缺失或无效。 |
| `413` | — | 请求体大于 256 KB。 |


## OpenAPI

````yaml openapi/zh-hans/organizations/whitelabel/replace-provider-allowlist.json PUT /whitelabel/providers
openapi: 3.1.0
info:
  title: White-label Providers API - Replace Allowlist
  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:
    put:
      summary: 替换服务提供商允许列表
      description: >-
        用请求体中的 ID
        替换您的组织提供的整个服务提供商集合。请求体中省略的服务提供商将不再被提供：这是替换，而不是合并；如需更改部分服务提供商而无需重新列出其余服务提供商，请使用
        `PATCH /v1/whitelabel/providers`。


        空的 `provider_ids` 是合法请求，会清空允许列表，最终状态与 `DELETE /v1/whitelabel/providers`
        相同，因此“全量保存”式的管理界面无需为“最后一个服务提供商被取消勾选”做特殊处理。


        移除服务提供商会保留其说明覆盖，因此先关闭再重新开启，不会丢失您的措辞。
      operationId: replace-whitelabel-provider-allowlist
      requestBody:
        required: true
        description: 要提供的服务提供商 ID 的完整集合。
        content:
          application/json:
            schema:
              type: object
              required:
                - provider_ids
              properties:
                provider_ids:
                  type: array
                  description: >-
                    组织所提供的服务提供商 ID 的完整集合。UPPER_SNAKE_CASE 格式的目录
                    ID（`[A-Z0-9_]`），每个最多 100 个字符，最多 500 项。
                  maxItems: 500
                  items:
                    type: string
                    maxLength: 100
                  example:
                    - STRIPE
                    - ADYEN
                    - YUNO_3DS
      responses:
        '200':
          description: 刷新后的叠加层。
          content:
            application/json:
              schema:
                type: object
                properties:
                  filtered:
                    type: boolean
                    description: >-
                      组织是否至少有一个允许列表条目。请据此判断，不要根据 `providers` 的长度，因为当条目只有说明或 logo
                      覆盖时，该列表同样不为空。
                    example: true
                  providers:
                    type: array
                    description: >-
                      允许列表、说明覆盖和 logo 覆盖的并集。服务提供商可以带有自定义措辞或自定义 logo 而不被提供，此时它会以
                      `allowed: false` 出现。
                    items:
                      type: object
                      properties:
                        provider_id:
                          type: string
                          description: Yuno 目录服务提供商 ID，UPPER_SNAKE_CASE 格式。
                          example: STRIPE
                        allowed:
                          type: boolean
                          description: 组织是否提供该服务提供商。
                          example: true
                        has_instruction_override:
                          type: boolean
                          description: 是否存在任何说明覆盖。这是一个轻量的徽章标记，与内容字段重复，不能作为渲染这些字段的依据。
                          example: true
                        name:
                          type: string
                          description: 被覆盖时替代目录名称的显示名称。只有 Yuno 自有的服务提供商才能设置。
                          example: Acme Risk
                        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
                        logo_url:
                          type: string
                          readOnly: true
                          description: >-
                            只读且临时：在本次读取时生成的预签名
                            URL，仅在短时间内有效。切勿存储，请重新读取该服务提供商以获取新的 URL。
                          example: >-
                            https://s3.amazonaws.com/whitelabel/logo.png?X-Amz-Signature=...
        '400':
          description: 校验错误：未知字段、超过 500 个 ID，或 ID 不是有效的目录 ID。
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: about:blank
                  title:
                    type: string
                    example: Bad Request
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: provider_ids contains an invalid catalogue id
        '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.