# Bank Statement OCR

## The expected data returned:&#x20;

Using a South African Identification Number, we can return:&#x20;

* [x] Amount&#x20;
* [x] Currency
* [x] Category
* [x] created Date
* [x] Last uploaded
* [x] Description
* [x] Account ID
* [x] Merchant

## Get Started

To make this endpoint, you will need a valid developer account and, API Keys. Read Authentication to learn more.

{% content-ref url="../../getting-started/authentication" %}
[authentication](https://akiba-digital.gitbook.io/akiba-api-docs/getting-started/authentication)
{% endcontent-ref %}

### API Endpoint

<mark style="color:green;">`POST`</mark> `/`[`https://api.akibaone.com/insyts/gettransactions`](https://api.akibaone.com/insyts/gettransactions)

Upload a new document (PDF/ PNG).

### **Request**

{% tabs %}
{% tab title="200" %}

```json
{
  "clientId": "string",
  "userId": "string"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### Headers

| Name                                           | Type   | Description            |
| ---------------------------------------------- | ------ | ---------------------- |
| Token<mark style="color:red;">\*</mark>        | String | Your Access auth token |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json       |

#### Request Body

| Name                                                  | Type   | Description                                                                       |
| ----------------------------------------------------- | ------ | --------------------------------------------------------------------------------- |
| identifier<mark style="color:red;">\*</mark>          | String | The unique `id` of the customer (type and code of Id: national Id or company reg) |
| type<mark style="color:red;">\*</mark>                | String | `1` for individual and `2` for business                                           |
| statement\_filename<mark style="color:red;">\*</mark> | String | The filename of the statement doc                                                 |
| bank\_name<mark style="color:red;">\*</mark>          | String |                                                                                   |
| account\_type<mark style="color:red;">\*</mark>       | String |                                                                                   |
| webhook\_url<mark style="color:red;">\*</mark>        | String |                                                                                   |
| file\_type                                            | String |                                                                                   |

{% tabs %}
{% tab title="200 Customer successfully created" %}

```javascript
{
    "identifier"="93055521xxx",
    "signed_link": "http://example.com",
    "s3_key": "string",
    "statement_filename": "string",
    "customer_id": "A3020FM2PX"
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

### Step 2: Process bank statement

## Get bank statement in CSV

<mark style="color:blue;">`GET`</mark> `https://api.akibadigital.com/v1/bank-statement`
