> ## 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 لجلسة التحقق من الشركات (KYB) API

> حمّل تقرير PDF من Didit لجلسة التحقق من الشركات (KYB) المكتملة: بيانات السجل، الأشخاص الرئيسيون، الملكية، المستندات، AML والمراجعات.



موجّه API لتوليد PDF لجلسة الشركة
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

\`Download the PDF report of one finished Didit business verification (KYB) session.

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

Authentication:
Use the x-api-key header with my Didit API key. A scoped key needs businesses: read and media: read; a key limited to some workflows or to approved sessions can't call this endpoint. application_id must be the application the key belongs to.

Goal:
\- Store an audit-ready KYB report for my compliance archive, or attach it to a case or regulator request.

Behavior:
\- business_session_id is the session_id of the KYB session.
\- The session must be "Approved", "Declined" or "In Review"; any other status returns 403.
\- The body is binary application/pdf, not JSON. Content-Disposition: attachment; filename=business_<business_session_id>.pdf.
\- The report covers company registry data, key people and beneficial owners, documents, AML results and the other workflow features, plus the session's tags and reviews. With white-label customization on, it uses my logo and privacy policy URL.
\- Rendered on every call: store the file instead of fetching it repeatedly.

Example call:
curl --fail -X GET "https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/businesses/c2d3e4f5-0617-4829-9a3b-4c5d6e7f8091/pdf/" \
-H "x-api-key: YOUR_API_KEY" \
\--output business-report.pdf

What to read from the response:
\- The PDF bytes. Do not parse the body as JSON.
\- Content-Disposition - the suggested file name.

Failure modes:
\- 401 - the API key has expired.
\- 403 - {"detail": "You can only generate a PDF for sessions in review, declined or approved."} when the session is not finished; {"detail": "Authentication credentials were not provided or are invalid."} for a missing key (a wrong, revoked or expired key gets 401); {"detail": "You do not have permission to perform this action."} for a key of another application; a scoped key without businesses: read or media: read; a key limited to workflows or approved sessions; a request from outside the key's IP list.
\- 404 - {"detail": "Business session not found."}
\- 429 - more than 600 GET requests per minute with this key.

Side effects: none. Not billed.

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

\</pre>



      
      

الصق في

[إنشاء PDF](https://docs.didit.me/ar/sessions-api/generate-pdf.md) ينشئ تقارير KYB أيضاً. اختر ما يناسب تكاملك: يستهدف هذا الـendpoint الجلسة عبر مؤسستك وتطبيقك، أما الـendpoint الآخر فيستهدفها باستخدام معرّف الجلسة وحده.> [!NOTE]
>
> لا يتوفر التقرير إلا بعد أن تصبح الجلسة `Approved` أو `Declined` أو `In Review`. انتظر حتى يصلك [webhook](https://docs.didit.me/ar/integration/webhooks.md) الخاص بالحدث `status.updated` قبل أن تطلب التقرير.## ذات صلة- [إنشاء PDF](https://docs.didit.me/ar/sessions-api/generate-pdf.md)
- [التصدير إلى PDF وCSV](https://docs.didit.me/ar/console/export-pdf-csv.md)
- [مخطط استجابة KYB](https://docs.didit.me/ar/business-verification/response-schema.md)


## OpenAPI

````yaml ar/openapi-25.json GET /v3/organization/{organization_id}/application/{application_id}/businesses/{business_session_id}/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}/businesses/{business_session_id}/pdf/:
    get:
      tags:
        - Businesses
      summary: تنزيل تقرير PDF لجلسة شركة
      description: >-
        توليد تقرير PDF لجلسة التحقق من الشركات (KYB) واحدة: بيانات سجل الشركات،
        والأشخاص الرئيسيون والمستفيدون الحقيقيون، والمستندات، ونتائج فحص AML
        وميزات سير العمل الأخرى، بالإضافة إلى وسوم الجلسة ونشاط المراجعة. عند
        تفعيل تخصيص العلامة البيضاء، يتضمن التقرير شعارك ورابط سياسة الخصوصية
        الخاصة بك. جسم الاستجابة هو ملف PDF نفسه (`application/pdf`)، وليس JSON.


        يجب أن تكون الجلسة بحالة `Approved` أو `Declined` أو `In Review`؛ حيث
        تُرجع أي حالة أخرى كود `403`، لذا انتظر
        [webhook](https://docs.didit.me/ar/integration/webhooks) الخاص بالحدث
        `status.updated` أولاً. يتم توليد التقرير عند كل استدعاء ولا تتم فوترة
        أي رسوم، لذا يُفضل تخزين الملف بدلاً من جلبه بشكل متكرر. يقوم `GET
        /v3/session/{sessionId}/generate-pdf/` بتوليد النوع نفسه من التقارير
        باستخدام معرّف الجلسة بمفرده.


        يُعد تقرير PDF من الوسائط: يحتاج مفتاح API المحدود الصلاحيات إلى
        `businesses: read` و `media: read`، ولا يمكن لمفتاح مقيد ببعض مسارات سير
        العمل أو بالجلسات المقبولة فقط استدعاؤه.
      operationId: get_business_session_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: business_session_id
          in: path
          required: true
          description: >-
            `session_id` لجلسة التحقق من الشركات (KYB)، كما تم إرجاعه عند إنشاء
            الجلسة. تُرجع جلسة تابعة لتطبيق آخر `404`.
          schema:
            type: string
            format: uuid
          example: 22222222-3333-4444-5555-666666666666
      responses:
        '200':
          description: ملف PDF المُصيَّر، يتم إرجاعه مباشرة كملف ثنائي `application/pdf`.
          headers:
            Content-Disposition:
              description: >-
                دائماً `attachment;
                filename=business_{business_session_id}.pdf`.
              schema:
                type: string
                example: >-
                  attachment;
                  filename=business_22222222-3333-4444-5555-666666666666.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`: جلسة
            ليست بحالة `Approved`، أو `Declined`، أو `In Review`، أو مفتاح API
            مفقود (المفتاح الخاطئ أو الملغى أو منتهي الصلاحية يتلقى `401`)، أو
            `application_id` لا يتبع لتطبيق المفتاح، أو مفتاح بنطاق محدد يفتقر
            إلى `media: read` أو `businesses: read`، أو مفتاح مقيد بمهام سير
            العمل أو الجلسات المقبولة، أو طلب قادم من خارج قائمة IP الخاصة
            بالمفتاح.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Session not finished:
                  value:
                    detail: >-
                      You can only generate a PDF for sessions in review,
                      declined or approved.
                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 businesses read:
                  value:
                    detail: This API key has no read access to companies.
                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 تُرجع
            صفحة HTML برمز `404` بدلاً من متن JSON هذا.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: Business session not found.
        '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/businesses/22222222-3333-4444-5555-666666666666/pdf/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              --output business_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.businesses.generate_session_pdf(
                "22222222-3333-4444-5555-666666666666",
            )
            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.businesses.generateSessionPdf("22222222-3333-4444-5555-666666666666");

            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.Businesses.GenerateSessionPDF(ctx, \"22222222-3333-4444-5555-666666666666\")\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.businesses().generateSessionPdf("22222222-3333-4444-5555-666666666666")
                    .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->businesses->generateSessionPdf('22222222-3333-4444-5555-666666666666');

            $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.businesses.generate_session_pdf("22222222-3333-4444-5555-666666666666")

            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.Businesses.GenerateSessionPdfAsync("22222222-3333-4444-5555-666666666666");

            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.