https://{your-domain}.fincode.software/api/v1/services/user/update-application/{loan-application-id}?status=true
{
"status": "<string>",
"data": {
"applicationId": "<string>",
"loanProductId": "<string>",
"userName": "<string>",
"productName": "<string>",
"currencyCode": "<string>",
"employmentStatus": "<string>",
"loanApplicationcreatedDate": "<string>",
"userId": "<string>",
"durationCounterUnitEnum": "<string>",
"requestedLoanAmount": 123,
"loanStatus": "<string>",
"monthlyIncome": 123,
"dateOfBirth": "<string>",
"loanDuration": 123
}
}API Endpoints
Update Loan Offer
Allows customers to accept or withdraw from a loan offer that has been sent to them.
PUT
/
api
/
v1
/
services
/
user
/
update-application
/
{loan-application-id}
https://{your-domain}.fincode.software/api/v1/services/user/update-application/{loan-application-id}?status=true
{
"status": "<string>",
"data": {
"applicationId": "<string>",
"loanProductId": "<string>",
"userName": "<string>",
"productName": "<string>",
"currencyCode": "<string>",
"employmentStatus": "<string>",
"loanApplicationcreatedDate": "<string>",
"userId": "<string>",
"durationCounterUnitEnum": "<string>",
"requestedLoanAmount": 123,
"loanStatus": "<string>",
"monthlyIncome": 123,
"dateOfBirth": "<string>",
"loanDuration": 123
}
}Customers can use this endpoint to respond to a loan offer. If the offer is accepted, the application status changes to
ACCEPTED. If withdrawn, the status changes to WITHDRAWN.
This endpoint can only be used when the loan application status is
OFFER_SENT. Attempting to use it with any other status will result in an error.https://{your-domain}.fincode.software/api/v1/services/user/update-application/{loan-application-id}?status=true
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.string
required
Unique idempotency key for the request to prevent duplicate processing.
string
required
The date and time at which the request was initiated (ISO 8601 format).
string
required
The IP address of the customer making the request.
string
required
Unique identifier for the interaction/session.
Path Parameters
string
required
The unique identifier (UUID) of the loan application to update.
Query Parameters
boolean
required
true: Accept the loan offer (status changes toACCEPTED)false: Withdraw from the loan offer (status changes toWITHDRAWN)
Response
Returns the updated loan application details.string
default:"SUCCESS"
Overall status of the API request.
object
Updated loan application details.
Show data object
Show data object
string
Unique identifier of the loan application.
string
Identifier of the loan product.
string
Name of the customer.
string
Name of the loan product.
string
Currency code.
string
Employment status of the customer.
string
Date when the loan application was created.
string
Unique identifier of the user.
string
Duration counter unit (e.g.,
MONTH, WEEK, DAY).number
Requested loan amount.
string
Updated loan application status (
ACCEPTED or WITHDRAWN).number
Customer’s monthly income.
string
Customer’s date of birth.
number
Loan duration.
Code Examples
curl --location --request PUT 'https://{your-domain}.fincode.software/api/v1/services/user/update-application/123e4567-e89b-12d3-a456-426614174000?status=true' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-idempotency-key: unique-key-12345' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1' \
--header 'x-fapi-interaction-id: interaction-12345'
const axios = require('axios');
const BASE_URL = 'https://{your-domain}.fincode.software/api/v1/services/user';
async function updateLoanApplicationOffer(accessToken, loanApplicationId, acceptOffer) {
try {
const response = await axios.put(
`${BASE_URL}/update-application/${loanApplicationId}`,
null,
{
params: {
status: acceptOffer,
},
headers: {
'X-Auth-Token': accessToken,
'x-idempotency-key': `key-${Date.now()}`,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
},
}
);
console.log('Loan offer updated:', response.data.data);
return response.data.data;
} catch (error) {
console.error(
'Failed to update loan offer:',
error.response?.data || error.message
);
throw error;
}
}
// Usage Example - Accept offer
const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
const loanApplicationId = '123e4567-e89b-12d3-a456-426614174000';
updateLoanApplicationOffer(accessToken, loanApplicationId, true);
// Usage Example - Withdraw from offer
updateLoanApplicationOffer(accessToken, loanApplicationId, false);
