# Alt-Fi Income

`POST https://api.agilitycredit.net/v3/alt-fi/income`

Docs page: https://apidocs.agilitycredit.com/api/run-alt-fi-income · Tag: ALT-FI

This endpoint allows users to perform an Alternative Financial (ALT-FI) inquiry on an applicant. By submitting the necessary applicant information, users can retrieve the Annualized Income.

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

Alt-Fi inquiry request payload

Schema: `ApplicantInquiry`

| 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. Required if pull_type is set to 'hard'. |
| `applicant_main.dob` | string |  | The date of birth of the applicant. Required if pull_type is set to 'hard'. |
| `applicant_main.phone` | string |  | The phone number of the applicant. |
| `applicant_main.email` | string |  | The email address of the applicant. |
| `applicant_main.address` | string | yes | The address of the applicant. The format is '{house_number} {street_name} {street_type} {direction}'. street_type and direction are optional. [REQUIRED] |
| `applicant_main.zip` | string | yes | The ZIP code of the applicant. [REQUIRED] |
| `applicant_main.state` | string | yes | The state of the applicant. [REQUIRED] |
| `applicant_main.city` | string | yes | The city of the applicant. Abbreviation of the city name. E.g 'NY'. [REQUIRED] |
| `applicant_main.income` | object |  |  |
| `applicant_main.income.gross_monthly` | integer | yes | Gross monthly income, greater than zero. [REQUIRED] |
| `applicant_main.income.other_monthly` | integer |  | Other monthly income, greater than zero. |
| `applicant_main.income.other_source` | string: `aid_for_dependent_children`, `child_support`, `cola`, `disability`, `fssa`, `housing_allowances`, `military_basic_allowance_for_subsistence`, `municipal_bond_interest`, `non_taxable_sources_of_income`, `other`, … (5 more) |  | Source of other income. |
| `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. Required if pull_type is set to 'hard'. |
| `applicant_co.dob` | string |  | The date of birth of the applicant. Required if pull_type is set to 'hard'. |
| `applicant_co.phone` | string |  | The phone number of the applicant. |
| `applicant_co.email` | string |  | The email address of the applicant. |
| `applicant_co.address` | string | yes | The address of the applicant. The format is '{house_number} {street_name} {street_type} {direction}'. street_type and direction are optional. [REQUIRED] |
| `applicant_co.zip` | string | yes | The ZIP code of the applicant. [REQUIRED] |
| `applicant_co.state` | string | yes | The state of the applicant. [REQUIRED] |
| `applicant_co.city` | string | yes | The city of the applicant. Abbreviation of the city name. E.g 'NY'. [REQUIRED] |
| `applicant_co.income` | object |  |  |
| `applicant_co.income.gross_monthly` | integer | yes | Gross monthly income, greater than zero. [REQUIRED] |
| `applicant_co.income.other_monthly` | integer |  | Other monthly income, greater than zero. |
| `applicant_co.income.other_source` | string: `aid_for_dependent_children`, `child_support`, `cola`, `disability`, `fssa`, `housing_allowances`, `military_basic_allowance_for_subsistence`, `municipal_bond_interest`, `non_taxable_sources_of_income`, `other`, … (5 more) |  | Source of other income. |

Example:

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

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Alt-Fi inquiry processed successfully | one of: AltFiIncomeResponse, InquiryResponseWithBureauError, ComplianceResponse |
| 400 | Bad Request | BadRequestResponse |
| 401 | Unauthorized | UnauthorizedResponse |
| 429 | Too Many Requests | TooManyRequestsResponse |
| 500 | Internal Server Error | AgilityServerErrorResponse |
The 200 body is one of: `AltFiIncomeResponse`, `InquiryResponseWithBureauError`, `ComplianceResponse`.

### Error bodies

400:

```json
{
  "status": "Bad Request - Invalid Parameters",
  "error": "Failed schema validation. Error: data.pull_type must be one of ['prequal', 'hard'], Path: ['data', 'pull_type'], Data: prequalification"
}
```

401:

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

429:

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

500:

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