This endpoint allows you to view and filter the wallets associated with the App identified by your API key.
The list of wallets is specific to the App identified by the provided API key. You must use the API key of the App to access its wallets.
Prerequisites
- Valid API key with wallet read permissions
Request
curl -X GET "https://api.g2cplatform.com/v2/wallets?limit=20&offset=0&status=active" \
-H "X-API-Key: your-api-key"
Query Parameters
| Parameter | Type | Required | Description |
|---|
limit | number | No | Maximum number of wallets to return (default: 20, max: 100) |
offset | number | No | Number of wallets to skip for pagination (default: 0) |
status | string | No | Filter by status: “active”, “inactive”, “suspended”, “all” (default: “active”) |
username | string | No | Filter by wallet username (partial match) |
sort | string | No | Sort order: “createdAt:desc”, “createdAt:asc”, “username:asc”, “username:desc” (default: “createdAt:desc”) |
Response
{
"data": [
{
"id": "wallet_abc123...",
"username": "sensor01",
"appId": "app_def456...",
"fullUsername": "sensor01@app_def456...",
"status": "active",
"metadata": {
"department": "IoT Devices",
"location": "Building A"
},
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"lastLoginAt": "2025-01-15T14:20:00Z"
},
{
"id": "wallet_ghi789...",
"username": "admin",
"appId": "app_def456...",
"fullUsername": "admin@app_def456...",
"status": "active",
"metadata": {
"role": "administrator"
},
"createdAt": "2025-01-14T09:15:00Z",
"updatedAt": "2025-01-15T08:45:00Z",
"lastLoginAt": "2025-01-15T15:30:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 45,
"hasNext": true,
"hasPrevious": false
}
}
Response Fields
| Field | Type | Description |
|---|
data | array | Array of wallet objects |
pagination | object | Pagination information |
Wallet Object
| Field | Type | Description |
|---|
id | string | Unique wallet identifier |
username | string | Wallet username (without appId) |
appId | string | ID of the app this wallet belongs to |
fullUsername | string | Full username in format username@appId |
status | string | Current wallet status |
metadata | object | Additional metadata for the wallet |
createdAt | string | ISO 8601 timestamp of creation |
updatedAt | string | ISO 8601 timestamp of last update |
lastLoginAt | string | ISO 8601 timestamp of last login (nullable) |
| Field | Type | Description |
|---|
limit | number | Current page size |
offset | number | Current offset |
total | number | Total number of wallets matching criteria |
hasNext | boolean | Whether more items are available |
hasPrevious | boolean | Whether previous items exist |
Examples
List All Wallets
GET /wallets?limit=50&offset=0
List Active Wallets Only
GET /wallets?status=active&limit=20&offset=0
Search Wallets by Username
GET /wallets?username=sensor&limit=10&offset=0
Get Next Page
GET /wallets?limit=20&offset=20
Error Responses
| Status Code | Description |
|---|
400 | Invalid query parameters |
401 | Unauthorized - invalid API key |
403 | Insufficient permissions |
500 | Internal server error |
- Use
limit to control page size (recommended: 20-50 items)
- Use
offset to navigate through pages
- Check
hasNext before requesting the next page
- Consider filtering for better performance on large datasets