https://api.veriko.mx/v1/validations/{id}/purge/preparePrepare the permanent deletion of a validation
How-to guide →Describes what the permanent deletion of one of your own validations would delete and issues the token with which POST /v1/validations/{id}/purge/execute confirms it. It changes nothing: the validation and its files stay as they were.
DELETE /v1/validations/{id} only removes the validation from the history; the record, the CEP, the extracted data, and the receipt file keep existing. The permanent deletion, in two steps, eliminates them.
The response includes:
confirmation_token: Single-use token, bound to the account and to this validation, that expires inexpires_inseconds.will_delete: What will be deleted: the file, the CEP, the fields with content, and the number of derived records.will_keep: The fields the tombstone the validation is left as keeps.cancels_pending_retries:truewhen there is an open retry cycle, which the deletion cancels.same_image_validation_ids: Other validations of the account with the same receipt, which are not touched.irreversible:truealways.
Only one of your own validations in a terminal status is accepted. A validation in progress responds with an HTTP status 409 (with purge_validation_in_progress in the body), and one already purged, with an HTTP status 410 (with validation_purged in the body).
The tombstone, what is deleted, and the limitations are in the retention of receipts and data.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id* | path | string (uuid) | required | Validation UUID. |
curl -X POST 'https://api.veriko.mx/v1/validations/{id}/purge/prepare' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
| Field | Type | Description |
|---|---|---|
data* | object | JSON:API resource of the preparation. Its |
type* | string | Resource type, fixed for this operation. Part of its identity in the JSON:API envelope. Always validation_purge |
id* | string (uuid) | Identifier of the validation that would be deleted. e.g.3fa85f64-5717-4562-b3fc-2c963f66afa6 |
attributes* | object | Summary of the deletion and the confirmation token. |
confirmation_token* | string | Single-use token, bound to the account and to this validation, that eyJhZG1pbl9pZCI6Ii4uLiJ9.q1w2e3r4t5y6u7i8o9p0 |
expires_in* | integer | Seconds the token stays valid. e.g.120 |
irreversible* | boolean |
true |
will_delete* | object | What the permanent deletion would delete. |
image* | boolean |
true |
cep* | boolean |
true |
stored_data* | array | Validation fields with content that would be emptied. Of ["request_data","ocr_result","normalized_data","banxico_result"] |
retry_attempts* | integer | Number of retry attempts that would be deleted. e.g.2 |
probe_attempts* | integer | Number of candidate-account probes that would be deleted. e.g.0 |
webhook_deliveries* | integer | Number of webhook deliveries of this validation whose sent body and receiver response would be removed. The record of each delivery is kept. e.g.1 |
notifications* | integer | Number of notification deliveries of this validation whose content would be emptied. The notifications in the account inbox would be deleted. e.g.1 |
idempotency_responses* | integer | Number of stored 1 |
audit_traces* | boolean |
true |
will_keep* | array | Fields the tombstone the validation is left as keeps: enough for quota, statistics, finance, and history to keep adding up. e.g.["id","validation_type","status","banxico_status","amount","created_at","purged_at"] |
cancels_pending_retries* | boolean |
false |
refunds_quota* | boolean |
false |
same_image_validation_ids* | array | Identifiers of other validations of the same account with the same receipt (up to 20). They are not touched: each keeps its own copy of what was extracted and is deleted separately. e.g.[] |
| Status | Class | Description | Body |
|---|---|---|---|
| 200 | 2xx | Summary of what would be deleted and the confirmation token. The validation did not change. | ValidationPurgePrepareResponse |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 403 | 4xx | Insufficient permissions. | ErrorResponse |
| 404 | 4xx | Validation not found, or not owned by the account (not_found). | ErrorResponse |
| 409 | 4xx | The validation is still in progress (queued or processing) and cannot be purged yet (purge_validation_in_progress, with the status in meta.status). | ErrorResponse |
| 410 | 4xx | The validation was purged and this resource no longer exists (validation_purged). | ErrorResponse |
| 422 | 4xx | Invalid UUID in path (invalid_uuid). | ErrorResponse |
| 429 | 4xx | Rate limit exceeded | ErrorResponse |
| Status | Code | Example |
|---|---|---|
| 401 | unauthorized | Invalid or missing authentication credentials. Envelope
|
| 403 | permission_denied | You do not have permission to access this resource. Envelope
|
| 410 | validation_purged | The validation was purged and this resource no longer exists. Envelope
|
| 429 | rate_limit_exceeded | Rate limit exceeded. Try again in 45 seconds. Envelope
Response headers
|