# IntraFi Exclusions
> Certain institutions may be excluded per Entity when sweeping funds into the IntraFi network. This is useful when an Entity already has deposits at a particular bank, and does not want to sweep additional funds to it. It may take 5 business days for an exclusion to be processed.

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `intrafi_exclusion.created` and `intrafi_exclusion.updated`.

## The IntraFi Exclusion object
### Example
```json
{
  "bank_name": "Example Bank",
  "created_at": "2020-01-31T23:59:59Z",
  "entity_id": "entity_n8y8tnk2p9339ti393yi",
  "excluded_at": "2020-02-01T23:59:59+00:00",
  "fdic_certificate_number": "314159",
  "id": "intrafi_exclusion_ygfqduuzpau3jqof6jyh",
  "idempotency_key": null,
  "status": "completed",
  "submitted_at": "2020-02-01T00:59:59+00:00",
  "type": "intrafi_exclusion"
}
```
### Attributes
- `bank_name` (string, nullable)
  The name of the excluded institution.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the exclusion was created.

- `entity_id` (string)
  The entity for which this institution is excluded.

- `excluded_at` (string, nullable)
  When this was exclusion was confirmed by IntraFi.

- `fdic_certificate_number` (string, nullable)
  The Federal Deposit Insurance Corporation's certificate number for the institution.

- `id` (string)
  The identifier of this exclusion request.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `status` (enum)
  The status of the exclusion request.
  Cases:
  * `pending` (The exclusion is being added to the IntraFi network.)
  * `completed` (The exclusion has been added to the IntraFi network.)
  * `archived` (The exclusion has been removed from the IntraFi network.)
  * `ineligible` (The exclusion wasn't eligible to be added to the IntraFi network.)

- `submitted_at` (string, nullable)
  When this was exclusion was submitted to IntraFi by Increase.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `intrafi_exclusion`.

## List IntraFi Exclusions
GET /intrafi_exclusions

### Example
```curl
curl \
  --url "${INCREASE_URL}/intrafi_exclusions?entity_id=entity_n8y8tnk2p9339ti393yi" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `entity_id` (string, optional)
  Filter IntraFi Exclusions for those belonging to the specified Entity.

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a IntraFi Exclusion List object:
```json
{
  "data": [
    {
      "bank_name": "Example Bank",
      "created_at": "2020-01-31T23:59:59Z",
      "entity_id": "entity_n8y8tnk2p9339ti393yi",
      "excluded_at": "2020-02-01T23:59:59+00:00",
      "fdic_certificate_number": "314159",
      "id": "intrafi_exclusion_ygfqduuzpau3jqof6jyh",
      "idempotency_key": null,
      "status": "completed",
      "submitted_at": "2020-02-01T00:59:59+00:00",
      "type": "intrafi_exclusion"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create an IntraFi Exclusion
POST /intrafi_exclusions

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/intrafi_exclusions" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "entity_id": "entity_n8y8tnk2p9339ti393yi",
    "fdic_certificate_number": "314159"
  }'
```

### Body Parameters
- `entity_id` (string, required)
  The identifier of the Entity whose deposits will be excluded.

- `fdic_certificate_number` (string, required)
  The FDIC certificate number of the financial institution to be excluded. An FDIC certificate number uniquely identifies a financial institution, and is different than a routing number. To find one, we recommend searching by Bank Name using the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).

## Get an IntraFi Exclusion
GET /intrafi_exclusions/{intrafi_exclusion_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/intrafi_exclusions/account_in71c4amph0vgo2qllky" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `intrafi_exclusion_id` (string, required)
  The identifier of the IntraFi Exclusion to retrieve.

## Archive an IntraFi Exclusion
POST /intrafi_exclusions/{intrafi_exclusion_id}/archive

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/intrafi_exclusions/intrafi_exclusion_ygfqduuzpau3jqof6jyh/archive" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `intrafi_exclusion_id` (string, required)
  The identifier of the IntraFi Exclusion request to archive. It may take 5 business days for an exclusion removal to be processed. Removing an exclusion does not guarantee that funds will be swept to the previously-excluded bank.