Get All Users API
Overview
Retrieve a list of users with optional filtering and pagination support.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/user/users
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
GET https://api.gafapay.com:8443/gafapay/v3/user/users
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Query Parameters
Required Parameters
- user_type (Integer): Type of user
2= Customer3= Merchant5= Agent
Optional Parameters
- skip (Integer): Number of records to skip (pagination)
- Default: 0
- Example: 0, 10, 20
- limit (Integer): Maximum number of records to return (pagination)
- Default: 10
- Example: 10, 25, 50
- status_id (Integer): Status ID filter
- Example: 1 (Active), 0 (Inactive)
- user_id (String): User primary ID filter
- created_by (String): Primary ID of the person who created the record
- search_keyword (String): Search data using any keyword
- kyc_status (Integer): Status of KYC
- kyc_process_status (Integer): KYC process status
- query_filter (String): Custom query filter
- sorting (String): Sorting JSON (e.g.
{"field_name": "DESC"}) - radius (Integer): Radius for nearby store data
- latitude (Double): Latitude coordinate
- longitude (Double): Longitude coordinate
- start_date (Long): Start date (epoch timestamp)
- end_date (Long): End date (epoch timestamp)
- parent_user_id (String): Parent user ID
- kyc_status_id (String): KYC status ID
- dial_code (String): Country/region dial code
- phone_number (String): Phone number
- updated_date (Long): Last updated date (epoch timestamp)
- is_active (Boolean): Active status
Response
{
"success": 1,
"error": [],
"data": {
"users": [
{
"id": "d4853299428d45958c7eb129449bed43",
"first_name": "abcd",
"last_name": "ef",
"email": null,
"dial_code": "+221",
"phone_number": "987654321",
"user_type": 2,
"role_id": null,
"account_number": "1755925484312",
"verification": {
"is_email": false,
"is_phone": true
},
"birth_date": null,
"image": null,
"user_code": "CUS_UMNGWKX0",
"country_id": null,
"status_id": 1,
"kyc_status": 1,
"kyc_process_status": 1,
"location_point": null,
"rating": null,
"created_date": 1755925484,
"parent_user_id": null,
"display_name": null,
"kyc_status_id": null,
"address_info": {},
"updated_date": 1755925744,
"display_image": null,
"reason_code_id": null,
"reject_reason": null,
"unique_device_id": "cUyHAkmyRMGbDsSK2eZUY2:APA91bHCmPStNRJ73nQrWCot2n9JeF6s03__dxgFvRN2ugQHSYZiutGCCScUv9p5sVpXxJR0fStbwsRajZHHwBOZAzhtcv-_GhB74o8NV2OuJ5mymqEXNQM"
}
]
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- users (array): Array of user objects
User Object Fields
- id (string): User primary ID
- first_name (string): User's first name
- last_name (string): User's last name
- email (string|null): User's email address
- dial_code (string): Country dial code
- phone_number (string): Phone number
- user_type (integer): Type of user (2=Customer, 3=Merchant, 5=Agent)
- role_id (string|null): User's role ID
- account_number (string): User's account number
- verification (object): Verification status object
- is_email (boolean): Email verification status
- is_phone (boolean): Phone verification status
- birth_date (string|null): User's birth date
- image (string|null): User's profile image
- user_code (string): Unique user code
- country_id (string|null): Country ID
- status_id (integer): User status ID
- kyc_status (integer): KYC status
- kyc_process_status (integer): KYC process status
- location_point (string|null): Location coordinates
- rating (number|null): User rating
- created_date (long): Creation timestamp
- parent_user_id (string|null): Parent user ID
- display_name (string|null): Display name
- kyc_status_id (string|null): KYC status ID
- address_info (object): Address information
- updated_date (long): Last update timestamp
- display_image (string|null): Display image URL
- reason_code_id (string|null): Reason code ID
- reject_reason (string|null): Rejection reason
- unique_device_id (string): Unique device identifier
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/user/users?user_type=2&skip=0&limit=10&status_id=1' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'
Example with Additional Filters
curl --location 'https://api.gafapay.com:8443/gafapay/v3/user/users?user_type=2&skip=0&limit=25&status_id=1&kyc_status=1&search_keyword=john&sorting=%7B%22created_date%22%3A%22DESC%22%7D' \
--header 'authorization: Token YOUR_TOKEN_HERE' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID'