> ## 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 Management APIで、トラベルルール対象の送金について取引相手のVASPとやり取りしたメッセージと書類リクエストを取得します。

トラベルルールメッセージ一覧取得APIのプロンプト
プロンプトをクリップボードにコピー

<pre>
  \`Read the messages and document requests exchanged with the counterparty VASP about one Travel Rule transfer.

  Endpoint:
  GET [https://verification.didit.me/v3/transactions/\{transaction\_id}/travel-rule/messages/](https://verification.didit.me/v3/transactions/\{transaction_id}/travel-rule/messages/)

  Authentication:
  Use the x-api-key header with my Didit API key. {transaction_id} is the Didit transaction uuid on my application.

  What to read from the response:

  * A plain array, oldest first. Each message has id, kind (MESSAGE or DOCUMENT\_REQUEST), direction (OUTBOUND is what my side sent), author, body, requested\_documents, reply\_to, fulfilled\_at (set once a reply carries a document), attachment and created\_at.
  * attachment.files\[].file\_url is a time-limited download URL.

  Failure modes:

  * 404 - unknown transaction, or no Travel Rule transfer on it.

  Send one with POST on the same path. No webhook fires when the counterparty writes, so read this endpoint.

  Full guide: /transaction-monitoring/travel-rule#messages-and-document-requests.\`
</pre>

貼り付け先


## OpenAPI

````yaml ja/openapi-25.json GET /v3/transactions/{transaction_id}/travel-rule/messages/
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}/travel-rule/messages/:
    get:
      tags:
        - Travel Rule
      summary: トラベルルールメッセージの一覧取得
      description: この送金について取引相手のVASPとやり取りしたメッセージと書類リクエストです。
      operationId: listTravelRuleMessages
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: この送金を所有する取引の、Diditの安定したUUIDです。
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: メッセージです。古い順に並びます。
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TravelRuleMessage'
        '404':
          description: 不明な取引またはトークン、もしくは取引にトラベルルールの送金がありません。
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.travel_rule.list_messages(
                "11111111-2222-3333-4444-555555555555",
            )
            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.transactions.travelRule.listMessages("11111111-2222-3333-4444-555555555555");

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


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().travelRule().listMessages("11111111-2222-3333-4444-555555555555");

            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->transactions->travelRule->listMessages('11111111-2222-3333-4444-555555555555');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.transactions.travel_rule.list_messages("11111111-2222-3333-4444-555555555555").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();


            var result = await
            client.Transactions.TravelRule.ListMessagesAsync("11111111-2222-3333-4444-555555555555");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - MESSAGE
            - DOCUMENT_REQUEST
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: '`OUTBOUND`は閲覧者自身の側が送信したものです。受け取りポータルでは、方向は取引相手の側から見たものになります。'
        author:
          type: string
          description: それぞれの側でこれを記入した者です。コンソールユーザーのメールアドレスまたはAPIキーのラベル、あるいは相手方VASPの名前です。
        body:
          type: string
        requested_documents:
          type: array
          items:
            type: string
          description: DOCUMENT_REQUESTが求めている内容（依頼者の言葉で記載）。
        reply_to:
          type: string
          format: uuid
          nullable: true
        fulfilled_at:
          type: string
          format: date-time
          nullable: true
          description: DOCUMENT_REQUESTへの返信に書類が含まれた時点で、そのDOCUMENT_REQUESTに設定されます。
        attachment:
          $ref: '#/components/schemas/TravelRuleMessageAttachment'
        created_at:
          type: string
          format: date-time
    TravelRuleMessageAttachment:
      type: object
      nullable: true
      description: メッセージに添付された書類です。他の取引書類と同様に保存されます。
      properties:
        uuid:
          type: string
          format: uuid
        label:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        uploaded_by:
          type: string
          nullable: true
          description: >-
            添付した主体。受け取りポータルでは、送信したファイルにはVASP名が表示され、その背後にいる人物やAPIキーが表示されることはありません。
        created_at:
          type: string
          format: date-time
        files:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              file_url:
                type: string
                nullable: true
                description: 期限付きのダウンロードURL。
              original_filename:
                type: string
              file_size:
                type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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