Get Agent Profile API
Overview
Retrieve detailed information about a specific agent profile by its ID. This API returns the agent profile master configuration including profile settings, tree hierarchy, currency, and status information.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/agent_profile_threshold/agent_profile/\{id\}
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: d08792fa-237a-4588-be16-aceebfdca7e5
- Authorization: Token required
Endpoint
GET https://api.gafapay.com:8443/gafapay/v3/agent_profile_threshold/agent_profile/{id}
Path Parameters
- id (String, required): The unique identifier of the agent profile to retrieve
- Example:
c71b094eba994557a43eadb5d6d22044
- Example:
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzYxNjg1MjcyfQ.N0etwbg_yOKecFRslpjFWG8Eba1mwLsnIDa0BS4T9tA
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: d08792fa-237a-4588-be16-aceebfdca7e5
Response
{
"success": 1,
"error": [],
"data": {
"agent_profile": {
"id": "c71b094eba994557a43eadb5d6d22044",
"is_active": true,
"created_by": "640b793d04e2428dbf19ab10399f4edb",
"updated_date": 1761110714,
"profile_name": "Agent Default Profile",
"status_type": 1,
"is_default": true,
"tree_level_id": "22f7991c75d74d39bfe2b203304400a9",
"tree_id": "9f2148ad239c4c5ba394b11cc6fd4519",
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"user_id": "640b793d04e2428dbf19ab10399f4edb",
"agent_type": 1,
"parent_agent_profile_id": "b460e4d29fc248d7adf6c664a55ecf42",
"updated_by": "e4946877f18946b299fddf0f2133dcba"
}
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- agent_profile (object): Agent profile master information object
Agent Profile Object Fields
- id (string): Agent profile unique identifier
- The primary ID of the agent profile master record
- profile_name (string): Name of the agent profile
- Example: "Agent Default Profile", "Premium Agent Profile"
- Used to identify and distinguish different profile configurations
- status_type (integer): Status of the profile
1= Active0= Inactive- Indicates whether this profile can be assigned to agents
- is_default (boolean): Default profile indicator
true= This is the default profile for the specified tree level and currencyfalse= This is a custom/non-default profile- Only one profile can be default per user+currency+tree+level combination
- is_active (boolean): Active status of the profile
true= Profile is active and can be usedfalse= Profile is inactive
- tree_level_id (string): Tree level unique identifier
- References the agent hierarchy level this profile applies to
- Different levels may have different commission structures
- tree_id (string): Tree unique identifier
- References the agent organizational tree/hierarchy
- Used for multi-level marketing or commission structures
- currency_id (string): Currency unique identifier
- The currency this profile operates with
- Agents can have different profiles for different currencies
- user_id (string): User (agent admin) unique identifier
- The ID of the user who owns/created this profile
- Typically an admin or super agent
- agent_type (integer): Type of agent
1= Type 1 agent2= Type 2 agent- Different types may have different permissions or configurations
- parent_agent_profile_id (string): Parent profile unique identifier
- The ID of the parent agent profile in the hierarchy
- Used for inheritance of settings or commission calculations
- Can be null for top-level profiles
- created_by (string): Creator user unique identifier
- The ID of the user who created this profile
- updated_by (string): Last updater user unique identifier
- The ID of the user who last modified this profile
- updated_date (long): Last update timestamp
- Unix epoch timestamp of the last update
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/agent_profile_threshold/agent_profile/c71b094eba994557a43eadb5d6d22044' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzYxNjg1MjcyfQ.N0etwbg_yOKecFRslpjFWG8Eba1mwLsnIDa0BS4T9tA' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: d08792fa-237a-4588-be16-aceebfdca7e5'
Error Responses
Profile Not Found
{
"success": 0,
"error": ["AGENT_PROFILE_THRESHOLD_PROFILE_DATA_NOT_FOUND"],
"data": {}
}
Bad Request (Missing Company ID)
{
"success": 0,
"error": ["BAD_REQUEST"],
"data": {}
}
Notes
- The
idpath parameter is required and must be a valid agent profile ID - The agent profile master contains the configuration template that defines:
- Transaction charges and fees for agents
- Transaction threshold limits (daily, weekly, monthly)
- Commission structures
- Allowed products and payment modes
- Agent hierarchy and reporting structure
- This API returns the profile master/template, not the user-profile associations
- For user-profile associations, use the Get Agent User Profile API
- The
is_defaultflag indicates if this is the automatically assigned profile for new agents at the specified tree level - The
tree_idandtree_level_iddefine the position in the agent organizational hierarchy - Multiple profiles can exist for the same user/currency but with different tree levels
- Authentication token must be valid and have appropriate permissions to access agent profile data
- The
companyidheader is mandatory and must match the company the profile belongs to