# Import pasted statement lines

`POST /accounting/bank/accounts/{id}/import` · Rivier · accounting

Import pasted statement lines.

- Scope: accounting:admin
- Sdk: accounting.bank.import
- Cli: accounting bank import

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "bookedOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "amountMinor": {
            "type": "integer",
            "minimum": -99999999999,
            "maximum": 99999999999
          },
          "description": {
            "type": "string",
            "maxLength": 300,
            "default": ""
          },
          "counterparty": {
            "type": "string",
            "maxLength": 200,
            "default": ""
          }
        },
        "required": [
          "externalId",
          "bookedOn",
          "amountMinor"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 1000
    }
  },
  "required": [
    "lines"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/accounting/bank/accounts/{id}/import' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "lines": [
    {
      "externalId": "string",
      "bookedOn": "string",
      "amountMinor": 0
    }
  ]
}'
```
