Get All Virtual Accounts
GET /api/v1/VirtualAccounts/get-all
Description
This endpoint allows retrieving a paged list of all virtual accounts.
Headers:
- No specific headers are required.
Query Parameters:
-
pageNumber: The page number to retrieve, defaults to 1 if not provided. -
pageSize: The number of virtual accounts to retrieve per page, defaults to 10 if not provided. -
version: The version of the API.
URL:
- GET:
/api/v1/VirtualAccounts/get-all?pageNumber={pageNumber}&pageSize={pageSize}
Response:
- 200: Success, returns a paged list of all virtual accounts.
Error Codes:
-
400: Bad request, the request is not valid.
-
404: Not found, no virtual accounts exist.
-
500: Internal server error, something went wrong while processing the request.
Example Response:
HTTP/1.1 200 OK
{
"pageNumber": 1,
"pageSize": 10,
"totalItems": 5,
"virtualAccounts": [
{
"id": "123",
"name": "VirtualAccount1",
"customerId": "1234567890",
"accountId": "0987654321",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
},
{
"id": "456",
"name": "VirtualAccount2",
"customerId": "0987654321",
"accountId": "1234567890",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
},
...
]
}
Notes:
-
This endpoint is useful for retrieving a paged list of all virtual accounts.
-
The response includes a paged list of virtual accounts along with their details including ID, name, customer ID, account ID, and creation/update timestamps.
-
If no virtual accounts exist, a 404 Not Found response will be returned.
Method: GET
/api/v1/VirtualAccounts/get-all?pageNumber=1&pageSize=10
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Query Params
| Param | value |
|---|---|
| pageNumber | 1 |
| pageSize | 10 |
Response: 200
{
"pageNumber": "<integer>",
"pageSize": "<integer>",
"total": "<integer>",
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": [
{
"id": "<uuid>",
"merchantId": "<uuid>",
"accountName": "<string>",
"accountNumber": "<string>",
"bankName": "<string>",
"email": "<string>",
"currency": "<string>",
"accountReference": "<string>",
"bvn": "<string>",
"lastActivity": "<dateTime>",
"availableBalance": "<double>",
"walletID": "<string>",
"status": "<string>"
},
{
"id": "<uuid>",
"merchantId": "<uuid>",
"accountName": "<string>",
"accountNumber": "<string>",
"bankName": "<string>",
"email": "<string>",
"currency": "<string>",
"accountReference": "<string>",
"bvn": "<string>",
"lastActivity": "<dateTime>",
"availableBalance": "<double>",
"walletID": "<string>",
"status": "<string>"
}
]
}
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/VirtualAccounts/get-all \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!