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

# 注册目标地址

> 将第三方主机添加到您的 PCI Proxy 允许列表，使转发代理可以向其发送卡数据。

将主机添加到您账户的目标地址允许列表。[转发代理](https://docs.y.uno/zh-hans/reference/pci-proxy/invoke-forward-proxy.md)只会向此列表中的主机发送卡数据；不存在“任意主机”模式。匹配的工作方式请参阅[目标地址允许列表指南](https://docs.y.uno/zh-hans/docs/security-and-compliance/pci-proxy/allowlist.md)。

> [!NOTE]
>
> **添加目标地址属于敏感操作**
>
> 注册主机会扩大已存储卡数据可发送到的范围。请限制可以管理允许列表的人员，并检查任何意外添加的条目。


## OpenAPI

````yaml openapi/zh-hans/pci-proxy/manage-destinations.json POST /pci-proxy/destinations
openapi: 3.1.0
info:
  title: pci-proxy-manage-destinations
  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:
  /pci-proxy/destinations:
    post:
      summary: 注册目标
      description: >-
        将主机添加到您账户的允许列表，以便转发代理可以向其发送卡数据。匹配基于完整的主机名，不区分大小写；不隐含子域名和通配符。新注册的主机在几分钟内即可使用。
      operationId: registerPciProxyDestination
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DestinationInput'
            example:
              hostname: api.example-processor.com
              purpose: Direct acquiring — Processor X
      responses:
        '201':
          description: 目标已注册。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Destination'
              example:
                id: d7e8f9a0-1234-4b5c-8d6e-7f8091a2b3c4
                account_id: null
                hostname: api.example-processor.com
                status: ENABLED
                purpose: Direct acquiring — Processor X
                created_at: '2026-07-09T13:05:36Z'
                updated_at: '2026-07-09T13:05:36Z'
        '400':
          description: 无法解析请求正文，或者 `account_id` 不是您组织下的有效账户。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
              examples:
                Invalid request:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - invalid body
                Invalid account id:
                  value:
                    code: INVALID_ACCOUNT_ID
                    messages:
                      - account_id is not a valid account
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: 该主机名已在您的允许列表中注册（针对此账户范围）。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
              examples:
                Destination exists:
                  value:
                    code: DESTINATION_EXISTS
                    messages:
                      - destination already registered
        '422':
          description: 该主机名不是纯公共主机名（URL、带协议、端口或路径的主机、IP 地址或通配符）。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
              examples:
                Invalid hostname:
                  value:
                    code: INVALID_HOSTNAME
                    messages:
                      - >-
                        hostname must be a bare public FQDN with no scheme,
                        port, path, or wildcard
components:
  schemas:
    DestinationInput:
      type: object
      required:
        - hostname
      properties:
        hostname:
          type: string
          description: 要允许的公开主机名，不含协议、端口或路径（例如 `api.example-processor.com`）。精确匹配，不区分大小写。
          example: api.example-processor.com
        purpose:
          type: string
          description: 可选的可读标签，用于说明允许该主机的原因。列出目标地址时会显示。
          example: Direct acquiring — Processor X
        account_id:
          type: string
          format: uuid
          nullable: true
          description: 可选。将此目标地址限制为单个账户（UUID）。省略（或发送 `null`）则对整个组织允许该主机。
          example: null
    Destination:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: 目标地址的唯一标识符。可用于删除该目标地址。
          example: d7e8f9a0-1234-4b5c-8d6e-7f8091a2b3c4
        account_id:
          type: string
          nullable: true
          description: 此目标地址所属的账户，适用于整个组织时为 `null`。
          example: null
        hostname:
          type: string
          description: 已注册的主机名。
          example: api.example-processor.com
        status:
          type: string
          enum:
            - ENABLED
            - DISABLED
          description: 目标地址是否处于启用状态。转发路径只使用 ENABLED 状态的目标地址。
          example: ENABLED
        purpose:
          type: string
          description: 注册目标地址时您提供的标签。
          example: Direct acquiring — Processor X
        created_at:
          type: string
          format: date-time
          description: 目标地址的注册时间。
          example: '2026-07-09T13:05:36Z'
        updated_at:
          type: string
          format: date-time
          description: 目标地址的最近修改时间。
          example: '2026-07-09T13:05:36Z'
    DestinationError:
      type: object
      properties:
        code:
          type: string
          description: 机器可读的错误代码。
          enum:
            - NOT_AUTHENTICATED
            - AuthenticationFail
            - INVALID_REQUEST
            - INVALID_HOSTNAME
            - INVALID_ACCOUNT_ID
            - DESTINATION_EXISTS
            - NOT_FOUND
            - INTERNAL_ERROR
        messages:
          type: array
          items:
            type: string
  responses:
    Unauthorized:
      description: 身份验证失败。缺少 API 凭证或 API 凭证无效。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DestinationError'
          examples:
            Not authenticated:
              value:
                code: NOT_AUTHENTICATED
                messages:
                  - not authenticated
  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.