Get All Wallets API
Overview
Retrieve a list of all wallet masters in the system. This API allows you to fetch wallet configurations and metadata, with optional filtering by wallet type, currency, and other parameters.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/transaction/wallet
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: b1910650-f892-496a-b5a3-b0560845c4a1
- Authorization: Token required
Endpoint
GET https://api.gafapay.com:8443/gafapay/v3/transaction/wallet
Headers
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b1910650-f892-496a-b5a3-b0560845c4a1
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4
Query Parameters
- wallet_type (integer, optional): Filter wallets by type
1= Main Wallet2= Category Wallet3= Saving Wallet4= Revenue Wallet5= Commission Wallet- Example:
?wallet_type=3
- currency_id (string, optional): Filter wallets by currency
- Example:
?currency_id=1f1519903ed240578f071aa45cb479f2
- Example:
- user_id (string, optional): Filter wallets by user
- Example:
?user_id=fb8f09210e0f46b7b4262d77f5b6c273
- Example:
- status (integer, optional): Filter wallets by status
- Example:
?status=1
- Example:
- is_active (boolean, optional): Filter by active status
- Example:
?is_active=true
- Example:
- is_default (boolean, optional): Filter by default status
- Example:
?is_default=true
- Example:
Response
{
"success": 1,
"error": [],
"data": {
"wallets": [
{
"id": "51f0785706b748bd8c0062d8d37a8fcd",
"wallet_name": "Main Wallet",
"is_default": true,
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"wallet_type": 1,
"pool_amount": 1000.50,
"sub_wallet_category_id": "cat_123",
"user_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"status": 1,
"is_active": true,
"created_by": "admin_user_id",
"created_date": 1758498631,
"updated_by": "admin_user_id",
"updated_date": 1758498631
},
{
"id": "62g1896817c859ce9d1173e9e48b9fde",
"wallet_name": "Savings Wallet",
"is_default": false,
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"wallet_type": 3,
"pool_amount": 5000.00,
"sub_wallet_category_id": "cat_456",
"user_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"status": 1,
"is_active": true,
"created_by": "admin_user_id",
"created_date": 1758498631,
"updated_by": "admin_user_id",
"updated_date": 1758498631
}
]
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- wallets (array): Array of wallet objects
- id (string): Unique wallet identifier
- wallet_name (string): Name of the wallet
- is_default (boolean): Whether this is the default wallet
- currency_id (string): Currency identifier
- wallet_type (integer): Type of wallet (1-5)
- pool_amount (number): Pool amount for the wallet
- sub_wallet_category_id (string): Sub-wallet category identifier
- user_id (string): User identifier who owns the wallet
- status (integer): Wallet status
- is_active (boolean): Whether the wallet is active
- created_by (string): User who created the wallet
- created_date (number): Unix timestamp when wallet was created
- updated_by (string): User who last updated the wallet
- updated_date (number): Unix timestamp when wallet was last updated
- wallets (array): Array of wallet objects
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/transaction/wallet?wallet_type=3' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: b1910650-f892-496a-b5a3-b0560845c4a1'
Additional Examples
Get All Main Wallets
curl --location 'https://api.gafapay.com:8443/gafapay/v3/transaction/wallet?wallet_type=1' \
--header 'authorization: Token YOUR_TOKEN' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'
Get Wallets by Currency
curl --location 'https://api.gafapay.com:8443/gafapay/v3/transaction/wallet?currency_id=1f1519903ed240578f071aa45cb479f2' \
--header 'authorization: Token YOUR_TOKEN' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'
Get Active Wallets Only
curl --location 'https://api.gafapay.com:8443/gafapay/v3/transaction/wallet?is_active=true' \
--header 'authorization: Token YOUR_TOKEN' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'
Notes
- The API returns all wallets that match the specified criteria
- If no query parameters are provided, all wallets for the company are returned
- Wallet types are defined in the Wallet Constants documentation
- The
pool_amountrepresents the total amount available in the wallet pool - Only wallets belonging to the authenticated user's company are returned
- The API supports multiple filter combinations for precise wallet retrieval