# POST /api/v1/transactions/suggested-matches/dismiss

> Dismiss a suggested match

- **Tag:** transactions
- **Operation ID:** `dismiss_suggested_match_api_v1_transactions_suggested_matches_dismiss_post`

## Description

Hide a specific invoice or bill suggestion for a bank transaction. Dismissed pairs are excluded from future inline suggested-match scoring until restored.

## Authentication

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

## Request body

Schema: `DismissSuggestedMatchRequest`

- `transaction_id` (string · required) — Bank transaction UUID the suggestion was shown for.
- `type` (string · required) (one of: invoice, bill) — Whether the dismissed target is an invoice or bill.
- `target_id` (string · required) — UUID of the dismissed invoice or bill.

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_DismissSuggestedMatchResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (DismissSuggestedMatchResponse)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 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 POST 'https://api.ondayzero.com/api/v1/transactions/suggested-matches/dismiss' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "transaction_id": "string",
  "type": "invoice",
  "target_id": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/transactions/suggested-matches/dismiss', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "transaction_id": "string",
  "type": "invoice",
  "target_id": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "transaction_id": "string",
  "type": "invoice",
  "target_id": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/transactions/suggested-matches/dismiss", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/transactions/dismiss-suggested-match
- OpenAPI slice: https://www.ondayzero.com/docs/reference/transactions/dismiss-suggested-match/openapi.json
- Other endpoints in **transactions**: https://www.ondayzero.com/docs/reference/transactions
