# OFAC Check

`POST https://api.agilitycredit.net/v3/ofac`

Docs page: https://apidocs.agilitycredit.com/api/run-ofac · Tag: Compliance

This endpoint allows users to perform an OFAC (Office of Foreign Assets Control) check on an applicant or a business to ensure compliance with U.S. regulations. By submitting the necessary applicant or entity information, users can verify if the applicant or entity is listed on any OFAC sanctions lists. The response will indicate whether the applicant or entity passes the OFAC check or if there are any matches found. For screening entities, only the business name is required.

Authentication: `Authorization: Bearer <api key>`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | yes | A unique, idempotent key. We recommend to use a guid |
| `Agc-Tenant-Id` | header | yes | The tenant ID provided by Agility Credit. |
| `Agc-User-Id` | header | yes | The requestor user ID. |
| `Agc-Applicant-Id` | header |  | If passed, will assign the report to that applicant. If not, will create a new applicant ID |

## Request body (`application/json`), required

OFAC check request payload

Schema: `OFACRequest`

Variant 1: `Individual`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `applicant_main` | object | yes |  |
| `applicant_main.first_name` | string | yes | The first name of the applicant. [REQUIRED] |
| `applicant_main.middle_name` | string |  | The middle name of the applicant. Middle name can be an initial. |
| `applicant_main.last_name` | string | yes | The last name of the applicant. [REQUIRED] |
| `applicant_main.ssn` | string |  | The SSN of the applicant. |
| `applicant_main.dob` | string | yes | The date of birth of the applicant. [REQUIRED] unless soft_check is true. |
| `applicant_main.phone` | string |  | The phone number of the applicant. |
| `applicant_main.email` | string |  | The email address of the applicant. |
| `applicant_main.address` | string |  | The address of the applicant. The format is '{house_number} {street_name} {street_type} {direction}'. street_type and direction are optional. |
| `applicant_main.zip` | string |  | The ZIP code of the applicant. |
| `applicant_main.state` | string |  | The state of the applicant. |
| `applicant_main.city` | string |  | The city of the applicant. Abbreviation of the city name. E.g 'NY'. |
| `applicant_co` | object |  |  |
| `applicant_co.first_name` | string | yes | The first name of the applicant. [REQUIRED] |
| `applicant_co.middle_name` | string |  | The middle name of the applicant. Middle name can be an initial. |
| `applicant_co.last_name` | string | yes | The last name of the applicant. [REQUIRED] |
| `applicant_co.ssn` | string |  | The SSN of the applicant. |
| `applicant_co.dob` | string | yes | The date of birth of the applicant. [REQUIRED] unless soft_check is true. |
| `applicant_co.phone` | string |  | The phone number of the applicant. |
| `applicant_co.email` | string |  | The email address of the applicant. |
| `applicant_co.address` | string |  | The address of the applicant. The format is '{house_number} {street_name} {street_type} {direction}'. street_type and direction are optional. |
| `applicant_co.zip` | string |  | The ZIP code of the applicant. |
| `applicant_co.state` | string |  | The state of the applicant. |
| `applicant_co.city` | string |  | The city of the applicant. Abbreviation of the city name. E.g 'NY'. |
| `soft_check` | boolean |  | If true, then dob is not required inside applicant_main and applicant_co. |

Variant 2: `Entity`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `business_main` | object | yes |  |
| `business_main.business_name` | string | yes | Name of the business for screening entities. [REQUIRED] |

Example:

```json
{
  "applicant_main": {
    "first_name": "JANE",
    "last_name": "SAMPLE",
    "phone": "",
    "email": "",
    "dob": "1901-01-01",
    "address": "123 MAIN ST",
    "city": "ANYTOWN",
    "state": "TX",
    "zip": "750010000"
  },
  "applicant_co": {
    "first_name": "JANE",
    "last_name": "DOE",
    "phone": "",
    "email": "",
    "dob": "1980-01-01",
    "address": "123 MAIN ST",
    "city": "ANYTOWN",
    "state": "TX",
    "zip": "750010000"
  }
}
```

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | OFAC check processed successfully | one of: IndividualResponse, EntityResponse |
| 400 | Bad Request | BadRequestResponseOFAC |
| 401 | Unauthorized | UnauthorizedResponse |
| 429 | Too Many Requests | TooManyRequestsResponse |
| 500 | Internal Server Error | AgilityServerErrorResponse |
The 200 body is one of: `IndividualResponse`, `EntityResponse`.

### Error bodies

400:

```json
{
  "status": "Bad Request - Validation Failed",
  "error": "Failed schema validation. Error: data.applicant_main must contain ['dob'] properties, Path: ['data', 'applicant_main'], Data: {'first_name': 'Jimmy', 'middle_name': 'H', 'last_name': 'BRIDGES', 'phone': '', 'email': '', 'address': '217 PINEWOOD DR', 'city': 'EUSTIS', 'state': 'FL', 'zip': '327267427'}"
}
```

401:

```json
{
  "message": "Unauthorized"
}
```

429:

```json
{
  "error": "Too Many Requests"
}
```

500:

```json
{
  "message": "Agility Server Error"
}
```
