# GET /api/v1/vendors/check-duplicates

> Check for duplicate vendors

- **Tag:** vendors
- **Operation ID:** `check_duplicates_api_v1_vendors_check_duplicates_get`

## Description

Check if a vendor already exists using name, email, tax ID similarity.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `name` (query, string, required) — Vendor name to check
- `email` (query, string, optional) — Email to check
- `tax_id` (query, string, optional) — Tax ID to check
- `exclude_id` (query, string, optional) — Vendor ID to exclude (for updates)

## Responses

### 200 — Successful Response

Schema: `VendorDuplicateCheckResponse`

- `has_duplicates` (boolean · required) — Whether duplicates were found.
- `duplicates` (array · VendorDuplicateCandidateResponse) → `VendorDuplicateCandidateResponse` — List of potential duplicates.
  - `id` (string · required) — Vendor UUID.
  - `name` (string · required) — Vendor name.
  - `email` (string) — Vendor email.
  - `similarity_score` (number · required) — Similarity score (0.0-1.0).
  - `match_type` (string · required) — Type of match (name, email, tax_id, phone).

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/vendors/check-duplicates' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/vendors/check-duplicates', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/vendors/check-duplicates", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/vendors/check-duplicates
- OpenAPI slice: https://www.ondayzero.com/docs/reference/vendors/check-duplicates/openapi.json
- Other endpoints in **vendors**: https://www.ondayzero.com/docs/reference/vendors
