---
title: "Decide on a likely duplicate"
description: "Learn how Certinvo holds an invoice that repeats one already filed, and how you keep or dismiss it."
---

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

# Decide on a likely duplicate

The same invoice can arrive twice, for example by email and by API, or because a system sent it again. Certinvo
files it, marks it as a likely duplicate, and your sending setting decides whether it waits for you or goes with its
warning.

One case is refused instead. An outgoing invoice whose number is exactly the number of another outgoing invoice of
the same company is not filed: an invoice number is given once (UStG § 14(4) Nr. 4). The answer is 409
`invoice_number_used`, or an operation item that failed with that code. A version of the same invoice keeps its
number and is not refused. A received invoice is never refused for its number.

## What counts as a likely duplicate

An invoice is held when another invoice of the same company and direction has the same:

- seller name,
- invoice number,
- issue date,
- currency,
- amount due.

The seller name and the invoice number are matched without spaces, punctuation and letter case. So `RE-1001 ` and
`re 1001` are the same number. For an outgoing invoice this is what can still be held: the exact same number is
refused, as above, and a number written another way is filed and held.

Only the newest version of each invoice is compared. A new version of an edited invoice is never a duplicate of the
version it replaces. When one of these facts is missing, nothing is compared.

## What happens when one is held

- It is filed and checked like any other invoice.
- Its history gets `api:duplicate-suspected`, with the earlier invoice's id. A webhook hears it like any step.
- `GET /v1/invoices/{id}` answers `duplicate` with `of` (the earlier invoice) and `decision` (`null` until you
  decide).
- With **Send with warning** (`"duplicates": "send"`, the default), it is sent like any other invoice, and its warning
  stays on the invoice. A likely duplicate is a Certinvo check, not a legal requirement, so it holds nothing unless you
  choose so.
- With **Likely duplicates** set to **Hold for review**, it is not emailed by itself, even when
  [automatic sending](/how-to/invoices/send-an-invoice-by-email#send-by-itself) is on. A person can still send it by
  hand.

## Decide in the console

In Ausgang and Eingang, the invoice's row says **Wahrscheinlich doppelt** under its number until you decide. This
includes a file you convert a second time on Convert: open Ausgang and the new row says so at once.

The invoice's page shows **Wahrscheinlich doppelt** under its title, with a link to the earlier invoice.

- **Behalten, keine Doppelung** keeps it.
- **Als doppelt verwerfen** dismisses it.

After a decision the page says which, and asks nothing more. If the API refuses the decision, the page says why in
the console's language.

## Decide through the API

```bash
curl -s \
  -H "Authorization: Bearer cvo_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"decision": "keep"}' \
  "https://<api-host>/v1/invoices/<id>/duplicate"
```

The body is `{"decision": "keep"}` or `{"decision": "dismiss"}`. A signed-in person or an API key may decide, so a
platform can answer for its companies.

- `keep` writes `api:duplicate-kept`. When the invoice's plan sends it by itself and its verdict is one you chose, it
  is queued for sending now.
- `dismiss` writes `api:duplicate-dismissed`. Nothing is sent.

A decision is made once.

| Status | Code | Meaning |
|---|---|---|
| 400 | `invalid_duplicate_decision` | The body is not one of the two decisions. |
| 404 | `unknown_invoice` | This company has no such invoice. |
| 409 | `not_a_likely_duplicate` | The invoice was never held, so there is nothing to decide. |
| 409 | `duplicate_already_decided` | It was already kept or dismissed. |

## See also

- [Send an invoice by email](/how-to/invoices/send-an-invoice-by-email)
- [Hear every step by webhook](/how-to/invoices/hear-every-step-by-webhook)

Source: https://docs.certinvo.com/how-to/invoices/decide-on-a-likely-duplicate/index.mdx
