Retrieve All Account for Admin
GET /admin/accounts
Description
This endpoint allows administrators to retrieve information about all account closure requests. By making a GET request to this endpoint with the relevant parameters, administrators can obtain a list of closure requests based on specified criteria.
Required Headers
| Type | Description | |
|---|---|---|
| apiKey | string | (Required). Wallet API key for authentication. Include in the request header. |
| Authorization | string | (Required). Authentication token. Include in the request header using the "Bearer" scheme. Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGQ2Nm... |
Query Parameters
| Name | Type | Description |
|---|---|---|
| pageNumber | integer | (Optional) Page number for paginated results. |
| pageSize | integer | (Optional) Number of items per page in paginated results. |
| currencies | array[string] | (Optional) Filter closure requests by currency. |
| types | array[string] | (Optional) Filter closure requests by type. |
| userProfileIds | array[string] | (Optional) Filter closure requests by user profile ID. |
| walletUserIds | array[string] | (Optional) Filter closure requests by wallet user ID. |
| categories | array[string] | (Optional) Filter closure requests by category. |
| providers | array[string] | (Optional) Filter closure requests by provider. |
| startDate | string($date-time) | (Optional) Filter closure requests starting from this date and time. |
| endDate | string($date-time) | (Optional) Filter closure requests until this date and time. |
| tenantId* | string | (Required) Identifier for the tenant. Include in the request header. |
| countryCode* | string | (Required) Country code. Include in the request header. |
Example
Request
GET /admin/accounts?pageNumber=1&pageSize=10&tenantId=your_tenant_id&countryCode=US
Response
The response will contain a list of account closure requests based on the specified parameters.
{
"closureRequests": [
{
"closureId": "12345",
"userId": "user123",
"requestDate": "2023-12-01T14:30:00Z",
"closureReason": "ACCOUNT_REVOCATION",
"status": "PENDING"
},
// ... additional closure requests
],
"totalPages": 3,
"totalItems": 25
}
Response Code: 200 - OK
Description
Accounts returned successfully
Response Field
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates the overall success of the operation. |
| statusCode | integer | Represents the specific status code for the response. |
| message | string | Provides additional information about the response. |
| data | object | Contains the main data payload of the response. |
| errors | array | An array containing error details if issues occurred. |
| - message | string | Describes the error. |
| - descriptiveMessage | string | Provides a more detailed and descriptive message about the error. |
Example
<response>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data></data>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</response>
Response Code: 400 - Bad Request
Description
Invalid account id.
Example
<response>
<status>false</status>
<statusCode>400</statusCode>
<message>Invalid account id</message>
<data></data>
<errors>
<error>
<message>Invalid account id</message>
<descriptiveMessage></descriptiveMessage>
</error>
</errors>
</response>
curlUrl: "/admin/accounts" curlMethod: GET
Response Code: 404 - Not Found
Description
Account id not found.
Example
<response>
<status>false</status>
<statusCode>404</statusCode>
<message>Account id not found</message>
<data></data>
<errors>
<error>
<message>Account id not found</message>
<descriptiveMessage></descriptiveMessage>
</error>
</errors>
</response>
Method: GET
>http://20.87.230.105/platform/wallets/admin/accounts
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
🔑 Authentication bearer
| Param | value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
CURL REQUEST
curl --request GET \
--url /admin/accounts \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!