> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置交易对手 VASP 决策 API：Travel Rule

> 通过 Didit 管理 API，为你的应用批准、限制或封禁 Travel Rule 交易对手 VASP，使你的交易规则据此执行。



设置 VASP 决策 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Make or change my application's decision on a Travel Rule counterparty VASP.

Endpoint:
PUT https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/

Authentication:
Use the x-api-key header with my Didit API key.

vasp_id is the id GET /v3/travel-rule/vasps/ returns for a directory entry or a Didit network member.

Example call:
curl -X PUT "https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"decision": "BLOCKED", "reason": "Unlicensed in its home jurisdiction"}'

Body:
\- decision (required) - APPROVED, RESTRICTED or BLOCKED.
\- reason (optional) - up to 255 characters. It replaces the previous reason; leaving it out clears it.

The response is {"decision": {decision, reason, decided_by, updated_at, inherited_from}} as it now applies.

How it works:
\- The decision is private to my application: no other Didit customer sees it, and it never changes the shared directory entry or how a transfer is routed.
\- A decision on a brand also covers each of its entities that has no decision of its own (inherited_from names the brand there). A decision on an entity overrides the brand's for that entity.
\- It acts only through my transaction rules, through the rule field counterparty_dd_status. Install the presets travel-rule-counterparty-blocked (declines) and travel-rule-counterparty-restricted (holds for review), or write my own rule on that field.

Failure modes:
\- 400 - decision missing or not APPROVED, RESTRICTED or BLOCKED, or reason longer than 255 characters.
\- 404 - no directory entry or listed Didit network member has this id, or the id is my own VASP profile.

Full guide: /transaction-monitoring/travel-rule#your-decision-on-a-counterparty.`

\</pre>



      
      

粘贴到



## OpenAPI

````yaml zh/openapi-25.json PUT /v3/travel-rule/vasps/{vasp_id}/decision/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/vasps/{vasp_id}/decision/:
    put:
      tags:
        - Travel Rule
      summary: 设置您对 VASP 的决策
      description: >-
        设置或更改您的应用对交易对手的决策：APPROVED、RESTRICTED 或
        BLOCKED，并可附带可选原因。此操作绝不会更改共享目录条目，仅通过您的交易规则（counterparty_dd_status）生效。针对某个品牌的决策也会涵盖其名下所有尚未拥有独立决策的实体。
      operationId: updateTravelRuleVaspDecision
      parameters:
        - name: vasp_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: GET /v3/travel-rule/vasps/ 中某一行记录的 id：目录条目或 Didit 网络成员。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TravelRuleCounterpartyDecisionRequest'
            example:
              decision: BLOCKED
              reason: Unlicensed in its home jurisdiction
      responses:
        '200':
          description: 当前适用的决策。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleCounterpartyDecisionResponse'
              example:
                decision:
                  decision: BLOCKED
                  reason: Unlicensed in its home jurisdiction
                  decided_by: ''
                  updated_at: '2026-10-14T10:05:00Z'
                  inherited_from: null
        '400':
          description: 决策缺失或不是 APPROVED、RESTRICTED 或 BLOCKED 之一，或者原因超过 255 个字符。
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
              example:
                decision:
                  - '"MAYBE" is not a valid choice.'
        '404':
          description: 目录中没有具有此 id 的条目或已列出的 Didit 网络成员。您自己的 VASP 资料绝不会是您的交易对手。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: No directory entry or Didit network member has this id.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PUT
            https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/
            \
              -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
              -d '{"decision": "BLOCKED", "reason": "Unlicensed in its home jurisdiction"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.update_vasp_decision(
                "11111111-2222-3333-4444-555555555555",
                decision="BLOCKED",
                reason="Unlicensed in its home jurisdiction",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.travelRule.updateVaspDecision("11111111-2222-3333-4444-555555555555",
            {
              decision: "BLOCKED",
              reason: "Unlicensed in its home jurisdiction",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UpdateVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyDecisionRequest{\n\tDecision: \"BLOCKED\",\n\tReason:   didit.String(\"Unlicensed in its home jurisdiction\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.TravelRuleCounterpartyDecisionRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.travelRule().updateVaspDecision("11111111-2222-3333-4444-555555555555",
            TravelRuleCounterpartyDecisionRequest.builder()
                    .decision(TravelRuleCounterpartyDecisionRequest.Decision.of("BLOCKED"))
                    .reason("Unlicensed in its home jurisdiction")
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->travelRule->updateVaspDecision('11111111-2222-3333-4444-555555555555',
            [
                'decision' => 'BLOCKED',
                'reason' => 'Unlicensed in its home jurisdiction',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.travel_rule.update_vasp_decision(
              "11111111-2222-3333-4444-555555555555",
              decision: "BLOCKED",
              reason: "Unlicensed in its home jurisdiction"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.TravelRule.UpdateVaspDecisionAsync("11111111-2222-3333-4444-555555555555",
            new TravelRuleCounterpartyDecisionRequest

            {
                Decision = "BLOCKED",
                Reason = "Unlicensed in its home jurisdiction",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleCounterpartyDecisionRequest:
      type: object
      required:
        - decision
      properties:
        decision:
          type: string
          enum:
            - APPROVED
            - RESTRICTED
            - BLOCKED
        reason:
          type: string
          maxLength: 255
          description: 可选。替换之前的原因；省略则将其清除。
    TravelRuleCounterpartyDecisionResponse:
      type: object
      properties:
        decision:
          allOf:
            - $ref: '#/components/schemas/TravelRuleCounterpartyDecision'
          nullable: true
          description: 适用于您应用的交易对手的决策：其自身的决策，否则（对于品牌的实体）为该品牌的决策。不存在时为 null。
    TravelRuleCounterpartyDecision:
      type: object
      description: >-
        您的应用针对交易对手 VASP
        的决策。仅对您的应用私有：绝不会修改共享的目录条目，其他客户也绝不会看到该决策。它仅通过您的交易规则生效（counterparty_dd_status
        规则字段以及 travel-rule-counterparty-blocked 和
        travel-rule-counterparty-restricted 预设）；绝不会更改转账的路由方式。
      properties:
        decision:
          type: string
          enum:
            - APPROVED
            - RESTRICTED
            - BLOCKED
          description: APPROVED：您的团队已放行该交易对手。RESTRICTED：审核后可继续向其转账。BLOCKED：您的团队已拒绝该交易对手。
        reason:
          type: string
          maxLength: 255
          description: 您提供的自由文本原因，无原因时为空。
        decided_by:
          type: string
          description: 做出或最后更改该决策的控制台用户。当由 API 密钥做出时为空。
        updated_at:
          type: string
          format: date-time
        inherited_from:
          type: object
          nullable: true
          description: 由于您未对该实体本身做出决策，因此该实体遵循其决策的品牌。当决策为交易对手自身的决策时为 null。
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.