> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Duplicate Entrance Score

> Learn how the Duplicate Entrance Score detects duplicate survey entrants using demographics and IP.

## What is the Duplicate Entrance Score?

The **Duplicate Entrance Score (DES)** detects whether a respondent is likely a duplicate of another recent entrant in the same survey. It compares **demographics** and, when available, **IP address** against peers who entered shortly before.

DES is available for **API v3** projects only. It is not supported on v1/v2 `addRespondent` requests.

## High-level checks performed

* Requires **at least 4** demographic fields to compute a valid score. Fewer than 4 demographics are accepted but scored as invalid (`N/A`).
* Accepts **up to 10** demographics. Each demographic `type` must be unique (use custom type strings instead of repeating `"other"`).
* Compares the current entrant against peers from the last **15 minutes** (up to a minimum of **10** peers when available; fewer peers still compared).
* If no peers exist (first entrant in the window), the score is **100** (`VALID_ENTRANT`).
* If any peer shares the same IP, the score is **0** (`DUPLICATE_IP`) and peer respondent IDs are returned.
* Otherwise, demographics are compared per peer. Exact matches keep a low (duplicate-like) score; similar age / year of birth can add a limited penalty; any hard mismatch treats that peer as different. The final score is the **minimum** over peers.
* Scores **below 40** are categorized as `DUPLICATE_ENTRANT`; otherwise `VALID_ENTRANT`.

## Demographic types

`type` is a free-form string. Any custom label is allowed and compared with **exact** match (case-insensitive after trim), except the age-like types below.

**Recommended `type` values**

| `type`        | Notes                                                           |
| ------------- | --------------------------------------------------------------- |
| `age`         | Age-like similarity (see below)                                 |
| `yearOfBirth` | Age-like similarity (see below)                                 |
| `ageRange`    | Exact match                                                     |
| `gender`      | Exact match                                                     |
| `country`     | Exact match                                                     |
| `city`        | Exact match                                                     |
| `zip`         | Exact match                                                     |
| `ethnicity`   | Exact match                                                     |
| `salaryRange` | Exact match                                                     |
| `jobTitle`    | Exact match                                                     |
| `other`       | Exact match; prefer a specific custom type string when possible |

**Age-like types (`age`, `yearOfBirth`)**

These are the only types that use similarity instead of exact match:

* Numeric answers within **±3** count as **similar** (adds a limited score penalty once per peer, even if both `age` and `yearOfBirth` are similar)
* Exact numeric matches count as **same**
* Non-numeric or larger differences count as **different** (that peer is treated as fully different)

All other types — including recommended values above and any custom string — always use exact match.

## Categories

| Category            | Meaning                                                             |
| ------------------- | ------------------------------------------------------------------- |
| `VALID_ENTRANT`     | No strong evidence of a duplicate entrance                          |
| `DUPLICATE_ENTRANT` | Demographics look highly similar to a recent peer                   |
| `DUPLICATE_IP`      | Same IP as a recent peer                                            |
| `N/A`               | Score could not be computed (for example fewer than 4 demographics) |

## Default cleaning

When cleaning is enabled with recommended settings:

* Exclude respondents with a DES score **below 40**
* Category-based DES exclusions (`DUPLICATE_IP`, `DUPLICATE_ENTRANT`) are **off** by default

## How to use the DES?

Send a single DES data point on [`POST /v3/addRespondent`](/api-reference/endpoints/v3/addRespondent) with optional `entranceTime` (defaults to the current timestamp if omitted), optional `ip`, and a `demographics` array. Only **one** DES data point is allowed per respondent (`dataPointId` defaults to `"DES"`).
