PUThttps://api.veriko.mx/v1/validations/{id}/retry-policy

Configure retry policy

Visibility
public
Auth
API key
Permission
validations.retries.manage
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.

Parameters
ParameterInTypeRequiredDescription
id*pathstring (uuid)required

Validation UUID.

Idempotency-Keyheaderstringoptional

Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is (user_id, endpoint, key). Retries with the same key and the same body return the byte-for-byte cached response with the Idempotent-Replayed: true header, without consuming rate-limit quota, without re-firing webhooks, and without creating a new validations row. Same key with a different body → 422 idempotency_key_reused. Same key with an in-flight request → 409 idempotency_key_in_progress. 5xx, 429, 408, 401 and 403 responses are not cached (retries with the same key are processed for real); the other 4xx responses (400, 404, 409, 422) are cached and replayed. Format: 1–255 characters, alphanumeric + _ + -.

e.g. 11111111-2222-3333-4444-555555555555
Parameters
ParameterTypeRequiredDescription
retry_policyobjectrequired

Validation retry policy: activation, limit, interval, and eligible outcomes.

enabledbooleanoptional

true when the retry cycle is active. With false, the other fields are ignored.

e.g. true
max_retriesinteger (≥ 1)optional

Maximum number of automatic retries. Once reached, the cycle enters the exhausted terminal state. The allowed limit depends on the plan: Gratis (free) 1, Personal 3, Negocio (business) 5, Empresa (enterprise) 10 and Volumen (volume) 20; exceeding it returns 422 retry_policy_invalid.

e.g. 3
interval_secondsinteger (≥ 300, ≤ 86400)optional

Seconds to wait between each retry (300–86400, i.e., 5 minutes to 24 hours).

e.g. 600
outcomesarray<string> (items: 1–?, unique items)optional

Outcomes that trigger a retry. By default, they are not_found, cep_unavailable, and error; the combination ["not_found", "cep_unavailable"] excludes error.

e.g. ["not_found","cep_unavailable","error"]
Request
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.

Response 200UpdateValidationRetryPolicyAttributes
— Retry policy activated. Returns the full current state of the retry cycle.
FieldTypeDescription
retry_stateobject

Full retry cycle state with configuration, progress, and current status.

enabledboolean

true when the validation has retries configured, even if its cycle has already ended (terminal_state).

e.g. true
max_retriesinteger | nullnullable

Configured maximum number of retries; null when enabled is false.

e.g. 3
interval_secondsinteger | nullnullable

Interval between retries in seconds, from 300 to 86400; null when enabled is false.

e.g. 600
outcomesarray | nullnullable

Outcomes that trigger a retry: not_found, cep_unavailable, and error; null when enabled is false.

e.g. ["not_found","cep_unavailable","error"]
attempts_completedinteger

Number of retries completed so far.

e.g. 1
next_attempt_atTimestampUTC | null

Date of the next retry; null when none is scheduled.

resolved_atTimestampUTC | null

Date when a retry produced valid; null until that occurs.

exhausted_atTimestampUTC | null

Date when attempts were exhausted; null until that occurs.

cancelled_atTimestampUTC | null

Cycle cancellation date; null until that occurs.

terminal_statestring | nullnullable

Cycle state: pending, resolved, exhausted, or cancelled. It is null when the validation has no retry cycle.

e.g. pending
Response status codesPUT /v1/validations/{id}/retry-policy
StatusClassDescriptionBody
2002xx
Retry policy activated. Returns the full current state of the retry cycle.
UpdateValidationRetryPolicyAttributes
4004xx
The request body is empty or is not valid JSON.
ErrorResponse
4014xx
Authentication is required or the provided credentials are invalid.
ErrorResponse
4034xx
The validations.retries.manage permission is missing (permission_denied). The "Validate" and "Full access" API key presets include it. With "Read only", or with an explicit permission list that leaves it out, this operation responds 403.
ErrorResponse
4044xx
Validation not found or not owned by the account (not_found).
ErrorResponse
4104xx
The validation was purged and this resource no longer exists (validation_purged).
ErrorResponse
4134xx
The request body exceeds the maximum accepted size (body_too_large).
ErrorResponse
4224xx
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
4294xx
Rate limit exceeded (rate_limit_exceeded: wait a few seconds).
RetryAfterError
Response headers200
HeaderTypeDescription
Idempotent-Replayedstring
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.
Errors from PUT /v1/validations/{id}/retry-policy
StatusCodeExample
400body_empty

The request has no body.

Envelope
meta.request_id
c3d4e5f6a1b33b1a6f5e4d3c
400invalid_json

The request body is not valid JSON. Check its syntax and resend it.

Envelope
meta.request_id
d4e5f6a1b2c44c2b1a6f5e4d
401unauthorized

This request requires authentication.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
403permission_denied

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c00c9b8a7f6e5d
410validation_purged

This validation was permanently deleted.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
413body_too_large

The body exceeds the 1 MB maximum.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
422reactivation_cap_exceeded

Retries for this validation were already reactivated 3 times, the maximum.

Envelope
meta.request_id
ab7f08e77013
422retry_age_exceeded

This validation is too old for retries.

Envelope
meta.request_id
d14b6608d1e7
422retry_already_resolved

Retries for this validation already finished.

Envelope
meta.request_id
a5ff8be76374
422retry_not_applicable

This validation does not accept retries.

Envelope
meta.request_id
ac9347cf7fbc
422retry_not_supported_for_bulk

Bulk validations do not support retries.

Envelope
meta.request_id
a520ebc38dad
422retry_pending_cap_exceeded

You reached the 24-hour retry limit.

Envelope
meta.request_id
a0cde3c4e478
422retry_policy_invalid

The retry policy is not valid.

Envelope
source.pointer
/data/attributes/retry_policy/max_retries
meta.request_id
ca7093cafb0e
422validation_error

Some data needs fixing.

Envelope
meta.request_id
a39563b7e6c5
429rate_limit_exceeded

You exceeded the request limit.

Envelope
meta.request_id
f7a8b9c0d1e22e1d0c9b8a7f
Response headers
  • Retry-After: integer — Seconds to wait before retrying. Matches the endpoint's rate-limit window (typically 60s for list endpoints, 1-5s for in-flight idempotent operations).
  • X-RateLimit-Limit: integer — Configured request cap for this bucket. It is emitted on every 429 and, on the authenticated API, also on successful responses, where it is the per-key cap of the account plan.
  • X-RateLimit-Remaining: integer — Requests remaining in the current window. Always 0 at the moment of the 429; on a successful response of the authenticated API it is what is left of the per-key cap.
  • X-RateLimit-Reset: integer — Absolute Unix epoch (seconds) when the window resets. Emitted on every 429, alongside Retry-After, and on successful responses of the authenticated API.

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.