> ## 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: KYC·KYB 컴플라이언스 보고서

> Didit의 GET /v3/session/{id}/generate-pdf/로 KYC 또는 KYB 세션의 브랜드 적용 컴플라이언스 보고서를 다운로드하세요. 화이트 라벨, 감사 대응 가능, 사용량 기반 요금.



PDF 생성 프롬프트
        프롬프트를 클립보드에 복사



      
      

\<pre>

\`Download an audit-ready PDF report for a finished Didit verification session.

Endpoint:
GET https://verification.didit.me/v3/session/{session_id}/generate-pdf/

Authentication:
Use the x-api-key header with your Didit API key (or a user-auth token). Privilege: read:sessions.

Path parameter:
\- session_id (UUID) — works for both User Verification (KYC) and Business Verification (KYB) sessions. Didit routes to the correct template automatically.

Prerequisites:
\- Session status must be one of "Approved", "Declined", "In Review". Any other status returns 403.
\- Session must belong to the authenticated application — cross-application reads return 404.

curl example — save the PDF to disk:
curl https://verification.didit.me/v3/session/<SESSION_ID>/generate-pdf/ \
-H "x-api-key: <API_KEY>" \
-o report.pdf

Response:
\- Body is binary (application/pdf). DO NOT parse as JSON.
\- Content-Type: application/pdf
\- Content-Disposition: attachment; filename=session_<session_id>.pdf for KYC sessions, business_<session_id>.pdf for KYB sessions.
\- Typical wall time ~1-3s (server-side WeasyPrint rendering).

Template contents:
\- KYC PDF: Identity (OCR), Liveness, Face Match, AML, POA, IP analysis, reviews, events.
\- KYB PDF: Company registry data, officers, beneficial owners (UBOs), KYB documents, AML hits, questionnaires, phone verification, email verification, IP analysis, reviews, events.

White-label:
If white-label customization is enabled on your application, the PDF uses your logo and privacy-policy URL. Configure at Console → Customization.

Failure modes:
\- 401 — invalid credentials.
\- 403 — { "detail": "You do not have permission to perform this action." } when the key lacks read:sessions OR when the session is in a non-printable status (Not Started, In Progress, Expired, Abandoned, Kyc Expired, Resubmitted, Awaiting User).
\- 404 — { "detail": "Not found." } when the session is not visible to this application.

Idempotency & cost:
Safe to retry — generation is read-only. Counts against the standard rate limit.

When to call:
\- Compliance archives (regulator submissions, internal audit binders).
\- Customer support replies (proof of decision for a specific session).
\- After approve / decline via /sessions-api/update-status — render and store the resulting PDF.
\- For every session of one user in a single file, use GET /v3/users/{vendor_data}/generate-pdf/ instead (see /management-api/users/generate-pdf).

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

붙여넣을 곳

## KYC 및 KYB 지원**사용자 인증(KYC)** 및 **기업 확인(KYB)** 세션 모두에서 작동합니다. Didit은 적절한 PDF 템플릿을 자동으로 선택합니다:- 사용자 인증(KYC) 세션 → 신분증 인증, 라이브니스 감지, 얼굴 대조, AML, 주소 증명(POA) 섹션이 포함된 보고서.
- 기업 확인(KYB) 세션 → 해당 기능이 워크플로에 포함된 경우 법인 등기부, 주요 인물(UBO/임원), 문서, AML, 설문지, 전화번호, 이메일, IP 분석 섹션이 포함된 보고서.두 유형 모두 동일한 PDF 생성 파이프라인을 사용하며, 화이트 라벨 맞춤 설정(로고, 개인정보 처리방침 URL)을 지원합니다.## 파일 이름 규칙| 구분 | 파일 이름 |
| - | - |
| 사용자 | `session_<session_id>.pdf` |
| 기업 | `business_<session_id>.pdf` |파일은 `Content-Disposition: attachment; filename=...` 헤더를 통해 반환됩니다.## 상태 요건PDF를 생성하려면 세션이 `APPROVED`, `DECLINED`, `IN_REVIEW` 중 하나의 상태여야 합니다. 진행 중이거나 아직 시작되지 않은 세션은 `403`을 반환합니다.## 예시> [tab] 사용자 인증(KYC) PDF
>
> ```bash theme={null}
> curl https://verification.didit.me/v3/session/4c5c7f3a-.../generate-pdf/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -o kyc-report.pdf
> ```> [tab] 기업 확인(KYB) PDF
>
> ```bash theme={null}
> curl https://verification.didit.me/v3/session/bs-01HJX1.../generate-pdf/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -o kyb-report.pdf
> ```## 화이트 라벨애플리케이션에서 화이트 라벨 맞춤 설정이 활성화되어 있으면 PDF에 귀사의 로고와 개인정보 처리방침 URL이 사용됩니다. *Console → Customization*에서 설정합니다.## 권한`read:sessions` 권한이 필요합니다. 두 유형 모두 같은 스코프를 사용합니다.## 관련 문서- [세션 개요](https://docs.didit.me/ko/sessions-api/overview.md)
- [세션 조회](https://docs.didit.me/ko/sessions-api/retrieve-session.md): 동일한 결정을 담은 JSON 버전
- [사용자 이력 PDF 다운로드](https://docs.didit.me/ko/management-api/users/generate-pdf.md): 한 사용자의 보고 가능한 모든 세션을 하나의 파일로 제공
- [KYB 응답 스키마](https://docs.didit.me/ko/business-verification/response-schema.md): 기업 PDF에 포함되는 필드


## OpenAPI

````yaml ko/openapi-25.json GET /v3/session/{sessionId}/generate-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/session/{sessionId}/generate-pdf/:
    get:
      tags:
        - Sessions
      summary: 인증 세션의 PDF 보고서 다운로드
      description: >-
        완료된 인증 세션에 대해 컴플라이언스 제출용 PDF 보고서를 렌더링하고 다운로드합니다. 동일한 경로에서 사용자 인증(KYC) 및
        기업 확인(KYB) 세션을 모두 지원합니다. 서버가 두 세션 유형에 대해 `sessionId`를 확인하고 일치하는 보고서 템플릿을
        선택합니다.


        **대상 상태.** 세션이 이미 최종 상태이거나 검토 가능한 상태여야 합니다.


        - KYC 세션: `Approved`, `Declined`, `In Review` 또는 `Kyc Expired`

        - KYB 세션: `Approved`, `Declined` 또는 `In Review`


        다른 모든 상태(`Not Started`, `In Progress`, `Expired`, `Abandoned` 등)는 설명이
        포함된 `detail` 문자열과 함께 `403`을 반환합니다(아래 `403` 응답 참조).


        **보고서 내용.** PDF는 요청 시점의 콘솔 세션 화면을 그대로 반영합니다.


        - **KYC** — 취합된 세션 상태, 경고 목록, 실행된 기능별 섹션: 신분증 인증(문서 이미지 및 추출된 필드), NFC,
        라이브니스, 얼굴 대조, 이메일 인증, 전화번호 인증, 주소 증명, 설문지 답변, 데이터베이스 검증, AML 스크리닝, IP
        분석. 이어서 세션 태그, 콘솔 검토 활동(댓글 및 상태 변경) 및 세션 이벤트 타임라인이 포함됩니다.

        - **KYB** — 등기부 확인(기업 데이터), AML 스크리닝, 기업 문서 검증, 주요 인물 확인, 설문지 응답,
        전화번호/이메일 인증, IP 분석, 세션 이벤트 타임라인, 그리고 태그 및 검토 활동이 포함됩니다.


        **브랜딩.** 애플리케이션에 화이트 라벨 맞춤 설정이 적용된 경우 보고서는 고객사의 로고와 개인정보 처리방침 URL 링크로
        렌더링됩니다. 그렇지 않은 경우 Didit 브랜딩이 적용됩니다. 보고서는 영어로 렌더링되며, 언어 파라미터는 제공되지 않습니다.


        **캐싱 없음.** 모든 호출은 현재 세션 데이터에서 PDF를 다시 렌더링하므로 수동 검토 후에 생성된 보고서에는 검토자의 결정이
        반영됩니다. 동일한 세션에 대해 두 번 호출하면 바이트 단위로 서로 다른 파일이 생성될 수 있으므로 변경 불가능한 사본이 필요한
        경우 다운로드한 파일을 보관하세요.


        **지연 시간.** 렌더링 시 PDF를 구성하기 전에 저장된 모든 이미지(문서 앞뒷면, 셀피, 추가 파일)를 다운로드하므로
        미디어가 많은 세션은 몇 초 정도 걸릴 수 있습니다. 클라이언트 읽기 제한 시간을 넉넉하게 설정(60초 권장)하고 본문을 디스크로
        스트리밍하세요.


        **트레일링 슬래시.** 정식 경로는 트레일링 슬래시(`…/generate-pdf/`)로 끝납니다. 슬래시가 없는 요청도 동일한
        응답으로 직접 처리됩니다. `301` 리디렉션이 발생하지 않으므로 클라이언트가 리디렉션을 따를 필요가 없으며 `curl`에
        `-L`을 사용할 필요가 없습니다. 샘플에 나와 있는 것처럼 슬래시가 포함된 URL을 사용하세요.


        렌더링된 보고서 대신 원본 데이터가 JSON으로 필요한 경우 `GET
        /v3/session/{sessionId}/decision/`을 사용하세요. 단일 문서에서 한 사용자의 보고 가능한 모든 세션을
        확인하려면 `GET /v3/users/{vendor_data}/generate-pdf/`를 사용하세요.
      operationId: get_v3_session_generate_pdf
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            렌더링할 사용자 인증(KYC) 또는 기업 확인(KYB) 세션의 UUID입니다(`POST /v3/session/`에서 반환된
            `session_id`). 두 세션 유형 모두 동일한 경로가 작동하며, 수신된 보고서 유형을 확인하려면 응답의
            `Content-Disposition` 파일명을 사용하십시오.


            **반드시 올바른 형식의 소문자 UUID여야 합니다.** 라우트는 유효한 UUID만 일치시키므로, 잘못된 형식의 값은
            애플리케이션 코드가 실행되기 전에 URL 라우터에 의해 거부되며 응답은 아래 표시된 JSON `{"detail":
            ...}` 형식이 아닌 `404` **HTML** 페이지로 반환됩니다. 라우트의 UUID 변환기는 표준 소문자 형식만
            일치시키므로 대문자 16진수 UUID는 HTML 404로 거부됩니다.
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
      responses:
        '200':
          description: >-
            렌더링된 PDF 문서로, 바이너리 `application/pdf` 형식으로 직접 반환됩니다. JSON 래퍼나 다운로드
            URL 간접 참조가 없습니다. 본문은 `%PDF` 매직 바이트(PDF 1.7)로 시작합니다. `.pdf` 파일로 저장하거나
            호출자에게 스트리밍하세요.
          headers:
            Content-Disposition:
              description: >-
                KYC 세션의 경우 `attachment; filename=session_{sessionId}.pdf`, KYB
                세션의 경우 `attachment; filename=business_{sessionId}.pdf`입니다. 접두사를
                통해 렌더링된 보고서 템플릿을 확인할 수 있습니다.
              schema:
                type: string
                example: >-
                  attachment;
                  filename=session_11111111-2222-3333-4444-555555555555.pdf
            Content-Length:
              description: PDF의 총 크기(바이트 단위)이며, 본문은 청크로 분할되지 않습니다.
              schema:
                type: integer
                example: 25191
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '403':
          description: >-
            인증, 권한 부여 또는 세션 상태 실패입니다. 키가 누락된 경우 `403`이 반환되며, 잘못되었거나 취소되었거나 만료된
            키는 `401`을 반환합니다. 실패 모드는 `detail` 문자열로 구분하십시오.


            - `"Authentication credentials were not provided or are invalid."` —
            `x-api-key` 헤더(및 `Authorization: Bearer` token)가 없거나, 제공된 자격 증명의
            인트로스펙션에 실패했습니다(취소됨, 만료됨 또는 형식 오류).

            - `"You do not have permission to perform this action."` — 자격 증명은
            유효하지만 이 세션을 읽을 수 없습니다. 콘솔 사용자 Bearer token에 `read:sessions` 권한이 없거나
            소유 애플리케이션에 접근할 수 없거나, API 키가 세션과 다른 조직에 속해 있습니다.

            - `"You can only generate a PDF for sessions in review, declined,
            approved or kyc expired"` — KYC 세션이 존재하지만 아직 보고서 생성이 가능한 상태(예: `Not
            Started` 또는 `In Progress`)가 아닙니다. 보고서를 요청하기 전에 `status.updated`
            webhook을 기다리십시오.

            - `"You can only generate a PDF for sessions in review, declined or
            approved"` — KYB 세션에 대한 동일한 조건입니다.


            완전히 알 수 없는 `sessionId`의 경우 endpoint는 자격 증명을 검증하기 전에 소유 애플리케이션을 먼저
            확인하므로, 자격 증명이 누락되었거나 유효하지 않더라도 누락된 세션은 `404`를 반환합니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: >-
                      You can only generate a PDF for sessions in review,
                      declined, approved or kyc expired
              examples:
                Missing or invalid credentials:
                  summary: x-api-key 헤더가 없거나 키 내부 검사(introspection)에 실패했습니다
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Insufficient permissions:
                  summary: 유효한 자격 증명이지만 read:sessions 권한 또는 소유 애플리케이션에 대한 접근 권한이 없습니다.
                  value:
                    detail: You do not have permission to perform this action.
                KYC session not finished:
                  summary: KYC 세션이 아직 시작되지 않음 / 진행 중임
                  value:
                    detail: >-
                      You can only generate a PDF for sessions in review,
                      declined, approved or kyc expired
                KYB session not finished:
                  summary: KYB 세션이 아직 시작되지 않음 / 진행 중임
                  value:
                    detail: >-
                      You can only generate a PDF for sessions in review,
                      declined or approved
        '404':
          description: >-
            이 `sessionId`를 가진 활성 세션이 존재하지 않습니다. 생성된 적이 없거나 삭제되었습니다. 자격 증명 검증보다
            소유자 확인이 먼저 이루어지므로 인증되지 않은 요청에 대해서도 이 `404`가 반환됩니다. 조회 실패 위치에 따라
            `detail` 문자열은 `"Not found."`(일반적인 경우) 또는 `"Session not found."`가
            됩니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Not found.
              examples:
                Unknown session:
                  summary: sessionId가 어떠한 KYC 또는 KYB 세션과도 일치하지 않습니다
                  value:
                    detail: Not found.
                Recently deleted session:
                  summary: 조회 도중 세션이 삭제되었습니다
                  value:
                    detail: Session not found.
        '429':
          description: >-
            속도 제한을 초과했습니다. PDF 생성에는 전역 GET 한도인 분당 600회 외에 **인증 정보당 분당 50회**(API
            키, Bearer token, 또는 미인증 시 소스 IP)의 전용 한도가 적용됩니다.
            `Retry-After`초(`X-RateLimit-*` 헤더에도 반영됨) 동안 대기한 후 재시도하세요. 보고서는 서버 측에
            캐시되지 않으므로, 다시 가져오는 대신 각 보고서를 한 번 다운로드하여 파일을 저장해 두세요.
          headers:
            Retry-After:
              description: 요청을 재시도하기 전에 대기해야 하는 시간(초).
              schema:
                type: integer
                minimum: 1
                example: 30
            X-RateLimit-Limit:
              description: 현재 윈도우에서 허용되는 최대 PDF 생성 횟수(50).
              schema:
                type: integer
                example: 50
            X-RateLimit-Remaining:
              description: 현재 윈도우에 남아 있는 요청 수입니다.
              schema:
                type: integer
                example: 0
            X-RateLimit-Reset:
              description: 현재 윈도우가 리셋되는 Unix 타임스탬프(초)입니다.
              schema:
                type: integer
                example: 1750000000
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 속도 제한 초과에 대한 사람이 읽기 쉬운 설명입니다.
                    example: >-
                      Session PDF generation rate limit exceeded. You can make
                      up to 50 requests per minute.
              examples:
                Throttled:
                  summary: 동일한 자격 증명에서 1분 동안 50회를 초과하는 PDF 생성 발생
                  value:
                    detail: >-
                      Session PDF generation rate limit exceeded. You can make
                      up to 50 requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --fail \
              https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/ \
              -H 'x-api-key: YOUR_API_KEY' \
              --output report.pdf
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            content = client.sessions.generate_pdf(
                "11111111-2222-3333-4444-555555555555",
            )
            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.

            const didit = new Didit();


            const content = await
            didit.sessions.generatePdf("11111111-2222-3333-4444-555555555555");

            await writeFile("download.pdf", Buffer.from(await
            content.arrayBuffer()));
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.GeneratePDF(ctx, \"11111111-2222-3333-4444-555555555555\")\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 client = new Didit();


            client.sessions().generatePdf("11111111-2222-3333-4444-555555555555")
                    .writeTo(Path.of("download.pdf"));
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $content =
            $didit->sessions->generatePdf('11111111-2222-3333-4444-555555555555');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            content =
            didit.sessions.generate_pdf("11111111-2222-3333-4444-555555555555")

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

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var content = await
            client.Sessions.GeneratePdfAsync("11111111-2222-3333-4444-555555555555");

            await content.SaveToAsync("download.pdf");
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며
        특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나
        만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된
        IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를
        벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write
        권한이 없는 키는 세션 링크와 token을 null로 수신합니다.
        https://docs.didit.me/console/api-keys 를 참고하십시오.

````

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