Update User Threshold Detail
Updates an existing user threshold detail record with new values.
Basic Information
- Method: PUT
- URL: https://api.gafapay.com:8443/gafapay/v3/transaction/user_threshold_detail
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: 5bb30135-1815-41d5-827f-baed3daba4af
- Authorization: Token required
Headers
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: 5bb30135-1815-41d5-827f-baed3daba4af
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU5NjQ2NTU5fQ.NoUhIlH54d-1UbvNzxl5tUKqnqZq2-uH-7Q_XJ86Oug
Content-Type: application/json
Request Body
{
"id": "d0442d692f4143bc852c9db6e850cd8e",
"threshold_amount": {
"daily_limit": 200000.0,
"weekly_limit": 2.0E7,
"monthly_limit": 2.0E9
},
"threshold_no_txn": {
"daily_limit": 10,
"weekly_limit": 50,
"monthly_limit": 200
},
"min_amount": 5.0,
"max_amount": 50000.0,
"is_modified": true
}
Request Parameters
- id (string, required): Unique identifier of the threshold detail to update
- threshold_amount (object, optional): New threshold amount limits
- daily_limit (number, optional): New daily amount limit
- weekly_limit (number, optional): New weekly amount limit
- monthly_limit (number, optional): New monthly amount limit
- threshold_no_txn (object, optional): New threshold transaction count limits
- daily_limit (integer, optional): New daily transaction count limit
- weekly_limit (integer, optional): New weekly transaction count limit
- monthly_limit (integer, optional): New monthly transaction count limit
- min_amount (number, optional): New minimum transaction amount
- max_amount (number, optional): New maximum transaction amount
- threshold_usege_amount (object, optional): New usage amounts
- daily_usage (number, optional): New daily amount used
- weekly_usage (number, optional): New weekly amount used
- monthly_usage (number, optional): New monthly amount used
- threshold_usege_txn (object, optional): New usage transaction counts
- daily_usage (integer, optional): New daily transactions used
- weekly_usage (integer, optional): New weekly transactions used
- monthly_usage (integer, optional): New monthly transactions used
- product_code (string, optional): New product code
- threshold_type (integer, optional): New threshold type value (1=AMOUNT, 2=NO_OF_TXN, 3=BOTH)
- is_modified (boolean, optional): Whether the threshold has been modified
cURL Request
curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/transaction/user_threshold_detail' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU5NjQ2NTU5fQ.NoUhIlH54d-1UbvNzxl5tUKqnqZq2-uH-7Q_XJ86Oug' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: 5bb30135-1815-41d5-827f-baed3daba4af' \
--header 'Content-Type: application/json' \
--data '{
"id": "d0442d692f4143bc852c9db6e850cd8e",
"threshold_amount": {
"daily_limit": 200000.0,
"weekly_limit": 2.0E7,
"monthly_limit": 2.0E9
},
"threshold_no_txn": {
"daily_limit": 10,
"weekly_limit": 50,
"monthly_limit": 200
},
"min_amount": 5.0,
"max_amount": 50000.0,
"is_modified": true
}'
Response
Success Response
{
"success": 1,
"error": [],
"data": {
"message": "USER_THRESHOLD_DETAIL_UPDATE_SUCCESS"
}
}
Error Response - Threshold Detail Not Found
{
"success": 0,
"error": ["USER_THRESHOLD_DETAIL_DATA_NOT_FOUND"],
"data": {}
}
Error Response - Update Failed
{
"success": 0,
"error": ["USER_THRESHOLD_DETAIL_UPDATE_FAILED"],
"data": {}
}
Error Response - Validation Error
{
"success": 0,
"error": ["USER_THRESHOLD_DETAIL_UPDATE_ERROR: Invalid data provided"],
"data": {}
}
Response Fields
- success (integer): Status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- message (string): Success message indicating the threshold detail was updated successfully
Additional Examples
Update Only Amount Limits
curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/transaction/user_threshold_detail' \
--header 'authorization: Token YOUR_TOKEN' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID' \
--header 'Content-Type: application/json' \
--data '{
"id": "d0442d692f4143bc852c9db6e850cd8e",
"threshold_amount": {
"daily_limit": 500000.0,
"weekly_limit": 5.0E7,
"monthly_limit": 5.0E9
}
}'
Update Transaction Count Limits
curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/transaction/user_threshold_detail' \
--header 'authorization: Token YOUR_TOKEN' \
--header 'companyid: YOUR_COMPANY_ID' \
--header 'requestid: YOUR_REQUEST_ID' \
--header 'Content-Type: application/json' \
--data '{
"id": "d0442d692f4143bc852c9db6e850cd8e",
"threshold_no_txn": {
"daily_limit": 20,
"weekly_limit": 100,
"monthly_limit": 500
},
"is_modified": true
}'
Notes
- Partial Updates: You can update any combination of fields in the request body
- Direct Fields: All fields are sent directly in the request body without a wrapper object
- Idempotent: Multiple calls with the same parameters will not cause issues
- Validation: The API validates that the threshold detail exists before updating
- Company Access: Only threshold details belonging to the authenticated user's company can be updated
- Audit Trail: The
updated_byandupdated_datefields are automatically updated - Required Fields: The
idfield is required to identify the record to update - Data Types: Ensure proper data types for numeric fields and nested objects
- Nested Objects: When updating nested objects like
threshold_amount, provide the complete object structure - Threshold Types:
1= AMOUNT (Amount-based thresholds only)2= NO_OF_TXN (Transaction count-based thresholds only)3= BOTH (Both amount and transaction count thresholds)
- Error Handling: The API provides specific error messages for different failure scenarios