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

# 更新多个服务提供商的可见性

> 在一个请求中开启或关闭指定的服务提供商，其他所有服务提供商保持不变。

在一个请求中开启或关闭指定的服务提供商。**只有您列出的服务提供商会受到影响**：其他每个服务提供商都保持原有状态，这正是它与[替换服务提供商允许列表](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/replace-provider-allowlist.md)的区别。

此操作是幂等的，关闭服务提供商会保留其说明覆盖。

> [!NOTE]
>
> 整个请求会在写入第一行之前完成校验：重复的 `provider_id` 会导致**什么都不更改**，而不是只完成您请求的一半。

### 请求体

**providers** `object[]` *required*

在此请求中更改可见性的服务提供商。最多 500 个条目，每个 `provider_id` 最多只能出现一次。

**项**

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

Yuno 目录中的服务提供商 id，采用 UPPER\_SNAKE\_CASE。不区分大小写：在重复检查之前会被标准化为大写，因此 `stripe` 和 `STRIPE` 算作同一个条目。

**visible** `boolean` *required*

您的组织是否提供此服务提供商。对不在允许列表中的服务提供商发送 `visible: false` 不会产生任何操作。

### 响应

刷新后的叠加层，结构与[列出白标服务提供商叠加层](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 PATCH '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 '{
    "providers": [
      { "provider_id": "STRIPE", "visible": true },
      { "provider_id": "DLOCAL", "visible": false }
    ]
  }'
```

```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"
    }
  ]
}
```

```json 400 — repeated provider_id theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "title": "Bad Request",
  "status": 400,
  "detail": "provider_id must appear at most once per request; repeated: STRIPE"
}
```

### 错误

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


## OpenAPI

````yaml openapi/zh-hans/organizations/whitelabel/update-providers-visibility.json PATCH /whitelabel/providers
openapi: 3.1.0
info:
  title: White-label Providers API - Bulk Update Visibility
  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:
    patch:
      summary: 更新多个服务提供商的可见性
      description: >-
        在一个请求中开启或关闭指定的服务提供商。只会改动列出的服务提供商，其他所有服务提供商保持原样，这正是它与 `PUT
        /v1/whitelabel/providers` 的区别。


        在写入第一行之前，会先对每个 ID 进行规范化并检查是否重复，因此包含重复 ID
        的请求不会产生任何更改，而不会只完成一半。具有幂等性，关闭服务提供商会保留其说明覆盖。
      operationId: update-whitelabel-providers-visibility
      requestBody:
        required: true
        description: 可见性发生变化的服务提供商。
        content:
          application/json:
            schema:
              type: object
              required:
                - providers
              properties:
                providers:
                  type: array
                  description: 本次请求中可见性发生变化的服务提供商。最多 500 项，每个 provider_id 最多出现一次。
                  maxItems: 500
                  items:
                    type: object
                    required:
                      - provider_id
                      - visible
                    properties:
                      provider_id:
                        type: string
                        description: Yuno 目录服务提供商 ID，UPPER_SNAKE_CASE 格式。
                        example: STRIPE
                      visible:
                        type: boolean
                        description: 组织是否提供该服务提供商。
                        example: true
      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: 校验错误：未知字段、ID 不是有效的目录 ID，或 provider_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_id must appear at most once per request;
                      repeated: STRIPE
        '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.