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

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

> 在您的白标 Providers 选项卡中开启或关闭单个服务提供商。

开启或关闭单个服务提供商。此操作是幂等的，关闭服务提供商会**保留**其说明覆盖，因此您的文字在切换后仍然保留。

响应是该服务提供商刷新后的叠加层，其中 `allowed` 反映您发送的 `visible`。

> [!WARNING]
>
> 您的允许列表需要主动启用：没有允许列表条目的白标组织完全不提供任何服务提供商。在这样的组织上发送 `visible: true` 会以这一个服务提供商**开始**建立允许列表；其余服务提供商仍不被提供，直到您逐个添加它们，或使用[更新多个服务提供商的可见性](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/update-providers-visibility.md)或[替换服务提供商允许列表](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/replace-provider-allowlist.md)批量添加。

### 路径参数

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

Yuno 目录中的服务提供商 id，采用 UPPER\_SNAKE\_CASE。不区分大小写：会被标准化为大写，因此 `stripe` 和 `STRIPE` 指向同一个服务提供商。

### 请求体

**visible** `boolean` *required*

您的组织是否提供此服务提供商。`true` 将其加入允许列表，`false` 将其移除。

必填。省略该字段或显式发送 `null` 的请求体会返回 `400`；它永远不会被视为 `false`。

### 响应

该服务提供商刷新后的叠加层，结构与[检索服务提供商叠加层](https://docs.y.uno/zh-hans/reference/organizations/whitelabel/retrieve-provider.md)相同。

**provider\_id** `string`

Yuno 目录中的服务提供商 id，已标准化为大写。

**allowed** `boolean`

此次更改后，您的组织是否提供此服务提供商。

**name** `string`

被覆盖时，替换目录中名称的显示名称。

**instructions** `object[]`

被覆盖时，替换目录中连接步骤的连接步骤。

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

被覆盖时，替换目录中设置步骤的分组设置步骤。

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

被覆盖时，替换目录中文档链接的文档链接。

**logo\_url** `string`

在本次读取时预签名，有效期很短。

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

```json 200 OK theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "provider_id": "ADYEN",
  "allowed": true
}
```

```json 400 Bad Request theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "code": "VALIDATION_ERROR",
  "messages": ["provider_id is invalid"]
}
```

### 错误

| HTTP | `code` | 触发时机 |
| - | - | - |
| `400` | `VALIDATION_ERROR` | `provider_id` 无效，或请求体中的 `visible` 缺失或为 null。 |
| `401` | `NOT_AUTHENTICATED` | API 密钥缺失或无效。 |
| `413` | — | 请求体大于 256 KB。 |


## OpenAPI

````yaml openapi/zh-hans/organizations/whitelabel/update-provider-visibility.json PATCH /whitelabel/providers/{provider_id}
openapi: 3.1.0
info:
  title: White-label Providers API - 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/{provider_id}:
    patch:
      summary: 更新服务提供商的可见性
      description: |-
        开启或关闭单个服务提供商。具有幂等性，关闭时会保留其说明覆盖，因此您的措辞在切换后依然保留。

        响应是该服务提供商刷新后的叠加层，其中 `allowed` 反映您发送的 `visible`。
      operationId: update-whitelabel-provider-visibility
      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
              required:
                - visible
              properties:
                visible:
                  type: boolean
                  description: >-
                    组织是否提供该服务提供商。`true` 将其加入允许列表，`false`
                    将其移除。移除会保留任何说明覆盖。必填：省略或为 null 的 `visible` 会返回 `400`，绝不会默认为
                    `false`。
                  example: true
      responses:
        '200':
          description: 该服务提供商刷新后的叠加层。
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider_id:
                    type: string
                    description: Yuno 目录服务提供商 ID，UPPER_SNAKE_CASE 格式。
                    example: STRIPE
                  allowed:
                    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: provider_id 或请求体无效。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - provider_id is invalid
        '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.