Skip to main content

Delete a Scan Prompt Template

Delete a scan prompt template. Clients can only delete their own templates, while super admins can delete any template.

Endpoint

DELETE https://api.verifik.co/v2/ocr/scan-prompt/template/:id

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Path Parameters

NameTypeRequiredDescription
idstringYesThe unique identifier of the template to delete

Request

import axios from 'axios';

const options = {
method: 'DELETE',
url: 'https://api.verifik.co/v2/ocr/scan-prompt/template/template_id_123',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Response

{
"data": {
"_id": "template_id_123",
"name": "Custom CC Template",
"deleted": true
}
}

Features

  • Template Deletion: Permanently delete templates
  • Access Control: Clients can only delete their own templates
  • System Template Protection: Clients cannot delete system templates
  • Safe Deletion: Verify template ownership before deletion