Idempotency
Zenoo supports idempotent requests through theexternal_reference field. This prevents duplicate verifications caused by retries, user double-clicks, network failures, or asynchronous workflow replays.
How It Works
Include anexternal_reference in any verification request. If you submit the same external_reference twice:
- The second request returns the existing case’s tokens.
- No duplicate verification is created.
- No additional charges apply.
external_reference is scoped to your project. Two different projects can use the same reference value without conflict.
Company Verification Example
Person Verification Example
Duplicate Detection Behavior
When Zenoo receives a request with anexternal_reference that already exists in your project:
pull and start tokens pointing to the original case.
What Happens to the Request Body
The second request’s body fields (company name, country, etc.) are ignored. Zenoo returns the existing case based solely on the
external_reference match. If you need to run a new verification with different data for the same entity, use a different external_reference.When to Use
Always, in production. The
external_reference field protects against accidental duplicates with no downside.external_reference field protects against:
- Network retries. If your HTTP client retries a timed-out request, you do not get charged twice.
- User double-clicks. If a user clicks “Verify” twice, only one verification runs.
- Workflow replays. If your orchestration system replays a failed step, the verification is not duplicated.
- Distributed systems. If two instances of your service submit the same verification concurrently, one case is created.
Best Practices
Use your internal identifiers. Mapexternal_reference to something unique in your system:
| Your System | Example Reference |
|---|---|
| Loan application | APP-2026-0042 |
| Customer onboarding | ONBOARD-2026-1234 |
| Periodic review | REVIEW-2026-Q1-0042 |
| Person re-verification | PERSON-REVERIFY-2026-0042 |
reference-generator.js
Webhook Deduplication
Idempotency also matters on the receiving side. Zenoo may deliver the same webhook event more than once. Usejourney_id combined with event_type as a deduplication key:
server.js
Testing Idempotency
Verify that duplicate requests return the same case:case_reference and tokens in both responses. No new verification is created.
Next Steps
- Error Handling — Retry strategies and backoff patterns
- Webhooks — Webhook deduplication in detail
- Result Delivery — Retrieving verification results