# Virtual Account List

<mark style="color:blue;">`GET`</mark> `https://api.oneappgo.com/v1/virtualaccounts`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| authorization | String | SECRET\_KEY |

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

```json
{
  "status": true,
  "message": "Virtual account list retrieved",
  "total_created": 3,
  "data": [
    {
      "bank_name": "Fidelity",
      "bank_code": "070",
      "account_name": "Olajide Olatunji",
      "lastdate_used": "",
      "tracking_id": "00102",
      "account_status": "Active",
      "account_number": "4550589796",
      "date_created": "14 October 2022 11:31 am"
    },
    {
      "bank_name": "9 PAYMENT SERVICE BANK",
      "bank_code": "120001",
      "account_name": "1APPS - akinade johnson",
      "lastdate_used": "",
      "tracking_id": "001002",
      "account_status": "Active",
      "account_number": "4551550923",
      "date_created": "14 October 2022 11:37 am"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might do this:

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

```json
curl --location 'https://api.oneappgo.com/v1/virtualaccounts'
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.oneappgo.com/v1/virtualaccounts',
  'headers': {
  },
  formData: {

  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
curl --location 'https://api.oneappgo.com/v1/virtualaccounts'curl --location 'https://api.oneappgo.com/v1/virtualaccounts'curl --location 'https://api.oneappgo.com/v1/virtualaccounts'curl --location 'https://api.oneappgo.com/v1/virtualaccounts'
```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/virtualaccounts',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Dart" %}
{% code overflow="wrap" %}

```dart
var request = http.MultipartRequest('GET', Uri.parse('https://api.oneappgo.com/v1/virtualaccounts'));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

{% endcode %}
{% endtab %}
{% endtabs %}

## Sample response

```json
{
  "status": true,
  "message": "Virtual account list retrieved",
  "total_created": 3,
  "data": [
    {
      "bank_name": "Fidelity",
      "bank_code": "070",
      "account_name": "Olajide Olatunji",
      "lastdate_used": "",
      "tracking_id": "00102",
      "account_status": "Active",
      "account_number": "4550589796",
      "date_created": "14 October 2022 11:31 am"
    },
    {
      "bank_name": "9 PAYMENT SERVICE BANK",
      "bank_code": "120001",
      "account_name": "1APPS - akinade johnson",
      "lastdate_used": "",
      "tracking_id": "001002",
      "account_status": "Active",
      "account_number": "4551550923",
      "date_created": "14 October 2022 11:37 am"
    }
  ]
}
```
