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

# 关联交易列表 API

> 使用 Didit 列出应用中与受监控交易共享同一参与方 vendor_data 的其他交易，按时间从新到旧排序并分页返回。



列出相关交易 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`List the transactions related to one Didit monitored transaction through the Management API.

Endpoint:
GET https://verification.didit.me/v3/transactions/{transaction_id}/related/

Authentication:
Use the x-api-key header with my Didit API key. A scoped key needs transactions: read. Keys limited to specific workflows or to approved sessions cannot call this endpoint.

Goal:
\- See the other transactions that involve the same people or companies as this one (same applicant, or this transaction's counterparty appearing elsewhere) so I can review a transaction in context.

Path parameter:
\- transaction_id: the Didit transaction uuid, not my own txn_id.

Behavior:
\- A transaction is related when one of its parties, in any role, has the same vendor_data as one of this transaction's parties. Matching uses vendor_data only, within my application.
\- The transaction itself is never returned. Parties without vendor_data are ignored, so if none of this transaction's parties has a vendor_data the result is always empty.
\- Ordered by txn_date, newest first, then created_at.
\- Paginated with limit (default 50) and offset. count is exact up to 100 and capped at 100 above that, so keep following next until it is null.

Example call:
curl -X GET "https://verification.didit.me/v3/transactions/{transaction_id}/related/?limit=50" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- results[].uuid: use it with GET /v3/transactions/{transaction_id}/ for the full detail.
\- results[].txn_id, status, score, severity, amount, currency, txn_date: the summary of each related transaction.
\- results[].subject_vendor_data and counterparty_vendor_data: which party links it to this transaction.
\- next: URL of the next page, null on the last page.

Failure modes:
\- 400: limit or offset above 1000000.
\- 401: the API key has expired.
\- 403: missing API key (a wrong, revoked or expired key gets 401) ({"detail": "You do not have permission to perform this action."}), a scoped key without transactions: read, a key with workflow or status limits, or a request from outside the key's IP allowlist.
\- 404: no transaction with this uuid in my application ({"detail": "No Transaction matches the given query."}).
\- 429: more than 600 GET requests per minute with this key; wait Retry-After seconds and retry.

Side effects: none. This is a pure read.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

粘贴到

相关交易通过您为每一方发送的 `vendor_data` 关联。当您[提交交易](https://docs.didit.me/zh/transaction-monitoring/transactions.md#主体与交易对手)时，对同一个人或企业每次都发送相同的 `vendor_data`，此接口即可返回其围绕任一笔交易的完整历史记录。这与审核人员在 Console 的[交易详情](https://docs.didit.me/zh/transaction-monitoring/console.md#交易详情)页面中 **相关交易** 下看到的列表相同。每条结果的摘要结构与[列出交易](https://docs.didit.me/zh/management-api/transactions/list.md)相同。使用某条结果的 `uuid` 调用[获取交易](https://docs.didit.me/zh/management-api/transactions/get.md)，即可获得其各方、警报和规则运行记录。


## OpenAPI

````yaml zh/openapi-25.json GET /v3/transactions/{transaction_id}/related/
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/transactions/{transaction_id}/related/:
    get:
      tags:
        - Transactions
      summary: 列出关联交易
      description: >-
        列出您应用中涉及与此交易相同人员或公司的其他交易。当某笔交易的任何参与方（无论担任任何角色）与当前交易的某个参与方具有相同的
        `vendor_data` 时，即视为关联交易。该交易本身绝不会被返回，且没有 `vendor_data`
        的参与方会被忽略：如果当前交易的参与方均无此字段，结果始终为空。


        结果采用 `GET /v3/transactions/` 的摘要格式，最新的排在最前（先按 `txn_date` 排序，再按
        `created_at` 排序）。使用 `limit` 和 `offset` 进行分页；`count` 在 100 以内是精确的，超过 100
        则上限显示为 100，因此请持续请求 `next`，直到其为 `null`。


        限定作用域的 API 密钥需要具备 `transactions: read` 权限；受限于某些工作流或已通过会话的密钥无法调用此
        endpoint。请在每笔[交易](https://docs.didit.me/zh/transaction-monitoring/transactions#主体与交易对手)中为同一个人或公司发送相同的
        `vendor_data`，以确保此列表完整。
      operationId: list_related_transactions
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: >-
            Didit 交易 UUID：由 `POST /v3/transactions/` 和 `GET /v3/transactions/`
            返回的 `uuid`。不接受您自己的 `txn_id`。
          schema:
            type: string
            format: uuid
          example: abcdef12-3456-7890-abcd-ef1234567890
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 1000000
          description: 每页交易数量。默认为 50。非正整数值将回退为 50；大于 1000000 的值将返回 `400`。
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000000
            minimum: 0
            default: 0
          description: 要返回的第一笔交易的从零开始的位置。建议跟随 `next`。非整数值将回退为 0；大于 1000000 的值将返回 `400`。
      responses:
        '200':
          description: 一页关联交易，按最新优先排序。
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - next
                  - previous
                  - results
                properties:
                  count:
                    type: integer
                    description: >-
                      关联交易的数量：100 以内为准确数值，超过 100 时封顶显示为 100。请依据 `next`
                      进行翻页，而不是据此计算总页数。
                  next:
                    type: string
                    format: uri
                    nullable: true
                    description: 下一页的绝对 URL，最后一页则为 `null`。
                  previous:
                    type: string
                    format: uri
                    nullable: true
                    description: 上一页的绝对 URL，第一页则为 `null`。
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/TransactionSummary'
              examples:
                One related transaction:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                      - uuid: abcdef99-3456-4890-abcd-ef1234567890
                        transaction_number: 4087
                        txn_id: your-txn-2026-10-02-017
                        transaction_type: finance
                        action_type: deposit
                        status: APPROVED
                        source: LIVE
                        direction: INBOUND
                        amount: '250'
                        currency: EUR
                        currency_type: fiat
                        preferred_currency_amount: '270.08'
                        preferred_currency_code: USD
                        payment_details: Card top-up
                        txn_date: '2026-10-02T14:10:00Z'
                        created_at: '2026-10-02T14:10:03.512244Z'
                        score: 12
                        severity: LOW
                        decision_reason_code: null
                        decision_reason_label: null
                        tags: []
                        subject_name: Maria Garcia
                        subject_vendor_data: user-12345
                        subject_type: user
                        subject_uuid: e1111111-2222-4333-8444-555555555555
                        counterparty_name: null
                        counterparty_vendor_data: null
                        counterparty_country: null
                        subject_country: ESP
                        assigned_to_name: null
                        travel_rule_status: null
                        application_id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                        application_name: Production app
                        organization_id: 11111111-2222-3333-4444-555555555555
                        organization_name: Example Org
                No party has vendor_data:
                  value:
                    count: 0
                    next: null
                    previous: null
                    results: []
        '400':
          description: '`limit` 或 `offset` 超过 1000000。响应体是包含消息的 JSON 数组，而非对象。'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              examples:
                Limit too large:
                  value:
                    - limit must not exceed 1000000.
                Offset too large:
                  value:
                    - offset must not exceed 1000000.
        '401':
          description: API 密钥已过期。仅创建时设置了到期日期的密钥才会过期；超过该日期后，使用它的每次请求都会返回 `401`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: 请求不被允许。缺失密钥将返回常规错误信息；错误、已撤销或已过期的密钥将收到 `401`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without transactions read:
                  value:
                    detail: This API key has no read access to transactions.
                Key limited to workflows or approved sessions:
                  value:
                    detail: >-
                      This API key only reaches sessions inside its workflow or
                      status limits, so it can't use this endpoint.
                Outside the key's IP list:
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            应用中不存在具有此 UUID 的交易（从未创建、已删除或属于另一个应用）。非 UUID 格式的 `transaction_id`
            不会到达 API：它将返回 `404` HTML 页面，而不是此 JSON 正文。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: No Transaction matches the given query.
        '429':
          description: 使用此 API 密钥的 GET 请求每分钟超过 600 次。请等待 `Retry-After` 中指定的秒数，然后再重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Throttled:
                  value:
                    detail: >-
                      GET request rate limit exceeded. You can make up to 600
                      requests per minute.
          headers:
            Retry-After:
              description: 距离当前一分钟窗口重置的秒数。
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: 在此预算中每分钟允许的请求数。
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: 当前时间窗口内剩余的请求数。
              schema:
                type: integer
            X-RateLimit-Reset:
              description: 窗口重置的 Unix 时间。
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/related/?limit=50'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            for item in client.transactions.list_related(
                "abcdef12-3456-7890-abcd-ef1234567890",
            ):
                print(item)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            for await (const item of
            didit.transactions.listRelated("abcdef12-3456-7890-abcd-ef1234567890"))
            {
              console.log(item);
            }
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.ListRelatedAutoPaging(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsListRelatedParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            for (var item :
            client.transactions().listRelated("abcdef12-3456-7890-abcd-ef1234567890"))
            {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            foreach
            ($didit->transactions->listRelated('abcdef12-3456-7890-abcd-ef1234567890')
            as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.transactions.list_related("abcdef12-3456-7890-abcd-ef1234567890").auto_paging_each
            do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await foreach (var item in await
            client.Transactions.ListRelatedAsync("abcdef12-3456-7890-abcd-ef1234567890"))

            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  schemas:
    TransactionSummary:
      type: object
      description: >-
        受监控交易的摘要，为 `GET /v3/transactions/` 列出的结构。使用 `uuid` 调用 `GET
        /v3/transactions/{transaction_id}/` 可获取相关方、警报和规则运行情况。
      properties:
        uuid:
          type: string
          format: uuid
          description: Didit 交易 UUID。在交易 endpoint 上将其用作 `{transaction_id}`。
        transaction_number:
          type: integer
          nullable: true
          description: 控制台中显示的应用范围内序号。
        txn_id:
          type: string
          nullable: true
          description: 您在创建调用中提供的自身标识符。每个应用唯一。
        transaction_type:
          type: string
          description: >-
            存储的类别：`finance`、`kyc`、`travelRule`、`userPlatformEvent`、`gamblingBet`、`gamblingLimitChange`、`gamblingBonusChange`
            或 `auditTrailEvent`。
        action_type:
          type: string
          description: 类别内的子类型，例如 `withdrawal`。
        status:
          type: string
          enum:
            - APPROVED
            - IN_REVIEW
            - DECLINED
            - AWAITING_USER
          description: 当前监控裁决结果。
        source:
          type: string
          enum:
            - LIVE
            - IMPORTED
          description: 提交用于监控的交易为 `LIVE`，历史导入的交易为 `IMPORTED`。
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: 相对于主体的方向。
        amount:
          type: string
          description: 去除末尾零的十进制字符串形式的金额（最多 18 位小数）。
        currency:
          type: string
          description: '`amount` 的货币代码或加密资产符号。'
        currency_type:
          type: string
          nullable: true
          description: 已知时为 `fiat` 或 `crypto`。
        preferred_currency_amount:
          type: string
          nullable: true
          description: '`amount` 在汇率可用时折算为应用的首选货币。'
        preferred_currency_code:
          type: string
          nullable: true
          description: '`preferred_currency_amount` 的货币。'
        payment_details:
          type: string
          nullable: true
          description: 自由文本付款参考号。
        txn_date:
          type: string
          format: date-time
          description: 交易发生的时间。
        created_at:
          type: string
          format: date-time
          description: Didit 记录的时间。
        score:
          type: integer
          description: 风险评分。数值越高风险越大。
        severity:
          type: string
          nullable: true
          enum:
            - UNKNOWN
            - LOW
            - MEDIUM
            - HIGH
            - CRITICAL
            - null
          description: 风险严重程度，在被设置之前为 `null`。
        decision_reason_code:
          type: string
          nullable: true
          description: 当前 `status` 的机器可读原因。
        decision_reason_label:
          type: string
          nullable: true
          description: '`decision_reason_code` 的便于人类阅读的标签。'
        tags:
          type: array
          description: 交易中的标签。
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
                description: 十六进制颜色，例如 `#F59E0B`。
              description:
                type: string
                nullable: true
              source:
                type: string
                enum:
                  - didit
                  - custom
                description: Didit 预设或自定义标签。
        subject_name:
          type: string
          nullable: true
          description: '`APPLICANT` 方的姓名。'
        subject_vendor_data:
          type: string
          nullable: true
          description: 您针对申请人的 `vendor_data`。
        subject_type:
          type: string
          nullable: true
          enum:
            - user
            - business
            - null
          description: 申请人是否关联到某个 Didit 用户或企业；若均未关联则为 `null`。
        subject_uuid:
          type: string
          format: uuid
          nullable: true
          description: 申请人关联的 Didit 用户或企业的 UUID。
        subject_country:
          type: string
          nullable: true
          description: 申请人的国家/地区代码。
        counterparty_name:
          type: string
          nullable: true
          description: '`COUNTERPARTY` 方的姓名（若有）。'
        counterparty_vendor_data:
          type: string
          nullable: true
          description: 您针对交易对手的 `vendor_data`。
        counterparty_country:
          type: string
          nullable: true
          description: 交易对手的国家/地区代码。
        assigned_to_name:
          type: string
          nullable: true
          description: 分配给该交易的 Console 审核员姓名。
        travel_rule_status:
          type: string
          nullable: true
          description: 交易的 Travel Rule 转账状态，若无则为 `null`。
        application_id:
          type: string
          format: uuid
          description: 拥有该交易的应用。
        application_name:
          type: string
          nullable: true
          description: 该应用的名称。
        organization_id:
          type: string
          format: uuid
          description: 拥有该应用的组织。
        organization_name:
          type: string
          nullable: true
          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.