# Documents
> Increase generates certain documents / forms automatically for your application; they can be listed here.

## The Document object
### Example
```json
{
  "account_verification_letter": {
    "account_number_id": "account_number_v18nkfqm6afpsrvy82b2"
  },
  "category": "account_verification_letter",
  "created_at": "2020-01-31T23:59:59Z",
  "entity_id": "entity_n8y8tnk2p9339ti393yi",
  "file_id": "file_makxrc67oh9l6sg7w9yc",
  "funding_instructions": null,
  "id": "document_qjtqc6s4c14ve2q89izm",
  "idempotency_key": null,
  "type": "document"
}
```
### Attributes
- `account_verification_letter` (dictionary, nullable)
  Properties of an account verification letter document.

  - `account_verification_letter.account_number_id` (string)
    The identifier of the Account Number the document was generated for.

- `category` (enum)
  The type of document.
  Cases:
  * `form_1099_int` (Internal Revenue Service Form 1099-INT.)
  * `form_1099_misc` (Internal Revenue Service Form 1099-MISC.)
  * `proof_of_authorization` (A document submitted in response to a proof of authorization request for an ACH transfer.)
  * `company_information` (Company information, such a policies or procedures, typically submitted during our due diligence process.)
  * `account_verification_letter` (An account verification letter.)
  * `funding_instructions` (Funding instructions.)

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

- `entity_id` (string, nullable)
  The identifier of the Entity the document was generated for.

- `file_id` (string)
  The identifier of the File containing the Document's contents.

- `funding_instructions` (dictionary, nullable)
  Properties of a funding instructions document.

  - `funding_instructions.account_number_id` (string)
    The identifier of the Account Number the document was generated for.

- `id` (string)
  The Document 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).

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

## List Documents
GET /documents

### Example
```curl
curl \
  --url "${INCREASE_URL}/documents" \
  -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 Documents to ones belonging to the specified Entity.

- `category.in` (array of enums, optional)
  Filter Documents for those with the specified category or categories. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `form_1099_int` (Internal Revenue Service Form 1099-INT.)
  * `form_1099_misc` (Internal Revenue Service Form 1099-MISC.)
  * `proof_of_authorization` (A document submitted in response to a proof of authorization request for an ACH transfer.)
  * `company_information` (Company information, such a policies or procedures, typically submitted during our due diligence process.)
  * `account_verification_letter` (An account verification letter.)
  * `funding_instructions` (Funding instructions.)

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

### Returns a Document List object:
```json
{
  "data": [
    {
      "account_verification_letter": {
        "account_number_id": "account_number_v18nkfqm6afpsrvy82b2"
      },
      "category": "account_verification_letter",
      "created_at": "2020-01-31T23:59:59Z",
      "entity_id": "entity_n8y8tnk2p9339ti393yi",
      "file_id": "file_makxrc67oh9l6sg7w9yc",
      "funding_instructions": null,
      "id": "document_qjtqc6s4c14ve2q89izm",
      "idempotency_key": null,
      "type": "document"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Document
POST /documents

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/documents" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_verification_letter": {
      "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "balance_date": "2024-12-31"
    },
    "category": "account_verification_letter"
  }'
```

### Body Parameters
- `account_verification_letter` (dictionary, optional)
  An account verification letter. Required if and only if `category` is `account_verification_letter`.

  - `account_verification_letter.account_number_id` (string, required)
    The Account Number the bank letter should be generated for.

  - `account_verification_letter.balance_date` (string, optional)
    If provided, the letter will include the Account's balance as of the date.

- `category` (enum, required)
  The type of document to create.
  Cases:
  * `account_verification_letter` (An account verification letter.)
  * `funding_instructions` (Funding instructions.)

- `funding_instructions` (dictionary, optional)
  Funding instructions. Required if and only if `category` is `funding_instructions`.

  - `funding_instructions.account_number_id` (string, required)
    The Account Number the funding instructions should be generated for.

## Retrieve a Document
GET /documents/{document_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/documents/document_qjtqc6s4c14ve2q89izm" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `document_id` (string, required)
  The identifier of the Document to retrieve.

## Sandbox: Create a tax document
POST /simulations/documents
> Simulates a tax document being created for an account.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/documents" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_id": "account_in71c4amph0vgo2qllky"
  }'
```

### Body Parameters
- `account_id` (string, required)
  The identifier of the Account the tax document is for.