> ## 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（KYBレポート）

> Didit Management APIで、完了した企業認証（KYB）セッション1件のPDFレポートをダウンロードできます。法人登記データ、主要人物、所有者、書類、AML、レビューを収録。



企業セッションPDF生成APIプロンプト
        プロンプトをクリップボードにコピー



      
      

\<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/ja/sessions-api/generate-pdf.md)でもKYBレポートを出力できます。連携に合った方を使ってください。このエンドポイントは組織とアプリケーションを通じてセッションを指定し、もう一方はセッションIDのみで指定します。> [!NOTE]
>
> レポートは、セッションが`Approved`、`Declined`、`In Review`のいずれかになった後でのみ取得できます。リクエストする前に、`status.updated`[Webhook](https://docs.didit.me/ja/integration/webhooks.md)を待ってください。## 関連情報- [PDFを生成](https://docs.didit.me/ja/sessions-api/generate-pdf.md)
- [PDFおよびCSVへのエクスポート](https://docs.didit.me/ja/console/export-pdf-csv.md)
- [KYBレスポンススキーマ](https://docs.didit.me/ja/business-verification/response-schema.md)


## OpenAPI

````yaml ja/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: >-
        1件の法人確認
        (KYB)セッションのPDFレポートを生成します。レポートには、法人登記データ、主要人物と実質的支配者、書類、AML結果、その他のワークフロー機能に加え、セッションのタグとレビュー履歴が含まれます。ホワイトラベルのカスタマイズを有効にすると、レポートには貴社のロゴとプライバシーポリシーのURLが記載されます。レスポンスの本文はJSONではなく、PDFそのもの(`application/pdf`)です。


        セッションのステータスは`Approved`、`Declined`、`In
        Review`のいずれかである必要があります。それ以外のステータスでは`403`が返されるため、先に`status.updated`の[Webhook](https://docs.didit.me/ja/integration/webhooks)を待ってください。レポートは呼び出しのたびに生成され、料金は発生しません。繰り返し取得せず、ファイルを保存してください。`GET
        /v3/session/{sessionId}/generate-pdf/`は、セッションIDのみで同種のレポートを生成します。


        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: >-
            法人確認
            (KYB)セッションの`session_id`で、セッション作成時に返されたものです。別のアプリケーションのセッションを指定すると`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: >-
            このIDの企業セッションはアプリケーション内に存在しません（作成されていない、削除された、または別のアプリケーションが所有している）。UUIDではない値を指定すると、このJSON本文ではなく`404`のHTMLページが返されます。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: Business session not found.
        '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/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キーです。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.