> ## 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 PDF-отчёта по транзакции

> Скачайте транзакцию с мониторингом в виде PDF-отчёта: решение, стороны, оповещения, запуски правил, скрининг и связанные транзакции. Didit.



Промпт API для генерации PDF-отчёта по транзакции
        Скопировать промпт в буфер обмена



      
      

\<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>



      
      

Вставьте в

Отчёт формируется по запросу на основе текущих данных транзакции, поэтому после изменения статуса повторно вызовите этот endpoint, чтобы получить актуальную копию. В отличие от других эндпоинтов транзакций, этот находится по пути, привязанному к приложению: в URL укажите ID вашей организации и ID приложения, к которому относится ваш API-ключ. См. [Как найти ID организации](https://docs.didit.me/ru/getting-started/api-authentication.md#как-найти-id-организации).> [!NOTE]
>
> PDF-отчёт относится к медиа. [Ограниченному API-ключу](https://docs.didit.me/ru/console/api-keys.md) нужны **media: read** и **transactions: read**, а ключ без доступа к медиа получит `403`, даже если может читать транзакцию в формате JSON с помощью [Получить транзакцию](https://docs.didit.me/ru/management-api/transactions/get.md).


## OpenAPI

````yaml ru/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: >-
        Сформируйте PDF-отчёт по одной отслеживаемой транзакции: сводка и
        вердикт, стороны и способы оплаты, пользовательские свойства, оповещения
        и срабатывания правил, результаты скрининга и Travel Rule, сводка по
        сети, детализация расходов, до 50 связанных транзакций и 20 последних
        записей активности. Телом ответа является сам PDF-файл
        (`application/pdf`), а не JSON.


        Отчёт генерируется на основе актуальных данных транзакции при каждом
        вызове, поэтому запрашивайте его повторно после изменения статуса.
        Никакие данные не сохраняются и плата не взимается. Рендеринг может
        занять несколько секунд, поэтому используйте увеличенный таймаут на
        клиенте.


        Этот endpoint находится по пути с областью действия приложения: укажите
        в URL идентификатор вашей организации и ID приложения, к которому
        относится ваш API-ключ ([узнайте ID вашей
        организации](https://docs.didit.me/ru/getting-started/api-authentication#как-найти-id-организации)).
        PDF-отчёт считается медиафайлом: для API-ключа с ограниченной областью
        действия требуются разрешения `media: read` и `transactions: read`, а
        ключ с доступом только к определённым сценариям или к одобренным сессиям
        не может вызывать этот endpoint.
      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: >-
            UUID транзакции Didit: значение `uuid`, возвращаемое методами `POST
            /v3/transactions/` и `GET /v3/transactions/`. Собственный `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 не существует в приложении (никогда не
            создавалась, удалена или принадлежит другому приложению). Значение
            `transaction_uuid`, не являющееся UUID, не доходит до API: вместо
            этого возвращается HTML-страница `404`, а не это JSON-тело.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: No Transaction matches the given query.
        '429':
          description: >-
            Более 600 GET-запросов в минуту с этим API-ключом. Подождите
            указанное в `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 --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-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как null, а ключ без прав на запись сессий получает ссылки на
        сессии и токены как null. См. https://docs.didit.me/console/api-keys.

````

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