# Loan Offers
> A Loan Offer is a firm offer of credit extended by the bank to a customer following an approved Loan Application.

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

## The Loan Offer object
### Example
```json
{
  "acceptance": null,
  "amount": 1000000,
  "created_at": "2020-01-31T23:59:59Z",
  "entity_id": "entity_n8y8tnk2p9339ti393yi",
  "expires_at": "2020-01-31T23:59:59Z",
  "fee": 50000,
  "id": "loan_offer_fspi9zpgcib98ok0h3dh",
  "interest_rate": "0.07",
  "loan_application_id": "loan_application_mpe6oe4a2gc5knzl1xfy",
  "program_id": "program_i2v2os4mwza1oetokh9i",
  "status": "pending",
  "terms_file_id": "file_makxrc67oh9l6sg7w9yc",
  "type": "loan_offer"
}
```
### Attributes
- `acceptance` (dictionary, nullable)
  If the Loan Offer has been accepted, this contains details of the acceptance.

  - `acceptance.accepted_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Loan Offer was accepted.

  - `acceptance.account_id` (string, nullable)
    The identifier of the Account opened for disbursement of the loan, once it has been created.

- `amount` (integer)
  The offered amount of credit in the minor unit of the currency. For dollars, this is cents.

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

- `entity_id` (string)
  The identifier of the Entity the offer was extended to.

- `expires_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Loan Offer expires.

- `fee` (integer)
  The origination fee for the loan in the minor unit of the currency. For dollars, this is cents.

- `id` (string)
  The Loan Offer's identifier.

- `interest_rate` (string)
  The interest rate of the offer, as a string containing a decimal number. For example, a 7% rate is represented as "0.07".

- `loan_application_id` (string, nullable)
  The identifier of the Loan Application that yielded this offer, if any.

- `program_id` (string)
  The identifier of the Program the offer was made under.

- `status` (enum)
  The status of the Loan Offer.
  Cases:
  * `pending` (The Loan Offer is awaiting acceptance.)
  * `accepted` (The Loan Offer has been accepted.)
  * `expired` (The Loan Offer has expired.)

- `terms_file_id` (string)
  The identifier of the File containing the loan terms contract.

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

## List Loan Offers
GET /loan_offers

### Example
```curl
curl \
  --url "${INCREASE_URL}/loan_offers" \
  -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.

- `status.in` (array of enums, optional)
  Filter Loan Offers for those with the specified status or statuses. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending` (The Loan Offer is awaiting acceptance.)
  * `accepted` (The Loan Offer has been accepted.)
  * `expired` (The Loan Offer has expired.)

### Returns a Loan Offer List object:
```json
{
  "data": [
    {
      "acceptance": null,
      "amount": 1000000,
      "created_at": "2020-01-31T23:59:59Z",
      "entity_id": "entity_n8y8tnk2p9339ti393yi",
      "expires_at": "2020-01-31T23:59:59Z",
      "fee": 50000,
      "id": "loan_offer_fspi9zpgcib98ok0h3dh",
      "interest_rate": "0.07",
      "loan_application_id": "loan_application_mpe6oe4a2gc5knzl1xfy",
      "program_id": "program_i2v2os4mwza1oetokh9i",
      "status": "pending",
      "terms_file_id": "file_makxrc67oh9l6sg7w9yc",
      "type": "loan_offer"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Retrieve a Loan Offer
GET /loan_offers/{loan_offer_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/loan_offers/loan_offer_fspi9zpgcib98ok0h3dh" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `loan_offer_id` (string, required)
  The identifier of the Loan Offer.

## Accept a Loan Offer
POST /loan_offers/{loan_offer_id}/accept

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/loan_offers/loan_offer_fspi9zpgcib98ok0h3dh/accept" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `loan_offer_id` (string, required)
  The identifier of the Loan Offer to accept.