> ## 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.

# Get Job Penghapusan Sesi API

> Pantau status dan jumlah hasil penghapusan sesi massal di Didit yang dijawab 202 oleh Batch Delete Sessions karena lebih dari 20 sesi cocok.



Prompt Mengambil Job Penghapusan Sesi
        Salin prompt ke papan klip



      
      

\<pre>

\`Goal: Read the progress of a bulk session deletion that POST /v3/sessions/delete/ answered with 202. That happens when more than 20 KYC sessions match the request, whether they are selected by session_numbers or with delete_all.

Endpoint: GET https://verification.didit.me/v3/sessions/delete/{job_id}/
Auth header: x-api-key: <DIDIT_API_KEY>

Path param:
\- job_id: the job_id returned with the 202.

curl:
curl 'https://verification.didit.me/v3/sessions/delete/JOB_ID/' \
-H 'x-api-key: YOUR_API_KEY'

Response 200:
\{
"job_id": "<uuid>",
"status": "PROCESSING",            // PENDING | PROCESSING | COMPLETED | FAILED
"total": 250,                      // sessions selected when the deletion was requested
"processed": 100,                  // sessions the job has finished with so far
"outcomes": {"deleted": 82, "none": 18, "retained_with_user": 0, "ineligible_no_vendor_user": 0, "failed_retryable": 0, "already_deleted": 0},
"deleted_child_verifications": 0,  // always 0 for jobs from POST /v3/sessions/delete/ (KYC sessions only)
"error": null,                     // why the deletion stopped, when status is FAILED
"created_at": "<datetime>",
"completed_at": null
}

outcomes counts:
\- deleted: sessions deleted together with their face embedding.
\- none: sessions deleted that had no face embedding.
\- retained_with_user: sessions deleted while one image-free biometric template was retained for their User, as the request or the application policy asked.
\- ineligible_no_vendor_user: retention was requested but the session had no linked User; the session and its embedding were deleted.
\- failed_retryable: sessions reported as not deleted. The job retries a group it could not delete by itself instead of counting it here.
\- already_deleted: selected sessions that were already deleted, for example by another request, when the job reached them.

Polling: request the job every few seconds while status is PENDING or PROCESSING; stop at COMPLETED or FAILED. The job never lists which sessions it deleted, only counts. A FAILED job explains why in error; the sessions it had not reached are still in place, so repeat the deletion request to delete them. Deletion is permanent and irreversible.

Failure modes:
\- 403: missing x-api-key (a wrong, revoked or expired key gets 401). { "detail": "You do not have permission to perform this action." }
\- 404: no such job for this application (a job is only visible to the application that created it).

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

\</pre>



      
      

Tempel ke

## IkhtisarMengembalikan penghapusan sesi massal yang dimulai oleh [Hapus Sesi Massal](https://docs.didit.me/id/management-api/sessions/batch-delete.md): statusnya, berapa banyak sesi yang sudah diproses, dan berapa banyak sesi yang berakhir pada setiap hasil.Ketika lebih dari 20 sesi KYC cocok dengan penghapusan massal, dipilih melalui `session_numbers` atau dengan `delete_all`, permintaan mengembalikan `202` dengan job `PENDING`, dan sesi-sesi dihapus di latar belakang. Lakukan polling pada endpoint ini setiap beberapa detik hingga `status` menjadi `COMPLETED` atau `FAILED`.Setiap sesi yang dihapus oleh job dihapus dengan cara yang sama seperti melalui [Hapus Sesi](https://docs.didit.me/id/sessions-api/delete-session.md): sesi itu, setiap percobaan verifikasi yang dimilikinya, dan semua berkas tersimpannya dihapus, dan URL media-nya berhenti dapat diakses. Penghapusan bersifat permanen dan tidak dapat dibatalkan.Job hanya melaporkan jumlah. Job tidak pernah mencantumkan sesi mana saja yang telah dihapusnya.## Status job| `status` | Arti |
| - | - |
| `PENDING` | Diterima, belum mulai. |
| `PROCESSING` | Sedang menghapus; `processed` dan `outcomes` sedang diperbarui. |
| `COMPLETED` | Setiap sesi yang dipilih sudah tercatat di `outcomes`. |
| `FAILED` | Job berhenti lebih awal dan `error` menjelaskan alasannya. Sesi yang belum sempat dijangkau job masih ada: ulangi permintaan penghapusan untuk menghapusnya. |Job `delete_all` hanya menghapus sesi yang dibuat sebelum permintaan. Sesi yang dimulai selama job berjalan tidak dihapus.## Jumlah hasil| Kunci `outcomes` | Arti |
| - | - |
| `deleted` | Sesi yang dihapus beserta embedding wajahnya. |
| `none` | Sesi yang dihapus dan tidak memiliki embedding wajah. |
| `retained_with_user` | Sesi yang dihapus dengan satu templat biometrik tanpa gambar tetap disimpan untuk penggunanya, sesuai permintaan atau kebijakan aplikasi. Lihat [Hapus Sesi](https://docs.didit.me/id/sessions-api/delete-session.md#data-biometrik-wajah-hapus-atau-pertahankan). |
| `ineligible_no_vendor_user` | Retensi diminta tetapi sesi tidak memiliki pengguna yang tertaut. Sesi beserta embedding wajahnya dihapus. |
| `failed_retryable` | Sesi yang dilaporkan tidak terhapus. Job mencoba ulang grup yang tidak dapat dihapusnya sendiri, alih-alih menghitungnya di sini. |
| `already_deleted` | Sesi terpilih yang sudah terhapus, misalnya oleh permintaan lain, saat job mencapainya. |`deleted_child_verifications` menghitung verifikasi yang dibuat oleh verifikasi bisnis yang dihapus dan ikut terhapus bersamanya. Nilainya selalu `0` untuk job yang dimulai oleh [Hapus Sesi Massal](https://docs.didit.me/id/management-api/sessions/batch-delete.md), yang hanya menghapus sesi KYC.## IzinSetiap kunci API aktif milik aplikasi dapat memanggil endpoint ini. Job hanya terlihat oleh aplikasi yang membuatnya; `job_id` lain mengembalikan `404`.## Terkait- [Hapus Sesi Massal](https://docs.didit.me/id/management-api/sessions/batch-delete.md)
- [Hapus Sesi](https://docs.didit.me/id/sessions-api/delete-session.md)
- [Retensi data](https://docs.didit.me/id/console/data-retention.md)


## OpenAPI

````yaml id/openapi-25.json GET /v3/sessions/delete/{job_id}/
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/sessions/delete/{job_id}/:
    get:
      tags:
        - Sessions
      summary: Dapatkan tugas penghapusan sesi massal
      description: >-
        Progres penghapusan sesi massal yang dijawab oleh `POST
        /v3/sessions/delete/` dengan `202` (lebih dari 20 sesi yang cocok,
        dipilih melalui `session_numbers` atau dengan `delete_all`). Lakukan
        polling setiap beberapa detik selama `status` masih `PENDING` atau
        `PROCESSING`; hentikan jika sudah `COMPLETED` atau `FAILED`.


        Tugas ini melaporkan berapa banyak sesi yang berakhir pada setiap hasil
        dan berapa banyak yang telah diproses, tanpa pernah menyebutkan sesi
        mana saja yang dihapus. Tugas yang `FAILED` memuat alasannya di dalam
        `error`; sesi yang belum tersentuh masih tetap ada, jadi ulangi
        permintaan penghapusan untuk menghapusnya.


        **Autentikasi:** Kunci API di header `x-api-key`. Tugas hanya dapat
        dilihat oleh aplikasi yang membuatnya; `job_id` lainnya akan
        mengembalikan `404`. Kredensial yang hilang atau tidak valid
        mengembalikan `403`; API ini tidak pernah mengembalikan `401`.
      operationId: get_session_deletion_job
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            `job_id` yang dikembalikan bersama `202` dari `POST
            /v3/sessions/delete/`.
      responses:
        '200':
          description: Pekerjaan tersebut.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDeletionJob'
              examples:
                Processing:
                  value:
                    job_id: 5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b
                    status: PROCESSING
                    total: 250
                    processed: 100
                    outcomes:
                      deleted: 82
                      none: 18
                      retained_with_user: 0
                      ineligible_no_vendor_user: 0
                      failed_retryable: 0
                      already_deleted: 0
                    deleted_child_verifications: 0
                    error: null
                    created_at: '2026-10-09T10:15:00Z'
                    completed_at: null
                Completed:
                  value:
                    job_id: 5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b
                    status: COMPLETED
                    total: 250
                    processed: 250
                    outcomes:
                      deleted: 204
                      none: 44
                      retained_with_user: 0
                      ineligible_no_vendor_user: 0
                      failed_retryable: 0
                      already_deleted: 2
                    deleted_child_verifications: 0
                    error: null
                    created_at: '2026-10-09T10:15:00Z'
                    completed_at: '2026-10-09T10:16:40Z'
                Failed:
                  value:
                    job_id: 5b8f2c1e-7d3a-4f6b-9e2c-1a0d8f7e6c5b
                    status: FAILED
                    total: 250
                    processed: 100
                    outcomes:
                      deleted: 82
                      none: 18
                      retained_with_user: 0
                      ineligible_no_vendor_user: 0
                      failed_retryable: 0
                      already_deleted: 0
                    deleted_child_verifications: 0
                    error: >-
                      The deletion stopped before it finished. The sessions it
                      had not reached are still in place; repeat the request to
                      delete them.
                    created_at: '2026-10-09T10:15:00Z'
                    completed_at: '2026-10-09T10:15:52Z'
        '403':
          description: >-
            Kunci API tidak ada. Kunci yang tidak ada mengembalikan `403`; kunci
            yang salah, dicabut, atau kedaluwarsa mengembalikan `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid API key:
                  summary: Tidak ada header x-api-key, atau kunci tidak valid
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            Tidak ada tugas penghapusan dengan `job_id` ini untuk aplikasi
            pemanggil. Tugas hanya dapat dilihat oleh aplikasi yang membuatnya.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl 'https://verification.didit.me/v3/sessions/delete/JOB_ID/' \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.retrieve_deletion_job(
                "11111111-2222-3333-4444-555555555555",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


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

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RetrieveDeletionJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().retrieveDeletionJob("11111111-2222-3333-4444-555555555555");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->sessions->retrieveDeletionJob('11111111-2222-3333-4444-555555555555');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.sessions.retrieve_deletion_job("11111111-2222-3333-4444-555555555555")

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


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

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SessionDeletionJob:
      type: object
      description: >-
        Penghapusan sesi massal yang berjalan di latar belakang: progres dan
        jumlah per hasil, tidak pernah menampilkan sesi mana saja yang
        dihapusnya.
      properties:
        job_id:
          type: string
          format: uuid
          description: Lakukan polling `GET /v3/sessions/delete/{job_id}/` dengan id ini.
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
          description: >-
            `PENDING`: diterima, belum dimulai. `PROCESSING`: sedang menghapus;
            `processed` dan `outcomes` sedang diperbarui. `COMPLETED`: setiap
            sesi yang dipilih telah ditangani. `FAILED`: pekerjaan berhenti
            lebih awal; lihat `error`.
        total:
          type: integer
          description: Sesi yang dipilih saat penghapusan diminta.
        processed:
          type: integer
          description: Sesi yang telah selesai diproses oleh pekerjaan sejauh ini.
        outcomes:
          type: object
          description: >-
            Berapa banyak sesi yang berakhir di setiap hasil. Setiap kunci
            selalu ada.
          properties:
            deleted:
              type: integer
              description: Sesi yang dihapus bersama dengan embedding wajahnya.
            none:
              type: integer
              description: Sesi yang dihapus yang tidak memiliki embedding wajah.
            retained_with_user:
              type: integer
              description: >-
                Sesi yang dihapus sementara satu templat biometrik bebas gambar
                dipertahankan untuk Pengguna mereka, sesuai permintaan atau
                kebijakan aplikasi.
            ineligible_no_vendor_user:
              type: integer
              description: >-
                Sesi yang dihapus, bersama dengan embedding wajahnya, karena
                retensi diminta tetapi mereka tidak memiliki Pengguna yang
                ditautkan.
            failed_retryable:
              type: integer
              description: >-
                Sesi yang dilaporkan belum dihapus. Pekerjaan mencoba lagi grup
                yang tidak dapat dihapusnya sendiri alih-alih menghitungnya di
                sini.
            already_deleted:
              type: integer
              description: >-
                Sesi terpilih yang sudah dihapus, misalnya oleh permintaan lain,
                ketika tugas mencapainya.
        deleted_child_verifications:
          type: integer
          description: >-
            Verifikasi yang dibuat oleh verifikasi bisnis yang dihapus, yang
            dihapus bersamanya. Selalu `0` untuk pekerjaan yang dimulai oleh
            `POST /v3/sessions/delete/`, yang hanya menghapus sesi KYC.
        error:
          type: string
          nullable: true
          description: >-
            `null` kecuali jika `status` bernilai `FAILED`; kemudian alasan
            mengapa penghapusan berhenti. Sesi yang belum tercapai oleh tugas
            masih tetap ada: ulangi permintaan untuk menghapusnya.
        created_at:
          type: string
          format: date-time
          description: Waktu ketika penghapusan diminta.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: Waktu pekerjaan selesai; `null` selama pekerjaan berjalan.
  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.