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

# 取引PDFレポートAPI

> DiditのManagement APIで、モニタリング対象の取引をPDFレポートとしてダウンロードできます。判定、当事者、アラート、ルール実行結果、スクリーニング結果、関連取引を含みます。



取引PDFレポート生成APIプロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Download one Didit monitored transaction as a PDF report through the Management API.

Endpoint:
GET https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/

Authentication:
Use the x-api-key header with my Didit API key. A scoped key needs media: read and transactions: read, because a PDF report counts as media. Keys limited to specific workflows or to approved sessions cannot call this endpoint.

Goal:
\- Get a PDF of a transaction for an audit file, a handoff to another team, or a regulator request.

Path parameters:
\- organization_id: my organization UUID.
\- application_id: the UUID of the application my API key belongs to. Any other application returns 403.
\- transaction_uuid: the Didit transaction uuid, not my own txn_id.

Behavior:
\- The response body is the PDF itself (Content-Type: application/pdf). Do not parse it as JSON.
\- Content-Disposition is always attachment; filename=transaction_{transaction_uuid}.pdf.
\- The report covers the overview and verdict, parties and payment methods, custom properties, alerts and rule runs, screening and Travel Rule results, the network summary, the cost breakdown, up to 50 related transactions and the 20 most recent activity entries.
\- It is rendered from the transaction's current data on every call. Nothing is stored and nothing is billed. Rendering can take a few seconds, so use a generous client timeout.

Example call:
curl -X GET "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/" \
-H "x-api-key: YOUR_API_KEY" \
-o transaction_report.pdf

Failure modes (JSON bodies):
\- 401: the API key has expired.
\- 403: missing API key (a wrong, revoked or expired key gets 401) ({"detail": "Authentication credentials were not provided or are invalid."}), an application_id that is not my key's application ({"detail": "You do not have permission to perform this action."}), a scoped key without media: read ({"detail": "This API key has no read access to media."}) or 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.

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

\</pre>



      
      

貼り付け先

レポートは取引の現在のデータからオンデマンドで生成されます。そのため、ステータスが変更された後に再度呼び出すと、最新のコピーを取得できます。他の取引エンドポイントとは異なり、このエンドポイントはアプリケーション単位のパスにあります。URLには組織IDと、APIキーが属するアプリケーションのIDを指定してください。[組織IDを確認する](https://docs.didit.me/ja/getting-started/api-authentication.md#組織idの確認方法)を参照してください。> [!NOTE]
>
> PDFレポートはメディアとして扱われます。[スコープ付きAPIキー](https://docs.didit.me/ja/console/api-keys.md)には**transactions: read**に加えて**media: read**が必要です。メディアへのアクセス権がないキーは、[取引を取得](https://docs.didit.me/ja/management-api/transactions/get.md)で取引をJSONとして読み取れる場合でも`403`が返されます。


## OpenAPI

````yaml ja/openapi-25.json GET /v3/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/
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/organization/{organization_id}/application/{application_id}/transactions/{transaction_uuid}/pdf/:
    get:
      tags:
        - Transactions
      summary: 取引のPDFレポートをダウンロード
      description: >-
        監視対象の取引1件をPDFレポートとして生成します。内容は、概要と判定結果、当事者と支払い方法、カスタムプロパティ、アラートとルールの実行結果、スクリーニングとトラベルルールの結果、ネットワークの概要、費用の内訳、最大50件の関連取引、直近20件のアクティビティです。ボディはJSONではなくPDFそのもの（`application/pdf`）です。


        レポートは呼び出しのたびに取引の現在のデータから生成されるため、ステータスが変わった後は再度リクエストしてください。データは何も保存されず、課金も発生しません。生成には数秒かかる場合があるため、クライアントのタイムアウトには十分な値を設定してください。


        このエンドポイントはアプリケーション単位のパスにあります。URLには、組織IDと、APIキーが属するアプリケーションのIDを指定してください（[組織IDの確認方法](https://docs.didit.me/ja/getting-started/api-authentication#組織idの確認方法)）。PDFレポートはメディアとして扱われます。スコープ付きAPIキーには`media:
        read`と`transactions:
        read`が必要です。一部のワークフローまたは承認済みセッションに限定されたキーでは、このエンドポイントを呼び出せません。
      operationId: get_transaction_pdf
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 組織のUUIDです。
          example: 11111111-2222-3333-4444-555555555555
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            アプリケーションのUUID。APIキーが属するアプリケーションである必要があります。他のアプリケーションでキーを使用すると`403`が返されます。
          example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
        - name: transaction_uuid
          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
      responses:
        '200':
          description: レンダリングされたPDF。バイナリの`application/pdf`として直接返されます。
          headers:
            Content-Disposition:
              description: 常に`attachment; filename=transaction_{transaction_uuid}.pdf`です。
              schema:
                type: string
                example: >-
                  attachment;
                  filename=transaction_abcdef12-3456-7890-abcd-ef1234567890.pdf
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '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: >-
            リクエストは許可されていません。`detail`を確認してください。原因は、APIキーがない（誤った、失効した、または期限切れのキーの場合は`401`）、`application_id`がキーのアプリケーションと一致しない、`media:
            read`または`transactions:
            read`を持たないスコープ付きキー、ワークフローまたは承認済みセッションに限定されたキー、またはキーのIPリスト外からのリクエストのいずれかです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid key:
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Another application:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without media read:
                  value:
                    detail: This API key has no read access to media.
                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_uuid`はAPIに到達せず、このJSONボディの代わりに`404`のHTMLページが返されます。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: No Transaction matches the given query.
        '429':
          description: >-
            このAPIキーで1分あたり600件を超えるGETリクエストがありました。`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: 現在の1分間のウィンドウがリセットされるまでの秒数です。
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: この枠で1分あたりに許可されるリクエスト数。
              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 --fail -X GET
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/abcdef12-3456-7890-abcd-ef1234567890/pdf/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              --output transaction_report.pdf
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            content = client.transactions.generate_pdf(
                "abcdef12-3456-7890-abcd-ef1234567890",
            )
            with open("download.pdf", "wb") as file:
                file.write(content)
        - lang: javascript
          label: Node.js
          source: >-
            import { writeFile } from "node:fs/promises";

            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            const didit = new Didit();


            const content = await
            didit.transactions.generatePdf("abcdef12-3456-7890-abcd-ef1234567890");

            await writeFile("download.pdf", Buffer.from(await
            content.arrayBuffer()));
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Transactions.GeneratePDF(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import me.didit.Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            client.transactions().generatePdf("abcdef12-3456-7890-abcd-ef1234567890")
                    .writeTo(Path.of("download.pdf"));
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            $didit = new DiditClient();


            $content =
            $didit->transactions->generatePdf('abcdef12-3456-7890-abcd-ef1234567890');

            $content->saveTo('download.pdf');
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            # and DIDIT_APPLICATION_ID.

            didit = Didit::Client.new


            content =
            didit.transactions.generate_pdf("abcdef12-3456-7890-abcd-ef1234567890")

            File.binwrite("download.pdf", content)
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            var content = await
            client.Transactions.GeneratePdfAsync("abcdef12-3456-7890-abcd-ef1234567890");

            await content.SaveToAsync("download.pdf");
components:
  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.