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

# बायोमेट्रिक टेम्पलेट हटाएँ (Purge) API

> Didit: DELETE /v3/biometric-templates/{template_uuid}/ से बायोमेट्रिक टेम्पलेट मैचिंग से हटाएँ और स्टोर किया टेम्पलेट मिटाएँ। इडेम्पोटेंट।

एक टेम्पलेट को पर्ज करता है: उसे मिलान के हर प्रकार से हटा दिया जाता है और संग्रहीत टेम्पलेट मिटा दिया जाता है। पर्ज अपरिवर्तनीय है और इसे कार्रवाई करने वाले प्रिंसिपल के साथ ऑडिट लॉग में दर्ज किया जाता है।

```bash theme={null}
curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{ "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "outcome": "purged" }
```

| `outcome` | अर्थ |
| - | - |
| `purged` | टेम्पलेट को इस कॉल द्वारा पर्ज किया गया। |
| `already_purged` | टेम्पलेट पहले ही पर्ज किया जा चुका था। पर्ज को दोहराना सुरक्षित है। |

## पुनः प्रयास का व्यवहार

Didit पहले संग्रहीत टेम्पलेट मिटाता है और उसके बाद ही टेम्पलेट को पर्ज किया गया चिह्नित करता है। यदि बायोमेट्रिक स्टोर अनुपलब्ध है, तो कॉल `503` लौटाती है, टेम्पलेट `status: purge_failed` में चला जाता है, और वह पहले ही मिलान से बाहर हो चुका होता है। पर्ज पूरा करने के लिए वही कॉल दोबारा करें।

## त्रुटियाँ

| स्थिति | कब | बॉडी |
| - | - | - |
| `403` | कंसोल उपयोगकर्ता टोकन का उपयोग किया गया है, या API कुंजी को यह कार्रवाई करने की अनुमति नहीं है | `{"detail": "You do not have permission to perform this action."}` |
| `404` | अज्ञात टेम्पलेट, या किसी दूसरे एप्लिकेशन का टेम्पलेट | `{"detail": "Biometric template not found."}` |
| `503` | कोई बायोमेट्रिक स्टोर अनुपलब्ध था। टेम्पलेट `purge_failed` में है और मिलान से बाहर रखा गया है; कॉल दोबारा करें। | `{"detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."}` |

## पर्ज के अन्य बिंदु

टेम्पलेट तब भी पर्ज किए जाते हैं जब आप स्वामी उपयोगकर्ता को [बैच डिलीट उपयोगकर्ता](https://docs.didit.me/hi/management-api/users/delete.md) के साथ हटाते हैं, जब आप उस उपयोगकर्ता के किसी भी सत्र को `deletion_instruction: "privacy_erasure"` के साथ हटाते हैं, और `expires_at` पर स्वचालित रूप से। देखें [पर्ज के बिंदु](https://docs.didit.me/hi/management-api/biometric-templates/overview.md#हटाने-के-बिंदु)।


## OpenAPI

````yaml hi/openapi-25.json DELETE /v3/biometric-templates/{template_uuid}/
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/biometric-templates/{template_uuid}/:
    delete:
      tags:
        - Biometric Templates
      summary: प्रतिधारित बायोमेट्रिक टेम्पलेट को पर्ज करें
      description: >-
        एक ऑप्ट-इन एप्लिकेशन सत्र हटाए जाने पर उपयोगकर्ता से जुड़े एक अलग से
        प्रबंधित, छवि-मुक्त फ़ेस बायोमेट्रिक टेम्पलेट को रखता है (`DELETE
        /v3/session/{sessionId}/delete/` देखें)। टेम्पलेट बायोमेट्रिक डेटा होते
        हैं, जिनका `expires_at` सीमित होता है; उनमें कभी भी छवियां, सत्र डेटा या
        पहचान फ़ील्ड नहीं होते हैं, और उन्हें उपयोगकर्ता हटाए जाने, गोपनीयता
        मिटाने, समय-सीमा समाप्त होने या स्पष्ट पर्ज पर पर्ज कर दिया जाता है। ये
        endpoint केवल एप्लिकेशन API कुंजी (`x-api-key`) स्वीकार करते हैं;
        Business Console उपयोगकर्ता token को `403` के साथ अस्वीकार कर दिया जाता
        है।


        एक टेम्पलेट को पर्ज करता है: इसे हर प्रकार के मिलान से हटा दिया जाता है
        और संग्रहीत टेम्पलेट को हटा दिया जाता है। यह अपरिवर्तनीय है और कार्रवाई
        करने वाले प्रिंसिपल के साथ ऑडिट ट्रेल पर दर्ज किया जाता है।


        **पुनः प्रयास सिमेंटिक्स:** Didit पहले संग्रहीत टेम्पलेट को हटाता है और
        उसके बाद ही टेम्पलेट को पर्ज के रूप में चिह्नित करता है। यदि बायोमेट्रिक
        स्टोर अनुपलब्ध है, तो कॉल `503` लौटाती है, टेम्पलेट `status:
        purge_failed` पर चला जाता है और इसे पहले ही मिलान से बाहर कर दिया जाता
        है; समाप्त करने के लिए उसी कॉल को दोहराएं। पहले से पर्ज किए गए टेम्पलेट
        के पर्ज को दोहराने पर `already_purged` प्राप्त होता है।


        टेम्पलेट संबंधित उपयोगकर्ता के लिए `POST /v3/users/delete/` द्वारा,
        `deletion_instruction: privacy_erasure` के साथ उस उपयोगकर्ता के सत्रों
        को हटाए जाने पर, और स्वचालित रूप से `expires_at` पर भी पर्ज किए जाते
        हैं।
      operationId: purge_biometric_template
      parameters:
        - in: path
          name: template_uuid
          required: true
          description: >-
            टेम्पलेट id, जैसा कि सत्र हटाने वाले endpoints द्वारा
            `biometric_template_uuid` में, चेहरा खोज मिलान पर
            `biometric_template_id` में, या सूची endpoint द्वारा लौटाया जाता है।
          schema:
            type: string
            format: uuid
            example: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
      responses:
        '200':
          description: पर्ज का परिणाम।
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                  outcome:
                    type: string
                    enum:
                      - purged
                      - already_purged
              examples:
                Purged:
                  value:
                    uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                    outcome: purged
                Already purged:
                  value:
                    uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                    outcome: already_purged
        '403':
          description: >-
            कंसोल उपयोगकर्ता token, या API कुंजी की अनुमति नहीं है। ये endpoints
            केवल एप्लिकेशन API कुंजियों को स्वीकार करते हैं।
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            अज्ञात टेम्पलेट, किसी अन्य एप्लिकेशन का टेम्पलेट, या (`GET` पर) हटा
            दिया गया टेम्पलेट।
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Biometric template not found.
        '503':
          description: >-
            बायोमेट्रिक टेम्पलेट को बनाए रखने या हटाने के दौरान एक बायोमेट्रिक
            स्टोर अनुपलब्ध था। कुछ भी हटाया नहीं गया है; वही अनुरोध दोहराएं।
            पुनः प्रयास आइडेम्पोटेंट होते हैं और एक ही टेम्पलेट पर कन्वर्ज होते
            हैं।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Retryable:
                  value:
                    detail: >-
                      The biometric-template operation could not finish because
                      an external store is unavailable. The operation is
                      retryable.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X DELETE
            https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.biometric_templates.delete(
                "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
            )
            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.biometricTemplates.delete("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Delete(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\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.biometricTemplates().delete("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            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->biometricTemplates->delete('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.biometric_templates.delete("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b")

            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.BiometricTemplates.DeleteAsync("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन 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.