https://api.veriko.mx/v1/validations/{id}/retry-policyConfigure retry policy
How-to guide →Activates an automatic retry policy for a validation with a not_found, cep_unavailable or error verdict.
Verdicts of that kind can appear while the operation has NOT yet been processed by Banxico, so the system can re-validate the transfer automatically after a set period.
A retry cycle can return terminal_state="exhausted" when the configured maximum number of retries is reached. It can also return terminal_state="cancelled" when the user cancels the validation's retries manually.
In both cases the cycle can be reactivated up to three times; past that cap, the request is rejected with 422 reactivation_cap_exceeded.
The full state of a validation is obtained with GET /v1/validations/{id}, and the caps are described in the retry policy.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id* | path | string (uuid) | required | Validation UUID. |
Idempotency-Key | header | string | optional | Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is 11111111-2222-3333-4444-555555555555 |
| Parameter | Type | Required | Description |
|---|---|---|---|
retry_policy | object | required | Validation retry policy: activation, limit, interval, and eligible outcomes. |
enabled | boolean | optional |
true |
max_retries | integer (≥ 1) | optional | Maximum number of automatic retries. Once reached, the cycle enters the 3 |
interval_seconds | integer (≥ 300, ≤ 86400) | optional | Seconds to wait between each retry (300–86400, i.e., 5 minutes to 24 hours). e.g.600 |
outcomes | array<string> (items: 1–?, unique items) | optional | Outcomes that trigger a retry. By default, they are ["not_found","cep_unavailable","error"] |
curl -X PUT 'https://api.veriko.mx/v1/validations/{id}/retry-policy' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json' \
-d '{
"retry_policy": {
"enabled": true,
"max_retries": 3,
"interval_seconds": 600,
"outcomes": [
"not_found",
"cep_unavailable"
]
}
}'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
| Field | Type | Description |
|---|---|---|
retry_state | object | Full retry cycle state with configuration, progress, and current status. |
enabled | boolean |
true |
max_retries | integer | nullnullable | Configured maximum number of retries; 3 |
interval_seconds | integer | nullnullable | Interval between retries in seconds, from 600 |
outcomes | array | nullnullable | Outcomes that trigger a retry: ["not_found","cep_unavailable","error"] |
attempts_completed | integer | Number of retries completed so far. e.g.1 |
next_attempt_at | TimestampUTC | null | Date of the next retry; |
resolved_at | TimestampUTC | null | Date when a retry produced |
exhausted_at | TimestampUTC | null | Date when attempts were exhausted; |
cancelled_at | TimestampUTC | null | Cycle cancellation date; |
terminal_state | string | nullnullable | Cycle state: pending |
| Status | Class | Description | Body |
|---|---|---|---|
| 200 | 2xx | Retry policy activated. Returns the full current state of the retry cycle. | UpdateValidationRetryPolicyAttributes |
| 400 | 4xx | The request body is empty or is not valid JSON. | ErrorResponse |
| 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 |
| 410 | 4xx | The validation was purged and this resource no longer exists (validation_purged). | ErrorResponse |
| 413 | 4xx | The request body exceeds the maximum accepted size (body_too_large). | ErrorResponse |
| 422 | 4xx | Invalid policy or precondition not met. retry_policy_invalid, the shape, range, or outcome is not allowed; retry_not_supported_for_bulk, the validation came from an import; retry_not_applicable, its status is outside the three that admit a retry (not_found, cep_unavailable, error) or it changed meanwhile; retry_already_resolved, the cycle already closed; retry_age_exceeded, the validation is older than max_age_seconds; retry_pending_cap_exceeded, the account hit its pending cap or its 24-hour dispatched cap; reactivation_cap_exceeded, that validation hit its reactivation cap. | ErrorResponse |
| Header | Type | Description |
|---|---|---|
Idempotent-Replayed | string | Only present when the request included Idempotency-Key. true marks a response reused from the idempotency cache, which remains valid for 24 hours per account, endpoint, and key. |
| Status | Code | Example |
|---|---|---|
| 400 | body_empty | The request body is empty. Envelope
|
| 400 | invalid_json | The body is not valid JSON. Envelope
|
| 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
|
| 413 | body_too_large | The request body is too large. Envelope
|
Retry policy
PUT /v1/validations/{id}/retry-policy
Validation retry policy: activation, limit, interval, and eligible outcomes.
- Attempts
- —
- Interval
- 5 min – 1 h × 24
- Eligible outcomes
not_found,cep_unavailable,error
This operation accepts an optional retry policy.