Accounts
This feature is designed to provide detailed information regarding the list of virtual accounts. It allows users to retrieve and view comprehensive data on all virtual accounts associated with their main account.
Method | Path | Format | Authentication |
---|---|---|---|
GET | /api/v1.0/accounts | json | OAuth 2.0 with Access Token |
This API endpoint is used to retrieve detailed information about a list of virtual accounts associated with the main account. It allows users to query for virtual account details based on specified criteria. The endpoint supports HTTP GET method and requires OAuth 2.0 authentication with an Access Token.
Field | Value | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|---|
X-PARTNER-ID | api_key | Alphanumeric | Mandatory | API key obtained from the merchant dashboard. | b3ed7d4b-a96c-6c08-b3c7-12c3124242d9 | |
Accept | application/json | Alphabetic | Mandatory | Specifies JSON as the expected response format. | application/json | |
Authorization | Bearer {bearerToken} | Alphanumeric | Mandatory | Bearer token obtained from the get access token endpoint. | Bearer eyJ0eXAiOiJKV1{…} |
Field | Value | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|---|
page | {pageNumber} | Numeric | Optional | 2 |
{
"page": 2
}
Field | Type | Mandatory | Length | Description | Example |
---|---|---|---|---|---|
status | Numeric | Mandatory | 3 | HTTP Status Code | 200 |
success | Boolean | Mandatory | 1 | Indicates success status | true |
data | Array Object | Conditional | Array of sub account objects | ||
> id | Numeric | Mandatory | Sub account ID | 23643 | |
> name | Alphanumeric | Mandatory | Full name of the account holder | John | |
Alphanumeric | Mandatory | Email address of the account | john.doe@gmail.com | ||
> phone | Numeric | Mandatory | Phone number associated | 628339243232 | |
> status | Enum | Mandatory | Account status values: active, inactive, pending, rejected | active | |
pagination | Object | Conditional | Pagination information | ||
> count | Numeric | Mandatory | Number of items in response | 2 | |
> total | Numeric | Mandatory | Total number of items available | 100 | |
> perPage | Numeric | Mandatory | Items per page | 10 | |
> currentPage | Numeric | Mandatory | Current page number | 1 | |
> totalPages | Numeric | Mandatory | Total number of pages | 3 | |
> links | Object | Mandatory | Links for navigation |
Success: Here’s an example of a successful response.
{
"status": 200,
"success": true,
"data": [
{
"id": "436546545",
"name": "Julian Albertus Pratama",
"email": "julian.pratama@example.com",
"phone": "62682293427611",
"status": "active",
}
],
"pagination": {
"count": 1,
"total": 1,
"perPage": 10,
"currentPage": 1,
"totalPages": 1,
"links": {}
}
}
Error: This is an example of an unsuccessful request.
{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized partner, please sign in"
}
}