Update User Wallet Lock API
Overview
Update an existing user wallet lock record. This API allows you to modify wallet lock details such as maturity date, locked amount, and other properties. The API uses a flexible Map-based approach to update only the fields that are provided in the request.
API Details
- Method: PUT
- URL: https://api.gafapay.com:8443/gafapay/v3/transaction/user_wallet_lock
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: b1910650-f892-496a-b5a3-b0560845c4a1
- Authorization: Token required
Endpoint
PUT https://api.gafapay.com:8443/gafapay/v3/transaction/user_wallet_lock
Headers
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b1910650-f892-496a-b5a3-b0560845c4a1
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4
Content-Type: application/json
Request Body
{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier of the wallet lock to update |
wallet_id | string | No | New wallet ID |
wallet_type | integer | No | New wallet type (1=Main, 2=Category, 3=Saving, 4=Revenue, 5=Commission) |
user_wallet_id | string | No | New user wallet ID |
currency_id | string | No | New currency ID |
locked_amount | double | No | New locked amount |
maturity_date | long | No | New maturity date (Unix timestamp) |
is_active | boolean | No | New active status |
cURL Request
curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/transaction/user_wallet_lock' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: b1910650-f892-496a-b5a3-b0560845c4a1' \
--header 'Content-Type: application/json' \
--data '{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}'
Response
{
"success": 1,
"error": [],
"data": {
"message": "Wallet lock updated successfully"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | integer | Status indicator (1 = success, 0 = failure) |
error | array | Array of error messages (empty on success) |
data.message | string | Success message |
Error Responses
{
"success": 0,
"error": ["Wallet lock not found"],
"data": null
}
{
"success": 0,
"error": ["Invalid wallet lock ID provided"],
"data": null
}
Update Examples
Update Maturity Date Only
{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}
Update Multiple Fields
{
"id": "ceef44967b924390a6c2e911049a55a1",
"locked_amount": 1500.0,
"maturity_date": 1759157657,
"is_active": true
}
Deactivate Wallet Lock
{
"id": "ceef44967b924390a6c2e911049a55a1",
"is_active": false
}
Use Cases
- Extend Lock Period: Update the maturity date to extend the lock period
- Modify Lock Amount: Change the locked amount (if business rules allow)
- Deactivate Lock: Set
is_activeto false to deactivate the lock - Correct Data: Fix incorrect information in existing wallet locks
- Administrative Updates: Make administrative changes to wallet locks