# Hold Harmless Letters
> A Hold Harmless Letter is sent to the receiving bank of one or more credit transfers to request the return of funds.

## The Hold Harmless Letter object
### Example
```json
{
  "ach_transfers": [
    {
      "id": "ach_transfer_uoxatyh3lt5evrsdvo7q"
    }
  ],
  "cancellation": null,
  "created_at": "2020-01-31T23:59:59Z",
  "id": "hold_harmless_letter_request_40r4hibgywrrd4mnysb4",
  "idempotency_key": null,
  "indemnified_bank_customer_name": "Ian Crease",
  "real_time_payments_transfers": null,
  "reason": "fraudulent",
  "recovery_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "source_account_id": "account_in71c4amph0vgo2qllky",
  "status": "submitted",
  "submission": {
    "file_id": "file_makxrc67oh9l6sg7w9yc",
    "submitted_at": "2020-01-31T23:59:59Z"
  },
  "type": "hold_harmless_letter",
  "wire_transfers": null
}
```
### Attributes
- `ach_transfers` (array of objects, nullable)
  The ACH Transfers associated with the request.

  - `ach_transfers.id` (string)
    The ACH Transfer identifier.

- `cancellation` (dictionary, nullable)
  If the Hold Harmless Letter was canceled, details of the cancellation.

  - `cancellation.canceled_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Hold Harmless Letter was canceled.

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

- `id` (string)
  The Hold Harmless Letter identifier.

- `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).

- `indemnified_bank_customer_name` (string)
  The name of the customer of the receiving bank.

- `real_time_payments_transfers` (array of objects, nullable)
  The Real-Time Payments Transfers associated with the request.

  - `real_time_payments_transfers.id` (string)
    The Real-Time Payments Transfer identifier.

- `reason` (enum)
  The reason provided in the return of funds request.
  Cases:
  * `fraudulent` (Requesting return of funds sent as a result of fraud.)
  * `requested_by_customer` (Requesting return of funds per customer request.)

- `recovery_account_number_id` (string, nullable)
  The Account Number created to receive recovered funds when they are transferred from your partner bank.

- `source_account_id` (string)
  The Account the referenced transfers were originated from.

- `status` (enum)
  The status of the Hold Harmless Letter.
  Cases:
  * `pending_submission` (The Hold Harmless Letter is pending submission to the indemnified bank.)
  * `submitted` (The Hold Harmless Letter has been submitted to the indemnified bank.)
  * `rejected` (The return of funds request was rejected by the indemnified bank.)
  * `requires_attention` (The Hold Harmless Letter requires attention from an Increase operator.)
  * `canceled` (The Hold Harmless Letter has been canceled.)

- `submission` (dictionary, nullable)
  If the Hold Harmless Letter was submitted to the indemnified bank, details of the submission.

  - `submission.file_id` (string)
    The File identifier of the generated Hold Harmless Letter.

  - `submission.submitted_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Hold Harmless Letter was submitted.

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

- `wire_transfers` (array of objects, nullable)
  The Wire Transfers associated with the request.

  - `wire_transfers.id` (string)
    The Wire Transfer identifier.

## List Hold Harmless Letters
GET /hold_harmless_letters

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

  Default: `100`

- `created_at.after` (string, optional)
  Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.before` (string, optional)
  Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_after` (string, optional)
  Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_before` (string, optional)
  Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `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).
  Between 1 and 200 characters

### Returns a Hold Harmless Letter List object:
```json
{
  "data": [
    {
      "ach_transfers": [
        {
          "id": "ach_transfer_uoxatyh3lt5evrsdvo7q"
        }
      ],
      "cancellation": null,
      "created_at": "2020-01-31T23:59:59Z",
      "id": "hold_harmless_letter_request_40r4hibgywrrd4mnysb4",
      "idempotency_key": null,
      "indemnified_bank_customer_name": "Ian Crease",
      "real_time_payments_transfers": null,
      "reason": "fraudulent",
      "recovery_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "source_account_id": "account_in71c4amph0vgo2qllky",
      "status": "submitted",
      "submission": {
        "file_id": "file_makxrc67oh9l6sg7w9yc",
        "submitted_at": "2020-01-31T23:59:59Z"
      },
      "type": "hold_harmless_letter",
      "wire_transfers": null
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Hold Harmless Letter
POST /hold_harmless_letters

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/hold_harmless_letters" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "ach_transfers": [
      {
        "id": "ach_transfer_uoxatyh3lt5evrsdvo7q"
      }
    ],
    "indemnified_bank_customer_name": "National Phonograph Company",
    "reason": "fraudulent",
    "recovery_account_number_id": "account_number_v18nkfqm6afpsrvy82b2"
  }'
```

### Body Parameters
- `ach_transfers` (array of objects, optional)
  The ACH Transfers to request the return of funds for. All transfers must originate from the same Account and have been received by the same counterparty.

  - `ach_transfers.id` (string, required)
    The ACH Transfer identifier.

- `indemnified_bank_customer_name` (string, required)
  The name of the customer of the receiving bank.
  Between 1 and 200 characters

- `real_time_payments_transfers` (array of objects, optional)
  The Real-Time Payments Transfers to request the return of funds for. All transfers must originate from the same Account and have been received by the same counterparty.

  - `real_time_payments_transfers.id` (string, required)
    The Real-Time Payments Transfer identifier.

- `reason` (enum, required)
  The reason provided in the return of funds request.

  Cases:
  * `fraudulent` (Requesting return of funds sent as a result of fraud.)
  * `requested_by_customer` (Requesting return of funds per customer request.)

- `recovery_account_number_id` (string, required)
  The identifier of the Account Number that will receive any recovered funds not returned directly to the originating Account.

- `wire_transfers` (array of objects, optional)
  The Wire Transfers to request the return of funds for. All transfers must originate from the same Account and have been received by the same counterparty.

  - `wire_transfers.id` (string, required)
    The Wire Transfer identifier.

## Retrieve a Hold Harmless Letter
GET /hold_harmless_letters/{hold_harmless_letter_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/hold_harmless_letters/hold_harmless_letter_request_40r4hibgywrrd4mnysb4" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `hold_harmless_letter_id` (string, required)
  The identifier of the Hold Harmless Letter.