> ## 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 Sesi Verifikasi Bisnis (KYB)

> Unduh PDF satu sesi verifikasi bisnis (KYB) yang sudah selesai di Didit: registri, pihak kunci, pemilik, dokumen, AML, dan peninjauan.



Prompt API untuk Menghasilkan PDF Sesi Bisnis
        Salin prompt ke papan klip



      
      

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



      
      

Tempel ke

[Hasilkan PDF](https://docs.didit.me/id/sessions-api/generate-pdf.md) juga merender laporan KYB. Gunakan yang sesuai dengan integrasi Anda: endpoint ini mengacu pada sesi melalui organisasi dan aplikasi Anda, sedangkan yang satunya hanya menggunakan ID sesi.> [!NOTE]
>
> Laporan hanya tersedia setelah sesi berstatus `Approved`, `Declined` atau `In Review`. Tunggu [webhook](https://docs.didit.me/id/integration/webhooks.md) `status.updated` sebelum Anda memintanya.## Terkait- [Hasilkan PDF](https://docs.didit.me/id/sessions-api/generate-pdf.md)
- [Ekspor ke PDF dan CSV](https://docs.didit.me/id/console/export-pdf-csv.md)
- [Skema respons KYB](https://docs.didit.me/id/business-verification/response-schema.md)


## OpenAPI

````yaml id/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 Verifikasi Identitas. Lakukan autentikasi dengan header 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: Unduh laporan PDF sesi bisnis
      description: >-
        Render laporan PDF dari satu sesi Verifikasi Bisnis (KYB): data registri
        perusahaan, pihak kunci dan pemilik manfaat, dokumen, hasil AML, dan
        fitur alur kerja lainnya, ditambah tag dan aktivitas peninjauan sesi
        tersebut. Dengan kustomisasi White Label yang aktif, laporan akan memuat
        logo dan URL kebijakan privasi Anda. Isi respons berupa PDF itu sendiri
        (`application/pdf`), bukan JSON.


        Sesi harus berstatus `Approved`, `Declined`, atau `In Review`; status
        lainnya akan mengembalikan `403`, jadi tunggu
        [webhook](https://docs.didit.me/id/integration/webhooks)
        `status.updated` terlebih dahulu. Laporan di-render pada setiap
        panggilan dan tidak ada biaya yang ditagihkan, jadi simpan file tersebut
        alih-alih mengambilnya berulang kali. `GET
        /v3/session/{sessionId}/generate-pdf/` me-render jenis laporan yang sama
        hanya dengan ID sesi.


        Laporan PDF dihitung sebagai media: kunci API ber-scope memerlukan
        `businesses: read` dan `media: read`, dan kunci yang dibatasi ke
        beberapa alur kerja atau ke sesi yang disetujui tidak dapat
        memanggilnya.
      operationId: get_business_session_pdf
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID organisasi.
          example: 11111111-2222-3333-4444-555555555555
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            UUID aplikasi. Harus berupa aplikasi pemilik kunci API tersebut:
            kunci yang digunakan pada aplikasi lain mana pun akan mendapatkan
            `403`.
          example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
        - name: business_session_id
          in: path
          required: true
          description: >-
            `session_id` dari sesi Verifikasi Bisnis (KYB), seperti yang
            dikembalikan saat sesi dibuat. Sesi dari aplikasi lain mengembalikan
            `404`.
          schema:
            type: string
            format: uuid
          example: 22222222-3333-4444-5555-666666666666
      responses:
        '200':
          description: >-
            PDF hasil render, dikembalikan langsung sebagai biner
            `application/pdf`.
          headers:
            Content-Disposition:
              description: >-
                Selalu `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: >-
            Kunci API telah kedaluwarsa. Hanya kunci yang dibuat dengan tanggal
            kedaluwarsa yang dapat kedaluwarsa; setelah tanggal tersebut, setiap
            permintaan dengannya menghasilkan respons `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            Permintaan tidak diizinkan atau sesi belum selesai. Baca `detail`:
            sesi yang bukan `Approved`, `Declined`, atau `In Review`, kunci API
            tidak ada (kunci yang salah, dicabut, atau kedaluwarsa mendapatkan
            `401`), `application_id` yang bukan merupakan aplikasi milik kunci
            tersebut, kunci dengan pembatasan cakupan tanpa `media: read` atau
            `businesses: read`, kunci yang dibatasi untuk alur kerja atau sesi
            yang disetujui, atau permintaan dari luar daftar IP milik kunci
            tersebut.
          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: >-
            Tidak ada sesi bisnis dengan ID ini dalam aplikasi (tidak pernah
            dibuat, dihapus, atau dimiliki oleh aplikasi lain). Nilai yang bukan
            berupa UUID akan mengembalikan halaman HTML `404` alih-alih body
            JSON ini.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: Business session not found.
        '429':
          description: >-
            Lebih dari 600 permintaan GET per menit dengan kunci API ini. Tunggu
            selama jumlah detik di `Retry-After`, lalu coba lagi.
          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: Detik hingga jendela satu menit saat ini direset.
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: Permintaan yang diizinkan per menit dalam anggaran ini.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Permintaan tersisa dalam jendela saat ini.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Waktu Unix saat jendela direset.
              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: >-
        Kunci API aplikasi Anda, dari Developers -> API keys di Business
        Console. Kunci utama memiliki akses penuh. Kunci bernama dapat diberi
        cakupan: none, read, atau write per sumber daya, dibatasi pada beberapa
        alur kerja atau pada sesi yang disetujui, pada daftar alamat IP, dan
        pada tanggal kedaluwarsa. 401 berarti kuncinya salah, dicabut, atau
        kedaluwarsa; 403 berarti tidak ada kunci yang dikirimkan, kunci tidak
        memiliki akses ke sumber daya atau tindakan ini, atau permintaan datang
        dari alamat di luar daftar IP-nya; 404 pada rute sesi berarti sesi
        berada di luar alur kerja atau status kunci tersebut. Kunci tanpa akses
        media menerima URL gambar, video, dan PDF sebagai null, dan kunci tanpa
        izin tulis sesi menerima tautan sesi dan token sebagai null. Lihat
        https://docs.didit.me/console/api-keys.

````

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