# Virtual account transaction history

## Get transaction history for a virtual account

<mark style="color:green;">`POST`</mark> `https://api-fsdh360-test.fsdhgroup.com/api/v1/virtualaccounts/static/history`

To get a virtual account transaction history, the below parameters should be provided.

Attention should be given to parameters marked <mark style="color:red;">\*</mark>`required`.

#### Query Parameters

| Name        | Type   | Description        |
| ----------- | ------ | ------------------ |
| API-version | String | The version of API |

#### Request Body

| Name                                             | Type   | Description                                                       |
| ------------------------------------------------ | ------ | ----------------------------------------------------------------- |
| Account number<mark style="color:red;">\*</mark> | String | Clients account number                                            |
| Start date<mark style="color:red;">\*</mark>     | String | Specify transaction history start date "2021-11-30T10:51:08.134Z" |
| End date <mark style="color:red;">\*</mark>      | String | Specify transaction history end date "2021-11-30T10:51:08.134Z"   |
| Take                                             | String | Number of records to return                                       |
| Skip                                             | String | Number of records to skip                                         |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
  {
    "virtualAccountNumber": "string",
    "collectionAccountNumber": "string",
    "transactionType": "string",
    "transactionCurrencyCode": "string",
    "amount": 0,
    "narration": "string",
    "transactionDate": "2022-12-07T14:00:08.254Z",
    "counterPartyAccountNumber": "string",
    "counterPartyAccountName": "string"
  }
]
```

{% endtab %}

{% tab title="400: Bad Request Bad Request" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found Not Found" %}

```javascript
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
```

{% endtab %}
{% endtabs %}

{% code title="Request body" %}

```json
{
  "accountNumber": "string",
  "startDate": "2022-04-12T11:00:40.919Z",
  "endDate": "2022-04-12T11:00:40.919Z",
  "skip": 0,
  "take": 0
}
```

{% endcode %}

<figure><img src="https://1085485156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvMerIdO3ETvUtkUdDyc%2Fuploads%2FYvBkeKrBsxDxaH817NOq%2FvirtualAcctTransactionHistory.png?alt=media&#x26;token=a39ba636-3b4e-467e-8c16-b3d42d3068a2" alt=""><figcaption><p>Curl</p></figcaption></figure>

<figure><img src="https://1085485156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCvMerIdO3ETvUtkUdDyc%2Fuploads%2FzSBaficOcQ6kyscsYdwY%2FvirtualAcctTransactionHistory2.png?alt=media&#x26;token=ffbbf40a-522b-4df7-839e-926c71a08e80" alt=""><figcaption><p>Server response</p></figcaption></figure>

#### Response body

Inputting the correct parameters should give you a <mark style="color:green;">`200`</mark>`: Success` response which will populate the below Success details. Also specified are possible responses from the request.

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

```json
[
  {
    "virtualAccountNumber": "string",
    "collectionAccountNumber": "string",
    "transactionType": "string",
    "transactionCurrencyCode": "string",
    "amount": 0,
    "narration": "string",
    "transactionDate": "2022-11-30T13:30:55.406Z",
    "counterPartyAccountNumber": "string",
    "counterPartyAccountName": "string"
  }
]
```

{% endtab %}

{% tab title="400: Bad Request" %}

```json
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string"
}
```

{% endtab %}

{% tab title="404: Not Found" %}

```json
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string"
}
```

{% endtab %}
{% endtabs %}
