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

# 申请 Travel Rule 网络接入 API

> 问卷获批后，请求 Didit 代表您的应用作为独立参与方接入 GTR 或 Sygna 网络。

请求 Travel Rule 网络 API 提示词
将提示词复制到剪贴板

<pre>
  \`Ask Didit to carry my application on a Travel Rule network as my own participant.

  Endpoint:
  POST [https://verification.didit.me/v3/travel-rule/networks/\{network}/request/](https://verification.didit.me/v3/travel-rule/networks/\{network}/request/)
  network: gtr | sygna

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

  Behavior:

  * Without an approved questionnaire, the participant waits for it (status questionnaire\_pending).
  * With one, it goes to the network's onboarding (submitted\_to\_network) and becomes active once the network gives it a participant code.
  * Idempotent: a pending, onboarding or active participant is returned unchanged.
  * If the network refused the registration (last\_error is set and the network's state is error / provisioning\_failed), requesting again retries.
  * 400 travel\_rule\_network\_own\_membership\_only for TRUST and VerifyVASP (connect your own membership instead), 400 travel\_rule\_network\_sandbox\_application from a sandbox application, 403 travel\_rule\_platform\_networks\_disabled until network access through Didit opens.

  What to read from the response:

  * status, participant\_code, last\_error and history of my participant.

  Full guide: /transaction-monitoring/travel-rule.\`
</pre>

粘贴到

在 [获取 Travel Rule 网络](https://docs.didit.me/zh/management-api/travel-rule/get-networks.md) 上查看结果：一旦您的参与方处于活跃状态，且 Didit 在该网络中的成员资格已生效，该网络的 `state` 将变为 `live_through_didit`。


## OpenAPI

````yaml zh/openapi-25.json POST /v3/travel-rule/networks/{network}/request/
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/networks/{network}/request/:
    post:
      tags:
        - Travel Rule
      summary: 申请 Travel Rule 网络
      description: >-
        在 Didit 会员资格支持的网络（GTR 或
        Sygna）上申请此应用专属的参与者。如果没有已通过的问卷，参与者将等待问卷（questionnaire_pending）；如果有，则进入网络入驻流程（submitted_to_network），并在网络分配代码后激活。具有幂等性：处于待处理、入驻中或已上线状态的参与者将原样返回。如果网络拒绝了注册（设置了
        last_error），再次请求将重试。TRUST 和 VerifyVASP 仅可通过您自己的会员资格访问：TRUST 按 VASP
        接纳成员，而 VerifyVASP Enclave 仅服务于一个 VASP ID。
      operationId: requestTravelRuleNetworkAccess
      parameters:
        - name: network
          in: path
          required: true
          schema:
            type: string
            enum:
              - gtr
              - sygna
          description: 通过 Didit 成员身份加入的网络。
      responses:
        '200':
          description: 您在该网络上的参与方。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleNetworkParticipant'
        '400':
          description: 未知网络、Didit 不支持的网络（连接您自己的会员资格），或沙盒应用。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                    enum:
                      - travel_rule_network_own_membership_only
                      - travel_rule_network_sandbox_application
        '401':
          description: API 密钥缺失或无效。
        '403':
          description: 通过 Didit 会员资格访问网络目前尚未开放。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                    enum:
                      - travel_rule_platform_networks_disabled
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/networks/gtr/request/ \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.networks.request_access(
                "your-network",
            )
            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.networks.requestAccess("your-network");

            console.log(result);
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.travelRule().networks().requestAccess("your-network");

            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->networks->requestAccess('your-network');

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

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

            result = didit.travel_rule.networks.request_access("your-network")
            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.Networks.RequestAccessAsync("your-network");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleNetworkParticipant:
      type: object
      description: 该应用自身在某个网络上的参与者。
      properties:
        network:
          type: string
          enum:
            - gtr
            - trust
            - verifyvasp
            - sygna
        rail:
          type: string
          enum:
            - GTR
            - TRUST
            - VERIFYVASP
            - SYGNA
        mode:
          type: string
          enum:
            - platform
            - own
        status:
          type: string
          enum:
            - not_requested
            - questionnaire_pending
            - submitted_to_network
            - active
            - suspended
            - rejected
          description: >-
            not_requested：从未请求过，或网络拒绝了首次请求（参见
            last_error）；questionnaire_pending：等待尽职调查问卷审核通过；submitted_to_network：已提交至网络入驻流程；active：网络已为该应用分配专属参与者代码；suspended
            / rejected：Didit 已暂停或拒绝该请求。
        participant_code:
          type: string
        requested_at:
          type: string
          format: date-time
          nullable: true
        submitted_at:
          type: string
          format: date-time
          nullable: true
        activated_at:
          type: string
          format: date-time
          nullable: true
        suspended_at:
          type: string
          format: date-time
          nullable: true
        last_error:
          type: string
          description: 网络拒绝注册时的答复；其他情况下为空。
        history:
          type: array
          readOnly: true
          description: 每次状态变更，按时间正序排列。
          items:
            type: object
            properties:
              at:
                type: string
                format: date-time
              from:
                type: string
              to:
                type: string
              note:
                type: string
                description: 审核备注或网络回复（如果有）。
  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.