# Record a bank transaction

Imports a batch of bank lines, which is how money that has actually arrived enters the books. Body: `transactions`, an array of at least one and at most 1000 entries of `{externalId, source, postedOn (required, `YYYY-MM-DD`), currency, amountMinor, accountName, accountLast4, description, memo}`. The whole batch runs in one transaction and it is idempotent by `externalId` — a line already present is skipped, not refused, so importing August twice leaves August alone; the answer says how many were `imported` and how many `skipped`. Importing a line credits no deal on its own: that is a separate allocation (`post_accounting_allocations`).

Access class: `workspace`.

## Endpoint

`POST /v1/accounting/bank-transactions`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "transactions": [
      {
        "accountLast4": "string",
        "accountName": "string",
        "amountMinor": 1,
        "currency": "string",
        "description": "string",
        "externalId": "",
        "memo": "string",
        "postedOn": "string",
        "source": "string"
      }
    ]
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "imported": 1,
    "skipped": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
