---
title: "Exclude Patients By Csv"
method: POST
path: "/enhanced/exclude-patients-by-csv"
tags: ["Clients"]
---

# Exclude Patients By Csv

`POST /enhanced/exclude-patients-by-csv`

## Request

- Base URL: `https://api.puppeteerai.com`
- URL: `https://api.puppeteerai.com/enhanced/exclude-patients-by-csv`
- Auth: none declared. Required headers: `Authorization`

Exclude patients from an eligibility flow based on CSV data.

    This endpoint reads a CSV file with patient information and marks matching patients
    as excluded. The CSV should have columns: Patient Name, DOB, Sex, Age, Tel No., Acc #.
    Patients are matched by firstName, lastName, and birthDate.

    Args:
        input: Request body containing:
            - eligibility_flow_id: UUID of the eligibility flow
            - csv_data: CSV content as string with headers
        Example:
        {
            "eligibility_flow_id": "uuid-del-eligibility-flow",
            "csv_data": "Patient Name,DOB,Sex,Age,Tel No.,Acc #
Smith, John,01/15/1980,M,44,5551234567,12345"
        }
        authorization: API key for authentication.

    Returns:
        dict: Dictionary with exclusion results.

## Headers

- `Authorization` string, required

## Request body

- ExcludePatientsByCsvInput
  - `eligibility_flow_id` string, uuid, required
  - `csv_data` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api.md) - [All operations](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/revisions/94b4e928b42f?raw)
