# Deduct a receipt's VAT on evidence

Source: https://amanucci.com/nl/docs/developers/api/cases/deductOnEvidence

## POST /v1/entities/{entityId}/cases/{caseId}/deduct-on-evidence

Deduct a receipt's VAT on evidence

Deduct a till receipt's printed VAT under substance over form. A receipt is not the invoice KB nr. 3 art. 3 §1 1° requires, so the books deduct nothing by default and ask the client for the invoice; the deduction may not be refused for that form alone if the material conditions are established (Cass. 25.11.2022, F.21.0135.N), and it is for the company to establish them. This act is that ruling, on evidence: it RESOLVES the receipt's live nudge case (a `doctrine_boundary` case the receipt opened). One transaction: every evidence id must be an artifact or a bank transaction of these books; two claims citing the case are recorded in your name — the election and its evidence list, each carrying the evidence; the receipt's event gets a new version with the evidence artifacts stapled; the case closes `corrected` with your reason. The ADE then reverses the receipt's booking and re-posts it with the printed VAT deducted. Any other case is 409 `case_not_overridable`; an evidence id not of these books is 404 `evidence_not_found`; another entity's case is the hidden 404; a closed case is 409 `case_terminal`. A retry on a case this act resolved answers 200 with the stored result. Never automatic: no machine actor reaches it. A case the Assembler closed because its document was booked from another of its files (a scan's gate case its e-invoice booked) is 409 `case_booked_from_file`, in words naming the kind of file it was booked from.

Operation ID: `deductOnEvidence`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "caseId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DeductOnEvidence"
      }
    }
  }
}
```

### Responses

#### 200 A retry on a case this act resolved: the stored result.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/DeductOnEvidenceReplay"
    }
  }
}
```

#### 201 The ruling is recorded with your name; the receipt is re-decided with its VAT deducted.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/DeductOnEvidenceResult"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
