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
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the template to delete |
Request
- JavaScript
- Python
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);
}
import requests
url = "https://api.verifik.co/v2/ocr/scan-prompt/template/template_id_123"
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <your_token>'
}
response = requests.delete(url, headers=headers)
print(response.json())
Response
- 200
- 403
- 404
{
"data": {
"_id": "template_id_123",
"name": "Custom CC Template",
"deleted": true
}
}
{
"code": "FORBIDDEN",
"message": "Clients cannot delete system templates"
}
{
"code": "NOT_FOUND",
"message": "Template not found"
}
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