Get Agent User Profile API
Overview
Retrieve a specific agent user profile by user ID and currency ID. This API returns the agent profile association details including the assigned profile, parent user, and currency information.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/agent_profile_threshold/agent_user_profile
- 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_user_profile
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzYxNjg1MjcyfQ.N0etwbg_yOKecFRslpjFWG8Eba1mwLsnIDa0BS4T9tA
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: d08792fa-237a-4588-be16-aceebfdca7e5
Query Parameters
Required Parameters
- user_id (String): The unique identifier of the user
- Example:
dd4403366e944eb4b302a69f684bc52e
- Example:
- currency_id (String): The unique identifier of the currency
- Example:
1f1519903ed240578f071aa45cb479f2
- Example:
Response
{
"success": 1,
"error": [],
"data": {
"agent_user_profile": {
"id": "e1395048f5cb42ef98f00e23b458411f",
"user_id": "dd4403366e944eb4b302a69f684bc52e",
"agent_profile_id": "c71b094eba994557a43eadb5d6d22044",
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"parent_user_id": "640b793d04e2428dbf19ab10399f4edb"
}
}
}
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_user_profile (object): Agent user profile information object
Agent User Profile Object Fields
- id (string): Agent user profile unique identifier
- The primary ID of the agent user profile record
- user_id (string): User unique identifier
- The ID of the user (agent) this profile belongs to
- agent_profile_id (string): Agent profile unique identifier
- The ID of the agent profile master that this user is associated with
- This defines the user's agent profile configuration (charges, thresholds, etc.)
- currency_id (string): Currency unique identifier
- The ID of the currency this agent profile operates with
- Agent can have different profiles for different currencies
- parent_user_id (string): Parent user unique identifier
- The ID of the parent/supervisor agent in the agent hierarchy
- Used for agent tree structure and commission calculations
- Can be null for top-level agents
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/agent_profile_threshold/agent_user_profile?user_id=dd4403366e944eb4b302a69f684bc52e¤cy_id=1f1519903ed240578f071aa45cb479f2' \
--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_USER_PROFILE_DATA_NOT_FOUND"],
"data": {}
}
Bad Request (Missing Parameters)
{
"success": 0,
"error": ["BAD_REQUEST"],
"data": {}
}
Notes
- Both
user_idandcurrency_idare required parameters - The agent user profile represents the association between a user (agent) and an agent profile configuration
- An agent can have multiple profiles (one per currency)
- The
agent_profile_idlinks to the agent profile master which contains:- Transaction charges configuration
- Transaction threshold limits
- Commission settings
- Product and payment mode configurations
- The
parent_user_idis used for hierarchical agent structures where agents can have sub-agents - This API is primarily used to:
- Verify an agent's profile assignment
- Get the agent's profile configuration reference
- Understand the agent's position in the agent hierarchy
- Authentication token must be valid and have appropriate permissions to access agent profile data
- The
companyidheader is mandatory and must match the company the user belongs to