> ## 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 للمعاملات

> نزّل معاملة تمت مراقبتها كتقرير PDF يتضمن الحكم والأطراف والتنبيهات وتشغيلات القواعد ونتائج الفحص والمعاملات المرتبطة عبر Didit.



إنشاء تقرير 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>



      
      

الصق في

يُنشأ التقرير عند الطلب من البيانات الحالية للمعاملة، لذا أعد استدعاءه بعد تغيير الحالة للحصول على نسخة محدّثة. وعلى خلاف endpoints المعاملات الأخرى، يقع هذا المسار ضمن نطاق التطبيق، لذا ضع معرّف مؤسستك ومعرّف التطبيق الذي ينتمي إليه مفتاح API في عنوان URL. راجع [البحث عن معرّف مؤسستك](https://docs.didit.me/ar/getting-started/api-authentication.md#العثور-على-معرّف-المؤسسة-الخاص-بك).> [!NOTE]
>
> يُعدّ تقرير PDF من الوسائط. يحتاج [مفتاح API المقيّد النطاق](https://docs.didit.me/ar/console/api-keys.md) إلى **media: read** بالإضافة إلى **transactions: read**، ويحصل المفتاح الذي لا يملك صلاحية الوصول إلى الوسائط على `403` حتى لو كان قادرًا على قراءة المعاملة بصيغة JSON باستخدام [الحصول على المعاملة](https://docs.didit.me/ar/management-api/transactions/get.md).


## OpenAPI

````yaml ar/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 في مسار محدد النطاق للتطبيق: ضع معرّف مؤسستك ومعرّف
        التطبيق الذي ينتمي إليه مفتاح API الخاص بك في عنوان URL ([اعثر على معرّف
        مؤسستك](https://docs.didit.me/ar/getting-started/api-authentication#العثور-على-معرّف-المؤسسة-الخاص-بك)).
        يُحتسب تقرير 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: >-
            معرّف 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`، أو مفتاح مقتصر على سير العمل أو الجلسات
            المقبولة، أو طلب من خارج قائمة العناوين الخاصة بالمفتاح.
          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 الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ 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.