Skip to main content
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

ParameterTypeRequiredDescription
limitnumberNoMaximum number of wallets to return (default: 20, max: 100)
offsetnumberNoNumber of wallets to skip for pagination (default: 0)
statusstringNoFilter by status: “active”, “inactive”, “suspended”, “all” (default: “active”)
usernamestringNoFilter by wallet username (partial match)
sortstringNoSort 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

FieldTypeDescription
dataarrayArray of wallet objects
paginationobjectPagination information

Wallet Object

FieldTypeDescription
idstringUnique wallet identifier
usernamestringWallet username (without appId)
appIdstringID of the app this wallet belongs to
fullUsernamestringFull username in format username@appId
statusstringCurrent wallet status
metadataobjectAdditional metadata for the wallet
createdAtstringISO 8601 timestamp of creation
updatedAtstringISO 8601 timestamp of last update
lastLoginAtstringISO 8601 timestamp of last login (nullable)

Pagination Object

FieldTypeDescription
limitnumberCurrent page size
offsetnumberCurrent offset
totalnumberTotal number of wallets matching criteria
hasNextbooleanWhether more items are available
hasPreviousbooleanWhether 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 CodeDescription
400Invalid query parameters
401Unauthorized - invalid API key
403Insufficient permissions
500Internal server error

Pagination Best Practices

  • 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