Worked on the Disbursement Request and Disbursement Response
This commit is contained in:
+290
-29
@@ -2,7 +2,7 @@
|
|||||||
"openapi": "3.0.3",
|
"openapi": "3.0.3",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Swagger Simbrella FirstAdvance - OpenAPI 3.0",
|
"title": "Swagger Simbrella FirstAdvance - OpenAPI 3.0",
|
||||||
"description": "This is a Simbrella FirstAdvance Backend Server with the OpenAPI 3.0 specification. \n\n\nSome useful links:\n- [Web Simulated Demo Page](https://digifi-salaryloan.chiefsoft.net/)\n- [Web Management Support Portal](https://digifi-office.chiefsoft.net/auth/login)",
|
"description": "This is a Simbrella FirstAdvance Backend Server with the OpenAPI 3.0 specification.\n\nSome useful links:\n- [Web Simulated Demo Page](https://digifi-salaryloan.chiefsoft.net/)\n- [Web Management Support Portal](https://digifi-office.chiefsoft.net/auth/login)",
|
||||||
"termsOfService": "http://swagger.io/terms/",
|
"termsOfService": "http://swagger.io/terms/",
|
||||||
"contact": {
|
"contact": {
|
||||||
"email": "support@chiefsoft.com"
|
"email": "support@chiefsoft.com"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SelectOffer",
|
"name": "SelectOffer",
|
||||||
"description": "This method is used the send the offer the customer selected to Simbrella.",
|
"description": "This method is used to send the offer the customer selected to Simbrella.",
|
||||||
"externalDocs": {
|
"externalDocs": {
|
||||||
"description": "Find out more",
|
"description": "Find out more",
|
||||||
"url": "https://www.simbrellang.net"
|
"url": "https://www.simbrellang.net"
|
||||||
@@ -74,6 +74,14 @@
|
|||||||
"description": "Find out more",
|
"description": "Find out more",
|
||||||
"url": "https://www.simbrellang.net"
|
"url": "https://www.simbrellang.net"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LoanRequest",
|
||||||
|
"description": "Request from Simbrella to FirstBank to process a loan",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "https://www.simbrellang.net"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
@@ -405,6 +413,53 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/Disbursement": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"LoanRequest"
|
||||||
|
],
|
||||||
|
"summary": "Request from Simbrella to FirstBank to process a loan",
|
||||||
|
"description": "This request should be executed as an atomic operation. Providing a loan and collecting the upfront fees operation should be executed within the same transaction.",
|
||||||
|
"operationId": "disburseLoanRequest",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Post JSON to disburse loan",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DisbursementRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DisbursementResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request parameters"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Resource not found"
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation exception"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"apiKey": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
@@ -497,27 +552,33 @@
|
|||||||
"minamount": {
|
"minamount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 5000
|
"example": 5000,
|
||||||
|
"description": "Minimum amount of loan"
|
||||||
},
|
},
|
||||||
"maxamount": {
|
"maxamount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 20000
|
"example": 20000,
|
||||||
|
"description": "Maximum amount of loan"
|
||||||
},
|
},
|
||||||
"productId": {
|
"productId": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 101
|
"example": 101,
|
||||||
|
"description": "Product identifier"
|
||||||
},
|
},
|
||||||
"offerid": {
|
"offerid": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 101
|
"example": 101,
|
||||||
|
"description": "Offer identifier"
|
||||||
},
|
},
|
||||||
"Tenor": {
|
"Tenor": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 30
|
"example": 30,
|
||||||
|
"description": "Loan tenor in days"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"description": "Array of eligible offers"
|
||||||
},
|
},
|
||||||
"resultCode": {
|
"resultCode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -602,7 +663,8 @@
|
|||||||
"outstandingDebtAmount": {
|
"outstandingDebtAmount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 0
|
"example": 0,
|
||||||
|
"description": "Outstanding debt amount"
|
||||||
},
|
},
|
||||||
"requestId": {
|
"requestId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -631,77 +693,97 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"offerId": {
|
"offerId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "14451"
|
"example": "14451",
|
||||||
|
"description": "Unique offer identifier"
|
||||||
},
|
},
|
||||||
"productId": {
|
"productId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "2030"
|
"example": "2030",
|
||||||
|
"description": "Product identifier"
|
||||||
},
|
},
|
||||||
"amount": {
|
"amount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 10000.0
|
"example": 10000.0,
|
||||||
|
"description": "Amount of loan customer is eligible for"
|
||||||
},
|
},
|
||||||
"upfrontPayment": {
|
"upfrontPayment": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 1000.0
|
"example": 1000.0,
|
||||||
|
"description": "Amount to be deducted upfront"
|
||||||
},
|
},
|
||||||
"interestRate": {
|
"interestRate": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 3.0
|
"example": 3.0,
|
||||||
|
"description": "% of interest rate"
|
||||||
|
},
|
||||||
|
"Interest": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 300.0,
|
||||||
|
"description": "Amount of Interest"
|
||||||
},
|
},
|
||||||
"ManagementRate": {
|
"ManagementRate": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 1.0
|
"example": 1.0,
|
||||||
|
"description": "% of Management Fee"
|
||||||
},
|
},
|
||||||
"ManagementFee": {
|
"ManagementFee": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 1.0
|
"example": 1.0,
|
||||||
|
"description": "Amount of Management Fee"
|
||||||
},
|
},
|
||||||
"InsuranceRate": {
|
"InsuranceRate": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 1.0
|
"example": 1.0,
|
||||||
|
"description": "% of Amount of Insurance"
|
||||||
},
|
},
|
||||||
"InsuranceFee": {
|
"InsuranceFee": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 100.0
|
"example": 100.0,
|
||||||
|
"description": "Amount of Insurance"
|
||||||
},
|
},
|
||||||
"VATRate": {
|
"VATRate": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 7.5
|
"example": 7.5,
|
||||||
|
"description": "% of Amount of VAT"
|
||||||
},
|
},
|
||||||
"VATamount": {
|
"VATamount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 100.0
|
"example": 100.0,
|
||||||
|
"description": "Amount of VAT"
|
||||||
},
|
},
|
||||||
"recommendedRepaymentDates": {
|
"recommendedRepaymentDates": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"example": [
|
"example": ["2022-11-30"],
|
||||||
"2022-11-30"]
|
"description": "Array of recommended payment dates for all installments in yyyy-mm-dd format"
|
||||||
},
|
},
|
||||||
"installmentAmount": {
|
"installmentAmount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 11000.0
|
"example": 11000.0,
|
||||||
|
"description": "Amount to be paid each month (upfrontPayment not included)"
|
||||||
},
|
},
|
||||||
"totalRepaymentAmount": {
|
"totalRepaymentAmount": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double",
|
"format": "double",
|
||||||
"example": 11000.0
|
"example": 11000.0,
|
||||||
|
"description": "Total amount to be paid by customer. All installment amounts + upfront payment"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"description": "Array of offers"
|
||||||
},
|
},
|
||||||
"resultCode": {
|
"resultCode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -719,10 +801,12 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"$type",
|
"$type",
|
||||||
|
"requestId",
|
||||||
"transactionId",
|
"transactionId",
|
||||||
"customerId",
|
"customerId",
|
||||||
"accountId",
|
"accountId",
|
||||||
"productId",
|
"productId",
|
||||||
|
"lienAmount",
|
||||||
"requestedAmount",
|
"requestedAmount",
|
||||||
"collectionType",
|
"collectionType",
|
||||||
"loanType",
|
"loanType",
|
||||||
@@ -742,7 +826,7 @@
|
|||||||
"transactionId": {
|
"transactionId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Tr201712RK9232P115",
|
"example": "Tr201712RK9232P115",
|
||||||
"description": "Unique ID of customer’s USSD session. Must be consistent throughout whole USSD journey"
|
"description": "Unique ID of customer's USSD session"
|
||||||
},
|
},
|
||||||
"customerId": {
|
"customerId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -784,7 +868,7 @@
|
|||||||
"loanType": {
|
"loanType": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 0,
|
"example": 0,
|
||||||
"description": "Type of loan. 0 - simple; 1 - refinance"
|
"description": "Type of loan. 0 – simple; 1 – refinance"
|
||||||
},
|
},
|
||||||
"channel": {
|
"channel": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -812,7 +896,7 @@
|
|||||||
"transactionId": {
|
"transactionId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Tr201712RK9232P115",
|
"example": "Tr201712RK9232P115",
|
||||||
"description": "Unique ID of customer’s USSD session. Must be consistent throughout whole USSD journey"
|
"description": "Unique ID of customer's USSD session"
|
||||||
},
|
},
|
||||||
"customerId": {
|
"customerId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -840,7 +924,7 @@
|
|||||||
"description": "Description of provided result code"
|
"description": "Description of provided result code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"LoanInformationRequest": {
|
"LoanInformationRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
@@ -1205,6 +1289,177 @@
|
|||||||
"description": "Description of provided result code"
|
"description": "Description of provided result code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"DisbursementRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"requestId",
|
||||||
|
"debtId",
|
||||||
|
"transactionId",
|
||||||
|
"customerId",
|
||||||
|
"accountId",
|
||||||
|
"productId",
|
||||||
|
"provideAmount",
|
||||||
|
"countryId"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "202111170001371256908",
|
||||||
|
"description": "Unique identifier of request"
|
||||||
|
},
|
||||||
|
"transactionId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "T001",
|
||||||
|
"description": "Unique ID of customer's USSD session"
|
||||||
|
},
|
||||||
|
"debtId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "273194670",
|
||||||
|
"description": "Unique identifier of a loan in Simbrella system"
|
||||||
|
},
|
||||||
|
"customerId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "CN621868",
|
||||||
|
"description": "Unique identifier of a user"
|
||||||
|
},
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "2017821799",
|
||||||
|
"description": "Specific identifier of a user's account"
|
||||||
|
},
|
||||||
|
"productId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "101",
|
||||||
|
"description": "Identifier of a product to be provided to a user"
|
||||||
|
},
|
||||||
|
"provideAmount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 100000.0,
|
||||||
|
"description": "Amount of loan to be provided on a specific account of a user"
|
||||||
|
},
|
||||||
|
"collectAmountInterest": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 5000.0,
|
||||||
|
"description": "Interest Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountMgtFee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 1000.0,
|
||||||
|
"description": "Management Fee Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountInsurance": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 1000.0,
|
||||||
|
"description": "Insurance Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountVAT": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 75.0,
|
||||||
|
"description": "VAT Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"countryId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "01",
|
||||||
|
"description": "Set to static value '01'"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Testing LoanRequest",
|
||||||
|
"description": "Any additional comment for provided loan operation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DisbursementResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"requestId",
|
||||||
|
"debtId",
|
||||||
|
"transactionId",
|
||||||
|
"customerId",
|
||||||
|
"accountId",
|
||||||
|
"productId",
|
||||||
|
"provideAmount",
|
||||||
|
"resultCode",
|
||||||
|
"resultDescription"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "202111170001371256908",
|
||||||
|
"description": "Unique identifier of request"
|
||||||
|
},
|
||||||
|
"transactionId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "T001",
|
||||||
|
"description": "Unique ID of customer's USSD session"
|
||||||
|
},
|
||||||
|
"debtId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "273194670",
|
||||||
|
"description": "Unique identifier of a loan in Simbrella system"
|
||||||
|
},
|
||||||
|
"customerId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "CN621868",
|
||||||
|
"description": "Unique identifier of a user"
|
||||||
|
},
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "2017821799",
|
||||||
|
"description": "Specific identifier of a user's account"
|
||||||
|
},
|
||||||
|
"productId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "101",
|
||||||
|
"description": "Identifier of a product to be provided to a user"
|
||||||
|
},
|
||||||
|
"provideAmount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 100000.0,
|
||||||
|
"description": "Amount of loan to be provided on a specific account of a user"
|
||||||
|
},
|
||||||
|
"collectAmountInterest": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 5000.0,
|
||||||
|
"description": "Interest Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountMgtFee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 1000.0,
|
||||||
|
"description": "Management Fee Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountInsurance": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 1000.0,
|
||||||
|
"description": "Insurance Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"collectAmountVAT": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"example": 75.0,
|
||||||
|
"description": "VAT Amount to be collected immediately after loan is provided"
|
||||||
|
},
|
||||||
|
"resultCode": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "00",
|
||||||
|
"description": "Result code of executed transaction"
|
||||||
|
},
|
||||||
|
"resultDescription": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Loan Request Completed Successfully!",
|
||||||
|
"description": "Description of provided result code"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
@@ -1212,6 +1467,12 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"scheme": "basic",
|
"scheme": "basic",
|
||||||
"description": "Basic Authentication method is implemented. Each request should contain Authorization header with Base64 encoded username:password"
|
"description": "Basic Authentication method is implemented. Each request should contain Authorization header with Base64 encoded username:password"
|
||||||
|
},
|
||||||
|
"apiKey": {
|
||||||
|
"type": "apiKey",
|
||||||
|
"in": "header",
|
||||||
|
"name": "appID",
|
||||||
|
"description": "API Key authentication method is implemented. Each request should contain appID and apiKey headers."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user