From 9684d6dd2997680bed24d323b8c68f064b37b859 Mon Sep 17 00:00:00 2001 From: Azeez Muibi Date: Mon, 24 Mar 2025 15:15:31 +0100 Subject: [PATCH] Updated Swagger Documentation --- .idea/.gitignore | 8 ++ paths/BulkSMS.json | 19 ++-- paths/CollectLoan.json | 15 ++- paths/CustomerConsent.json | 15 ++- paths/Disbursement.json | 17 +-- paths/EligibilityCheck.json | 23 ++-- paths/LienCheck.json | 15 ++- paths/LoanInformation.json | 120 ++++++++++----------- paths/NewTransactionCheck.json | 15 ++- paths/NotificationCallback.json | 36 +++---- paths/PenalCharge.json | 15 ++- paths/ProvideLoan.json | 36 +++---- paths/RACCheck.json | 11 +- paths/Repayment.json | 26 +++-- paths/RevokeEnableConsent.json | 17 +-- paths/SMS.json | 19 ++-- paths/SelectOffer.json | 23 ++-- paths/TokenValidation.json | 15 ++- paths/TransactionVerify.json | 17 +-- schemas/BulkSMSRequest.json | 7 ++ schemas/BulkSMSResponse.json | 18 +++- schemas/CollectLoanRequest.json | 27 ++++- schemas/CollectLoanResponse.json | 19 +++- schemas/CustomerConsentRequest.json | 14 ++- schemas/CustomerConsentResponse.json | 7 +- schemas/DisbursementRequest.json | 38 ++++--- schemas/DisbursementResponse.json | 36 +++++-- schemas/EligibilityCheckRequest.json | 46 +++++--- schemas/EligibilityCheckResponse.json | 66 ++++++++++-- schemas/LienCheckRequest.json | 13 +++ schemas/LienCheckResponse.json | 12 +++ schemas/LoanInformationRequest.json | 20 +++- schemas/LoanInformationResponse.json | 84 +++++++++++++-- schemas/NewTransactionCheckRequest.json | 18 ++++ schemas/NewTransactionCheckResponse.json | 64 ++++++++++- schemas/NotificationCallbackRequest.json | 73 +++++++++++++ schemas/NotificationCallbackResponse.json | 24 +++++ schemas/PenalChargeRequest.json | 24 +++++ schemas/PenalChargeResponse.json | 9 ++ schemas/ProvideLoanRequest.json | 84 +++++++++++++++ schemas/ProvideLoanResponse.json | 51 +++++++++ schemas/RACCheckRequest.json | 19 +++- schemas/RACCheckResponse.json | 33 +++++- schemas/RepaymentRequest.json | 52 +++++---- schemas/RepaymentResponse.json | 54 ++++++---- schemas/RevokeEnableConsentRequest.json | 21 ++++ schemas/RevokeEnableConsentResponse.json | 15 +++ schemas/SMSRequest.json | 8 +- schemas/SMSResponse.json | 18 +++- schemas/SelectOfferRequest.json | 33 ++++-- schemas/SelectOfferResponse.json | 126 +++++++++++++++++++++- schemas/TokenValidationRequest.json | 29 +++-- schemas/TokenValidationResponse.json | 15 +++ schemas/TransactionVerifyRequest.json | 20 ++++ schemas/TransactionVerifyResponse.json | 29 +++++ security/securitySchemes.json | 5 + 56 files changed, 1344 insertions(+), 349 deletions(-) create mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/paths/BulkSMS.json b/paths/BulkSMS.json index 16260dc..e6bf52e 100644 --- a/paths/BulkSMS.json +++ b/paths/BulkSMS.json @@ -3,9 +3,9 @@ "tags": [ "BulkSMS" ], - "summary": "BulkSMS Request", - "description": "BulkSMS Request", - "operationId": "BulkSMS", + "summary": "Send Bulk SMS", + "description": "This request is used to send Bulk SMS messages to multiple customers. The max length of the array should equal 20. The API is hosted in FIRSTBANK and it is the HTTP wrapper for the real SMS sending interface.", + "operationId": "bulkSmsNotification", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "BulkSMS Successful", + "description": "Bulk SMS sent successfully", "content": { "application/json": { "schema": { @@ -43,11 +43,16 @@ } }, "400": { - "description": "Invalid request" + "description": "Unsuccessful Response with Client Error" }, "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/CollectLoan.json b/paths/CollectLoan.json index 20c805a..3fec2e2 100644 --- a/paths/CollectLoan.json +++ b/paths/CollectLoan.json @@ -4,8 +4,8 @@ "CollectLoan" ], "summary": "Collect Loan Request", - "description": "Collect Loan Request", - "operationId": "CollectLoan", + "description": "This request is to collect money from user accounts. When request is received, FIRSTBANK should check all user accounts and collect as much as possible money to cover existing loan either partially or fully. In response, FIRSTBANK should return total amount that is actually collected from user accounts. First FBN collects body amount, then penal charge. If requested amount is not collected or collected partially FBN places a lien on user account. FBN places lien for body amount and penal charge separately.", + "operationId": "collectLoan", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "CollectLoan Successful", + "description": "Loan Collection Successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/CustomerConsent.json b/paths/CustomerConsent.json index dafbf04..fc59673 100644 --- a/paths/CustomerConsent.json +++ b/paths/CustomerConsent.json @@ -4,8 +4,8 @@ "CustomerConsent" ], "summary": "Customer Consent Request", - "description": "Customer Consent Request", - "operationId": "CustomerConsent", + "description": "This endpoint allows FirstBank to send customer consent requests to Simbrella", + "operationId": "customerConsent", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "Successful", + "description": "Successful operation", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "basic_auth": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/Disbursement.json b/paths/Disbursement.json index 88b7e0c..80d1f43 100644 --- a/paths/Disbursement.json +++ b/paths/Disbursement.json @@ -3,9 +3,9 @@ "tags": [ "Disbursement" ], - "summary": "Disbursement Request", - "description": "Disbursement Request", - "operationId": "Disbursement", + "summary": "Loan Disbursement Request", + "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. If one of the operations is failed, the whole transaction should be rolled back. Results of requests sent to this endpoint will be received from NotificationCallback endpoint.", + "operationId": "disbursement", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "Disbursement Successful", + "description": "Disbursement request accepted", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/EligibilityCheck.json b/paths/EligibilityCheck.json index a6231d7..710ed0f 100644 --- a/paths/EligibilityCheck.json +++ b/paths/EligibilityCheck.json @@ -3,11 +3,11 @@ "tags": [ "EligibilityCheck" ], - "summary": "Start the process - initiate steps to eligibility RAC Checks ", - "description": "Initiate Eligibility Check Request", - "operationId": "startEligibilityCheck", + "summary": "Check customer eligibility for loan products", + "description": "This endpoint is used by FirstBank to check if a customer is eligible for loan products and returns available offers", + "operationId": "eligibilityCheck", "requestBody": { - "description": "Post JSON to conduct eligibility tests", + "description": "Customer information for eligibility check", "content": { "application/json": { "schema": { @@ -44,21 +44,18 @@ } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request parameters" }, - "404": { - "description": "Pet not found" + "401": { + "description": "Authentication failed" }, - "422": { - "description": "Validation exception" + "500": { + "description": "Internal server error" } }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "basic_auth": [] } ] } diff --git a/paths/LienCheck.json b/paths/LienCheck.json index ebd994a..ec73606 100644 --- a/paths/LienCheck.json +++ b/paths/LienCheck.json @@ -4,8 +4,8 @@ "LienCheck" ], "summary": "Lien Check Request", - "description": "Lien Check Request", - "operationId": "LienCheck", + "description": "This method is used to get applied lien amount to the specific account.", + "operationId": "lienCheck", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "LienCheck Successful", + "description": "Lien check successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/LoanInformation.json b/paths/LoanInformation.json index ded3156..b6b978b 100644 --- a/paths/LoanInformation.json +++ b/paths/LoanInformation.json @@ -1,65 +1,65 @@ { - "get": { - "tags": [ - "LoanInformation" - ], - "summary": "Loan Information Request ", - "description": "Loan Information Request", - "operationId": "startEligibilityCheck", - "requestBody": { - "description": "Post JSON to conduct eligibility tests", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/LoanInformationRequest.json" - } - }, - "application/xml": { - "schema": { - "$ref": "../schemas/LoanInformationRequest.json" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "../schemas/LoanInformationRequest.json" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/LoanInformationResponse.json" - } + "post": { + "tags": [ + "LoanInformation" + ], + "summary": "Get information about customer's existing loans", + "description": "Loan Information Request to retrieve details about customer's existing loans", + "operationId": "loanInformation", + "requestBody": { + "description": "Customer information for loan details", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/LoanInformationRequest.json" + } + }, + "application/xml": { + "schema": { + "$ref": "../schemas/LoanInformationRequest.json" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "../schemas/LoanInformationRequest.json" + } + } }, - "application/xml": { - "schema": { - "$ref": "../schemas/LoanInformationResponse.json" - } + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/LoanInformationResponse.json" + } + }, + "application/xml": { + "schema": { + "$ref": "../schemas/LoanInformationResponse.json" + } + } + } + }, + "400": { + "description": "Invalid request parameters" + }, + "401": { + "description": "Authentication failed" + }, + "404": { + "description": "No loans found" + }, + "500": { + "description": "Internal server error" } - } }, - "400": { - "description": "Invalid ID supplied" - }, - "404": { - "description": "Loan not found" - }, - "422": { - "description": "Validation exception" - } - }, - "security": [ - { - "petstore_auth": [ - "write:pets", - "read:pets" - ] - } - ] + "security": [ + { + "basic_auth": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/NewTransactionCheck.json b/paths/NewTransactionCheck.json index dfcb92f..1497214 100644 --- a/paths/NewTransactionCheck.json +++ b/paths/NewTransactionCheck.json @@ -4,8 +4,8 @@ "NewTransactionCheck" ], "summary": "New Transaction Check Request", - "description": "New Transaction Check Request", - "operationId": "NewTransactionCheck", + "description": "This new Transaction Check will be utilized for checking status of transactions in new Asynchronous requests. Request will be sent by Simbrella to check the status of Transaction on FirstBank side if Simbrella doesn't receive callback notification 5 minutes after initial request. New list of resultCodes with corresponding resultDescriptions must be provided by FirstBank to notify Simbrella in which cases Simbrella should retry sending the request.", + "operationId": "newTransactionCheck", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "NewTransactionCheck Successful", + "description": "Transaction check successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/NotificationCallback.json b/paths/NotificationCallback.json index b7d8e7c..2caa3a3 100644 --- a/paths/NotificationCallback.json +++ b/paths/NotificationCallback.json @@ -3,25 +3,25 @@ "tags": [ "NotificationCallback" ], - "summary": "Loan Information Request ", - "description": "Loan Information Request", - "operationId": "startEligibilityCheck", + "summary": "Notification Callback", + "description": "This new feature will be used for informing Simbrella about status of the transactions that FBN have processed. Retry mechanism should be implemented by FirstBank in case of connection issues, sending notification should be repeated for 5 minutes in case of there is connection issues, after which Simbrella will try to check the status of transaction with New Transaction Check endpoint. FBN should provide a list of Response Codes with corresponding Response Descriptions for notifications. Please note that AmountCollected field will equal to 0 when transaction type is Disbursement. AmountProvided field will equal to 0 when transaction type is Collection or PenalCharge.", + "operationId": "notificationCallback", "requestBody": { - "description": "Post JSON to conduct eligibility tests", + "description": "Transaction status notification from FirstBank to Simbrella", "content": { "application/json": { "schema": { - "$ref": "../schemas/LoanInformationRequest.json" + "$ref": "../schemas/NotificationCallbackRequest.json" } }, "application/xml": { "schema": { - "$ref": "../schemas/LoanInformationRequest.json" + "$ref": "../schemas/NotificationCallbackRequest.json" } }, "application/x-www-form-urlencoded": { "schema": { - "$ref": "../schemas/LoanInformationRequest.json" + "$ref": "../schemas/NotificationCallbackRequest.json" } } }, @@ -29,37 +29,31 @@ }, "responses": { "200": { - "description": "Successful operation", + "description": "Notification received successfully", "content": { "application/json": { "schema": { - "$ref": "../schemas/LoanInformationResponse.json" + "$ref": "../schemas/NotificationCallbackResponse.json" } }, "application/xml": { "schema": { - "$ref": "../schemas/LoanInformationResponse.json" + "$ref": "../schemas/NotificationCallbackResponse.json" } } } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request" }, - "404": { - "description": "Loan not found" - }, - "422": { - "description": "Validation exception" + "500": { + "description": "Internal server error" } }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "basic_auth": [] } ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/PenalCharge.json b/paths/PenalCharge.json index 420de62..a491e08 100644 --- a/paths/PenalCharge.json +++ b/paths/PenalCharge.json @@ -4,8 +4,8 @@ "PenalCharge" ], "summary": "Penal Charge Request", - "description": "Penal Charge Request", - "operationId": "PenalCharge", + "description": "This request is used to charge customer for penalty as per existing debt. Results of requests sent to this endpoint will be received from NotificationCallback endpoint.", + "operationId": "penalCharge", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "PenalCharge Successful", + "description": "Penal Charge Request Accepted", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/ProvideLoan.json b/paths/ProvideLoan.json index d919c2d..c6cc9ea 100644 --- a/paths/ProvideLoan.json +++ b/paths/ProvideLoan.json @@ -3,25 +3,25 @@ "tags": [ "ProvideLoan" ], - "summary": "Provide Loan Request ", - "description": "Provide Loan Request", - "operationId": "startEligibilityCheck", + "summary": "Provide Loan Request", + "description": "This endpoint is used by FirstBank to request a loan provision for a customer. It allows FirstBank to specify the loan details including the amount, collection type, and loan type.", + "operationId": "provideLoan", "requestBody": { - "description": "Post JSON to conduct eligibility tests", + "description": "Loan provision request details", "content": { "application/json": { "schema": { - "$ref": "../schemas/EligibilityCheckRequest.json" + "$ref": "../schemas/ProvideLoanRequest.json" } }, "application/xml": { "schema": { - "$ref": "../schemas/EligibilityCheckRequest.json" + "$ref": "../schemas/ProvideLoanRequest.json" } }, "application/x-www-form-urlencoded": { "schema": { - "$ref": "../schemas/EligibilityCheckRequest.json" + "$ref": "../schemas/ProvideLoanRequest.json" } } }, @@ -29,37 +29,31 @@ }, "responses": { "200": { - "description": "Successful operation", + "description": "Loan provision request processed successfully", "content": { "application/json": { "schema": { - "$ref": "../schemas/EligibilityCheckResponse.json" + "$ref": "../schemas/ProvideLoanResponse.json" } }, "application/xml": { "schema": { - "$ref": "../schemas/EligibilityCheckResponse.json" + "$ref": "../schemas/ProvideLoanResponse.json" } } } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request" }, - "404": { - "description": "Pet not found" - }, - "422": { - "description": "Validation exception" + "500": { + "description": "Internal server error" } }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "basic_auth": [] } ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/RACCheck.json b/paths/RACCheck.json index 2f93fd1..338f0ea 100644 --- a/paths/RACCheck.json +++ b/paths/RACCheck.json @@ -4,7 +4,7 @@ "RACCheck" ], "summary": "Risk Acceptance Criteria Check", - "description": "Check if a customer passes the Risk Acceptance Criteria defined by the bank", + "description": "This request is used to check if a customer passes the Risk Acceptance Criteria defined by the bank", "operationId": "racCheck", "requestBody": { "required": true, @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/Repayment.json b/paths/Repayment.json index e0c0878..0961382 100644 --- a/paths/Repayment.json +++ b/paths/Repayment.json @@ -3,11 +3,11 @@ "tags": [ "Repayment" ], - "summary": "Repayment Request", - "description": "Repayment Request", - "operationId": "Repayment", + "summary": "Process a loan repayment request", + "description": "Repayment Request to initiate loan repayment", + "operationId": "repayment", "requestBody": { - "required": true, + "description": "Repayment request details", "content": { "application/json": { "schema": { @@ -24,7 +24,8 @@ "$ref": "../schemas/RepaymentRequest.json" } } - } + }, + "required": true }, "responses": { "200": { @@ -43,11 +44,22 @@ } }, "400": { - "description": "Invalid request" + "description": "Invalid request parameters" + }, + "401": { + "description": "Authentication failed" + }, + "404": { + "description": "Debt not found" }, "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "basic_auth": [] + } + ] } } \ No newline at end of file diff --git a/paths/RevokeEnableConsent.json b/paths/RevokeEnableConsent.json index ab52154..8e914df 100644 --- a/paths/RevokeEnableConsent.json +++ b/paths/RevokeEnableConsent.json @@ -3,9 +3,9 @@ "tags": [ "RevokeEnableConsent" ], - "summary": "Revoke Enable Consent Request", - "description": "Revoke Enable Consent Request", - "operationId": "RevokeEnableConsent", + "summary": "Revoke or Enable Consent Request", + "description": "This endpoint is used to notify FirstBank about the processing of a customer consent request. It allows Simbrella to inform FirstBank when a customer's consent has been either enabled or revoked.", + "operationId": "revokeEnableConsent", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "RevokeEnableConsent Successful", + "description": "Consent status update successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/SMS.json b/paths/SMS.json index 2ccadc4..db054e5 100644 --- a/paths/SMS.json +++ b/paths/SMS.json @@ -3,9 +3,9 @@ "tags": [ "SMS" ], - "summary": "SMS Request", - "description": "SMS Request", - "operationId": "SMS", + "summary": "Send Single SMS", + "description": "This request is used to send a single SMS message to a customer. The API is hosted in FIRSTBANK and it is the HTTP wrapper for the real SMS sending interface.", + "operationId": "smsNotification", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "SMS Successful", + "description": "SMS sent successfully", "content": { "application/json": { "schema": { @@ -43,11 +43,16 @@ } }, "400": { - "description": "Invalid request" + "description": "Unsuccessful Response with Client Error" }, "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/SelectOffer.json b/paths/SelectOffer.json index 14c6234..8ebf3b6 100644 --- a/paths/SelectOffer.json +++ b/paths/SelectOffer.json @@ -3,11 +3,11 @@ "tags": [ "SelectOffer" ], - "summary": "This method is used the send the offer the customer selected to Simbrella ", - "description": "This method is used the send the offer the customer selected to Simbrella", - "operationId": "startEligibilityCheck", + "summary": "Send the offer the customer selected to Simbrella", + "description": "This method is used to send the offer the customer selected to Simbrella", + "operationId": "selectOffer", "requestBody": { - "description": "Post JSON to conduct eligibility tests", + "description": "Customer selected offer details", "content": { "application/json": { "schema": { @@ -44,21 +44,18 @@ } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request parameters" }, - "404": { - "description": "Offers not found" + "401": { + "description": "Authentication failed" }, - "422": { - "description": "Validation exception" + "500": { + "description": "Internal server error" } }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "basic_auth": [] } ] } diff --git a/paths/TokenValidation.json b/paths/TokenValidation.json index a27a79a..7eeaa9c 100644 --- a/paths/TokenValidation.json +++ b/paths/TokenValidation.json @@ -4,8 +4,8 @@ "TokenValidation" ], "summary": "Token Validation Request", - "description": "Token Validation Request", - "operationId": "TokenValidation", + "description": "This method is used while users from FBN access Customer Care Portal. User will enter soft/hard token code. This will be captured and sent to this endpoint for validation.", + "operationId": "validateToken", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "TokenValidation Successful", + "description": "Token validation successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/paths/TransactionVerify.json b/paths/TransactionVerify.json index da3153e..5e5547a 100644 --- a/paths/TransactionVerify.json +++ b/paths/TransactionVerify.json @@ -3,9 +3,9 @@ "tags": [ "TransactionVerify" ], - "summary": "Transaction Verify Request", - "description": "Transaction Verify Request", - "operationId": "TransactionVerify", + "summary": "Transaction Verification Request", + "description": "This request is to double check the response received from DisburseLoan and CollectLoan Synchronous APIs. This request is required to check transaction result on FIRSTBANK.", + "operationId": "transactionVerify", "requestBody": { "required": true, "content": { @@ -28,7 +28,7 @@ }, "responses": { "200": { - "description": "TransactionVerify Successful", + "description": "Transaction Verification Successful", "content": { "application/json": { "schema": { @@ -48,6 +48,11 @@ "500": { "description": "Internal server error" } - } + }, + "security": [ + { + "api_key": [] + } + ] } - } \ No newline at end of file +} \ No newline at end of file diff --git a/schemas/BulkSMSRequest.json b/schemas/BulkSMSRequest.json index 1d368e2..5ff0a63 100644 --- a/schemas/BulkSMSRequest.json +++ b/schemas/BulkSMSRequest.json @@ -1,18 +1,22 @@ { "type": "array", + "maxItems": 20, "items": { "type": "object", "properties": { "text": { "type": "string", + "description": "Message to send to customer", "example": "This is a test message for SMS request method." }, "dest": { "type": "string", + "description": "Phone Number in international format", "example": "+2348039409144" }, "unicode": { "type": "boolean", + "description": "Character encoding standard (set as True for bulk SMS)", "example": true } }, @@ -21,5 +25,8 @@ "dest", "unicode" ] + }, + "xml": { + "name": "BulkSMSRequest" } } \ No newline at end of file diff --git a/schemas/BulkSMSResponse.json b/schemas/BulkSMSResponse.json index 76acf42..e518a89 100644 --- a/schemas/BulkSMSResponse.json +++ b/schemas/BulkSMSResponse.json @@ -3,22 +3,32 @@ "properties": { "data": { "type": "string", + "description": "Any additional data in response", "example": "" }, "statusCode": { "type": "integer", + "description": "Result code of executed process (200 = Success)", "example": 200 }, "IsSuccessful": { "type": "boolean", + "description": "An Indicator that the process was successful or not", "example": true }, "errorMessage": { - "type": [ - "string", - "null" - ], + "type": "string", + "description": "Description of status code if process is failed, null if successful", "example": null } + }, + "required": [ + "data", + "statusCode", + "IsSuccessful", + "errorMessage" + ], + "xml": { + "name": "BulkSMSResponse" } } \ No newline at end of file diff --git a/schemas/CollectLoanRequest.json b/schemas/CollectLoanRequest.json index 5409b8f..baa1615 100644 --- a/schemas/CollectLoanRequest.json +++ b/schemas/CollectLoanRequest.json @@ -3,63 +3,82 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of transaction in Simbrella system", "example": "T002" }, + "fbnTransactionId": { + "type": "string", + "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests", + "example": "Tr201712RK9232P115" + }, "debtId": { "type": "string", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "productId": { "type": "string", + "description": "Identifier of a product for which collection to be made", "example": "101" }, "collectAmount": { "type": "number", "format": "double", + "description": "Amount to be collected from user's account (penalCharge is not included)", "example": 80000.0 }, "penalCharge": { "type": "number", "format": "double", + "description": "Amount of penalty to be collected from user's account. If there is no penalty, amount is '0'", "example": 0.0 }, "collectionMethod": { "type": "integer", + "description": "1 - on deposit of salary; 2 - on due date; 3 - initiated by user", + "enum": [1, 2, 3], "example": 1 }, "lienAmount": { "type": "number", "format": "double", + "description": "Aggregated (summed up) lien amount", "example": 80000.0 }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "comment": { "type": "string", + "description": "Any additional comment for provided loan operation", "example": "Testing CollectionLoanRequest" } }, "required": [ "transactionId", + "fbnTransactionId", "debtId", "customerId", "accountId", "productId", "collectAmount", - "penalCharge", "collectionMethod", "lienAmount", - "countryId", - "comment" - ] + "countryId" + ], + "xml": { + "name": "CollectLoanRequest" + } } \ No newline at end of file diff --git a/schemas/CollectLoanResponse.json b/schemas/CollectLoanResponse.json index 523a49f..aefa298 100644 --- a/schemas/CollectLoanResponse.json +++ b/schemas/CollectLoanResponse.json @@ -3,53 +3,65 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of transaction in Simbrella system", "example": "T002" }, "debtId": { "type": "string", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "productId": { "type": "string", + "description": "Identifier of a product for which collection to be made", "example": "101" }, "collectAmount": { "type": "number", "format": "double", + "description": "Amount collected from user's account (penalCharge is not included)", "example": 60000.0 }, "penalCharge": { "type": "number", "format": "double", + "description": "Amount of penalty collected from user's account. If there is no penalty, amount is '0'", "example": 0.0 }, "lienAmount": { "type": "number", "format": "double", + "description": "Aggregated (summed up) lien amount", "example": 20000.0 }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "comment": { "type": "string", + "description": "Any additional comment for provided loan operation", "example": "Testing CollectionLoanRequest" }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Loan Collection Successful" } }, @@ -62,9 +74,10 @@ "collectAmount", "penalCharge", "lienAmount", - "countryId", - "comment", "resultCode", "resultDescription" - ] + ], + "xml": { + "name": "CollectLoanResponse" + } } \ No newline at end of file diff --git a/schemas/CustomerConsentRequest.json b/schemas/CustomerConsentRequest.json index c3566b1..8789e18 100644 --- a/schemas/CustomerConsentRequest.json +++ b/schemas/CustomerConsentRequest.json @@ -3,31 +3,40 @@ "properties": { "$type": { "type": "string", + "description": "Fixed value for this request type", "example": "CustomerConsentRequest" }, "transactionId": { "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", "example": "20171209232177" }, "customerId": { "type": "string", + "description": "Unique identifier of a customer", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "ACN8263457" }, "requestTime": { "type": "string", "format": "date-time", + "description": "Date and time of consent request", "example": "2019-10-18 14:26:21.063" }, "consentType": { "type": "string", + "description": "Type of consent: 'Enable' or 'Revoke'", + "enum": ["Enable", "Revoke"], "example": "Revoke" }, "channel": { "type": "string", + "description": "Request channel: 'USSD' or 'APP'", + "enum": ["USSD", "APP"], "example": "USSD" } }, @@ -39,5 +48,8 @@ "requestTime", "consentType", "channel" - ] + ], + "xml": { + "name": "CustomerConsentRequest" + } } \ No newline at end of file diff --git a/schemas/CustomerConsentResponse.json b/schemas/CustomerConsentResponse.json index 4f52996..71fb928 100644 --- a/schemas/CustomerConsentResponse.json +++ b/schemas/CustomerConsentResponse.json @@ -3,15 +3,20 @@ "properties": { "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Request is received" } }, "required": [ "resultCode", "resultDescription" - ] + ], + "xml": { + "name": "CustomerConsentResponse" + } } \ No newline at end of file diff --git a/schemas/DisbursementRequest.json b/schemas/DisbursementRequest.json index 88ce7a6..c1915e0 100644 --- a/schemas/DisbursementRequest.json +++ b/schemas/DisbursementRequest.json @@ -1,77 +1,91 @@ { "type": "object", "properties": { - "transactionId": { + "requestId": { "type": "string", - "example": "T001" - }, - "TransactionId": { - "type": "string", - "example": "Tr201712RK9232P115" + "description": "Unique identifier of request", + "example": "REQ12345" }, "debtId": { "type": "string", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in Simbrella system", + "example": "T001" + }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "productId": { "type": "string", + "description": "Identifier of a product to be provided to a user", "example": "101" }, "provideAmount": { "type": "number", "format": "double", + "description": "Amount of loan (including service fee) to be provided on a specific account of a user", "example": 100000.0 }, "collectAmountInterest": { "type": "number", "format": "double", + "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", "example": 5000.0 }, "collectAmountMgtFee": { "type": "number", "format": "double", + "description": "Management Fee Amount to be collected immediately after loan is provided", "example": 1000.0 }, "collectAmountInsurance": { "type": "number", "format": "double", + "description": "Insurance Amount to be collected immediately after loan is provided", "example": 1000.0 }, "collectAmountVAT": { "type": "number", "format": "double", + "description": "VAT Amount to be collected immediately after loan is provided", "example": 75.0 }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "comment": { "type": "string", + "description": "Any additional comment for provided loan operation", "example": "Testing LoanRequest" } }, "required": [ - "transactionId", - "TransactionId", + "requestId", "debtId", + "transactionId", "customerId", "accountId", "productId", "provideAmount", - "collectAmountInterest", "collectAmountMgtFee", "collectAmountInsurance", "collectAmountVAT", - "countryId", - "comment" - ] + "countryId" + ], + "xml": { + "name": "DisbursementRequest" + } } \ No newline at end of file diff --git a/schemas/DisbursementResponse.json b/schemas/DisbursementResponse.json index ac12c6e..fe0a9a4 100644 --- a/schemas/DisbursementResponse.json +++ b/schemas/DisbursementResponse.json @@ -1,82 +1,98 @@ { "type": "object", "properties": { - "transactionId": { + "requestId": { "type": "string", - "example": "T001" - }, - "TransactionId": { - "type": "string", - "example": "Tr201712RK9232P115" + "description": "Unique identifier of request", + "example": "REQ12345" }, "debtId": { "type": "string", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in Simbrella system", + "example": "T001" + }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "productId": { "type": "string", + "description": "Identifier of a product to be provided to a user", "example": "101" }, "provideAmount": { "type": "number", "format": "double", + "description": "Amount of loan (including service fee) to be provided on a specific account of a user", "example": 100000.0 }, "collectAmountInterest": { "type": "number", "format": "double", + "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", "example": 5000.0 }, "collectAmountMgtFee": { "type": "number", "format": "double", + "description": "Management Fee Amount to be collected immediately after loan is provided", "example": 1000.0 }, "collectAmountInsurance": { "type": "number", "format": "double", + "description": "Insurance Amount to be collected immediately after loan is provided", "example": 1000.0 }, "collectAmountVAT": { "type": "number", "format": "double", + "description": "VAT Amount to be collected immediately after loan is provided", "example": 75.0 }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Loan Request Completed Successfully!" } }, "required": [ - "transactionId", - "TransactionId", + "requestId", "debtId", + "transactionId", "customerId", "accountId", "productId", "provideAmount", - "collectAmountInterest", "collectAmountMgtFee", "collectAmountInsurance", "collectAmountVAT", "countryId", "resultCode", "resultDescription" - ] + ], + "xml": { + "name": "DisbursementResponse" + } } \ No newline at end of file diff --git a/schemas/EligibilityCheckRequest.json b/schemas/EligibilityCheckRequest.json index 4d70802..07819c4 100644 --- a/schemas/EligibilityCheckRequest.json +++ b/schemas/EligibilityCheckRequest.json @@ -1,34 +1,56 @@ { "type": "object", + "required": [ + "$type", + "transactionId", + "countryCode", + "customerId", + "accountId", + "lienAmount", + "channel" + ], "properties": { - "lienAmount": { - "type": "number", - "format": "double", - "example": 500.01 + "$type": { + "type": "string", + "description": "Fixed value to identify request type", + "example": "EligibilityCheckRequest" }, "transactionId": { "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", "example": "Tr201712RK9232P115" }, "countryCode": { "type": "string", + "description": "Unique country code. Please refer to Country Codes table", "example": "NGR" }, "customerId": { "type": "string", + "description": "Unique identifier of a customer", "example": "CN621868" }, - "msisdn": { - "type": "string", - "example": "3451342" - }, - "channel": { - "type": "string", - "example": "USSD" - }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "ACN8263457" + }, + "msisdn": { + "type": "string", + "description": "User's mobile number in an international format", + "example": "2348012345678" + }, + "lienAmount": { + "type": "number", + "format": "double", + "description": "Amount of lien placed on user's account", + "example": 4.0 + }, + "channel": { + "type": "string", + "description": "Request channel: USSD, MobApp, or Web", + "enum": ["USSD", "MobApp", "Web"], + "example": "USSD" } }, "xml": { diff --git a/schemas/EligibilityCheckResponse.json b/schemas/EligibilityCheckResponse.json index e20999c..db7398c 100644 --- a/schemas/EligibilityCheckResponse.json +++ b/schemas/EligibilityCheckResponse.json @@ -1,29 +1,73 @@ { "type": "object", + "required": [ + "customerId", + "transactionId", + "eligibleOffers", + "resultCode", + "resultDescription" + ], "properties": { - "eligibleOffers": { - "type": "string", - "example": "OFFERS ARRAY HERE" - }, - "resultDescription": { - "type": "string", - "example": "Successful" - }, "customerId": { "type": "string", + "description": "Unique identifier of a customer", "example": "CN621868" }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", + "example": "Tr201712RK9232P115" + }, "msisdn": { "type": "string", - "example": "3451342" + "description": "User's mobile number in an international format", + "example": "2348012345678" + }, + "eligibleOffers": { + "type": "array", + "description": "Array of loan offers the customer is eligible for", + "items": { + "type": "object", + "properties": { + "minamount": { + "type": "number", + "format": "double", + "description": "Minimum loan amount", + "example": 5000 + }, + "maxamount": { + "type": "number", + "format": "double", + "description": "Maximum loan amount", + "example": 20000 + }, + "productId": { + "type": "string", + "description": "Product identifier", + "example": "101" + }, + "offerid": { + "type": "string", + "description": "Offer identifier", + "example": "101" + }, + "Tenor": { + "type": "integer", + "description": "Loan tenor in days", + "example": 30 + } + } + } }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, - "accountId": { + "resultDescription": { "type": "string", - "example": "ACN8263457" + "description": "Textual description of provided result code. In case if customer is not eligible (where resultCode is «05») this parameter contains end-user message that can be show directly to the customer.", + "example": "Successful" } }, "xml": { diff --git a/schemas/LienCheckRequest.json b/schemas/LienCheckRequest.json index ebe13be..705a2d3 100644 --- a/schemas/LienCheckRequest.json +++ b/schemas/LienCheckRequest.json @@ -3,19 +3,32 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique Identifier in Simbrella system", "example": "SMB1234567" }, "customerId": { "type": "string", + "description": "Unique identifier of customer", "example": "123456" }, "accountId": { "type": "string", + "description": "Unique identifier of account", "example": "E9F77222920BAAB1C5ACF2253C6D6113" }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" } + }, + "required": [ + "transactionId", + "customerId", + "accountId", + "countryId" + ], + "xml": { + "name": "LienCheckRequest" } } \ No newline at end of file diff --git a/schemas/LienCheckResponse.json b/schemas/LienCheckResponse.json index 3509d88..8f4e743 100644 --- a/schemas/LienCheckResponse.json +++ b/schemas/LienCheckResponse.json @@ -3,15 +3,27 @@ "properties": { "lienAmount": { "type": "number", + "format": "double", + "description": "Lien amount applied to the account", "example": 20000.0 }, "resultCode": { "type": "string", + "description": "Result code of response", "example": "00" }, "resultDescription": { "type": "string", + "description": "Response description", "example": "Successful" } + }, + "required": [ + "lienAmount", + "resultCode", + "resultDescription" + ], + "xml": { + "name": "LienCheckResponse" } } \ No newline at end of file diff --git a/schemas/LoanInformationRequest.json b/schemas/LoanInformationRequest.json index 70d753c..c545af7 100644 --- a/schemas/LoanInformationRequest.json +++ b/schemas/LoanInformationRequest.json @@ -1,24 +1,36 @@ { "type": "object", + "required": [ + "$type", + "transactionId", + "customerId", + "channel" + ], "properties": { + "$type": { + "type": "string", + "description": "Fixed value to identify request type", + "example": "LoanInformationRequest" + }, "transactionId": { "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", "example": "Tr201712RK9232P115" }, - "resultDescription": { - "type": "string", - "example": "Successful" - }, "customerId": { "type": "string", + "description": "Unique identifier of a customer", "example": "CN621868" }, "msisdn": { "type": "string", + "description": "User's mobile number in an international format", "example": "3451342" }, "channel": { "type": "string", + "description": "Request channel: USSD, MobileApp, or Web", + "enum": ["USSD", "MobileApp", "Web"], "example": "USSD" } }, diff --git a/schemas/LoanInformationResponse.json b/schemas/LoanInformationResponse.json index 528abd9..38c5ba3 100644 --- a/schemas/LoanInformationResponse.json +++ b/schemas/LoanInformationResponse.json @@ -1,25 +1,87 @@ { "type": "object", + "required": [ + "customerId", + "loans", + "resultCode", + "resultDescription" + ], "properties": { - "transactionId": { + "customerId": { "type": "string", - "example": "Tr201712RK9232P115" + "description": "Unique identifier of a user", + "example": "CN621868" }, - "resultDescription": { - "type": "string", - "example": "Successful" + "loans": { + "type": "array", + "description": "Array of loan entities. If customer doesn't have a loan, this array will be empty", + "items": { + "type": "object", + "properties": { + "debtId": { + "type": "string", + "description": "Unique identifier of a debt of a user", + "example": "123456789" + }, + "loanDate": { + "type": "string", + "format": "date-time", + "description": "Date and time of provided loan", + "example": "2019-10-18 14:26:21.063" + }, + "dueDate": { + "type": "string", + "format": "date-time", + "description": "Due date of provided loan", + "example": "2019-11-20 14:26:21.063" + }, + "currentLoanAmount": { + "type": "number", + "format": "double", + "description": "Outstanding debt amount of the user", + "example": 8500.0 + }, + "initialLoanAmount": { + "type": "number", + "format": "double", + "description": "Initial loan amount", + "example": 10000.0 + }, + "defaultFee": { + "type": "number", + "format": "double", + "description": "Penalty fee amount", + "example": 0.0 + }, + "continiousFee": { + "type": "number", + "format": "double", + "description": "Interest fee charged continuously. First occurs when payment is delayed", + "example": 0.0 + }, + "productId": { + "type": "string", + "description": "Identifier of a provided product to a user", + "example": "101" + } + } + } + }, + "totalDebtAmount": { + "type": "number", + "format": "double", + "description": "Sum amount of all existing debts of a user", + "example": 8500.0 }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, - "customerId": { + "resultDescription": { "type": "string", - "example": "CN621868" - }, - "loan": { - "type": "string", - "example": "Arrray of loans" + "description": "Description of provided result code", + "example": "Successful" } }, "xml": { diff --git a/schemas/NewTransactionCheckRequest.json b/schemas/NewTransactionCheckRequest.json index b7d79c4..4885cef 100644 --- a/schemas/NewTransactionCheckRequest.json +++ b/schemas/NewTransactionCheckRequest.json @@ -3,27 +3,45 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of request in Simbrella system", "example": "173021" }, "debtId": { "type": "string", + "description": "Unique identifier of provided loan in Simbrella system", "example": "173021" }, "transactionType": { "type": "string", + "description": "Type of Transaction Simbrella is sending Transaction Check for", + "enum": ["Disbursement", "Collection", "PenalCharge"], "example": "Disbursement" }, "fbnTransactionId": { "type": "string", + "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests", "example": "FBN2411011411413A74960" }, "origTransactionId": { "type": "string", + "description": "TransactionId sent by Simbrella within initial request to Firstbank API", "example": "2411011411413A74960" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" } + }, + "required": [ + "transactionId", + "debtId", + "transactionType", + "fbnTransactionId", + "origTransactionId", + "customerId" + ], + "xml": { + "name": "NewTransactionCheckRequest" } } \ No newline at end of file diff --git a/schemas/NewTransactionCheckResponse.json b/schemas/NewTransactionCheckResponse.json index 086cbc0..f88c4e5 100644 --- a/schemas/NewTransactionCheckResponse.json +++ b/schemas/NewTransactionCheckResponse.json @@ -1,13 +1,69 @@ { "type": "object", "properties": { - "status": { + "transactionId": { "type": "string", - "example": "Success" + "description": "Unique identifier of request in Simbrella system", + "example": "24110114545374721" }, - "message": { + "data": { + "type": "object", + "description": "Object containing details of transaction Simbrella querying", + "properties": { + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in Simbrella system that was sent for transaction check", + "example": "241101" + }, + "providedAmount": { + "type": "number", + "format": "double", + "description": "Amount collected from user's account within disbursement operation. Amount should always be equal to zero if operation is of any type other than Disbursement", + "example": 1000.00 + }, + "collectedAmount": { + "type": "number", + "format": "double", + "description": "Amount collected from user's account. In case of Disbursement this value will be equal to 0. In case of Collection this value will represent amount successfully collected from customers account. In case of Penal charge this value will represent penalty amount collected from customer's account.", + "example": 0.00 + }, + "resultCode": { + "type": "string", + "description": "Result code of the operation one sent for transaction check, e.g. (00 – Success etc.)", + "example": "00" + }, + "resultDescription": { + "type": "string", + "description": "Description of provided result code that was sent for transaction check", + "example": "Loan Provision is successful" + } + }, + "required": [ + "transactionId", + "providedAmount", + "collectedAmount", + "resultCode", + "resultDescription" + ] + }, + "resultCode": { "type": "string", - "example": "Transaction check completed successfully." + "description": "Result code of executed transaction, e.g. (00 – Success etc.)", + "example": "00" + }, + "resultDescription": { + "type": "string", + "description": "Description of provided result code", + "example": "SUCCESS" } + }, + "required": [ + "transactionId", + "data", + "resultCode", + "resultDescription" + ], + "xml": { + "name": "NewTransactionCheckResponse" } } \ No newline at end of file diff --git a/schemas/NotificationCallbackRequest.json b/schemas/NotificationCallbackRequest.json index e69de29..cfed94d 100644 --- a/schemas/NotificationCallbackRequest.json +++ b/schemas/NotificationCallbackRequest.json @@ -0,0 +1,73 @@ +{ + "type": "object", + "properties": { + "fbnTransactionId": { + "type": "string", + "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests", + "example": "123456789" + }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", + "example": "123456789" + }, + "customerId": { + "type": "string", + "description": "Unique identifier of a customer", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "description": "Specific identifier of a user's account", + "example": "ACN8263457" + }, + "debtId": { + "type": "string", + "description": "Unique identifier of providing loan in Simbrella system", + "example": "987654321" + }, + "transactionType": { + "type": "string", + "description": "Type of transaction initiated by Simbrella", + "enum": ["Disbursement", "Collection", "PenalCharge"], + "example": "Disbursement" + }, + "amountProvided": { + "type": "number", + "format": "double", + "description": "Amount provided to customer within Disbursement operation. Will be 0 for Collection or PenalCharge transactions.", + "example": 1000.00 + }, + "amountCollected": { + "type": "number", + "format": "double", + "description": "Amount collected during execution of operation. In case of Disbursement this value will be equal to 0. In case of Collection this value will represent amount successfully collected from customers account. In case of Penal charge this value will represent penalty amount collected from customer's account.", + "example": 0.00 + }, + "responseCode": { + "type": "string", + "description": "Result code of the notification, e.g. (00 – Success etc.) see result codes table", + "example": "00" + }, + "responseDescription": { + "type": "string", + "description": "Result description of the notification, detailing status of the transaction", + "example": "Successful" + } + }, + "required": [ + "fbnTransactionId", + "transactionId", + "customerId", + "accountId", + "debtId", + "transactionType", + "amountProvided", + "amountCollected", + "responseCode", + "responseDescription" + ], + "xml": { + "name": "NotificationCallbackRequest" + } +} \ No newline at end of file diff --git a/schemas/NotificationCallbackResponse.json b/schemas/NotificationCallbackResponse.json index e69de29..28bae3b 100644 --- a/schemas/NotificationCallbackResponse.json +++ b/schemas/NotificationCallbackResponse.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "properties": { + "resultCode": { + "type": "string", + "description": "Result code of successful request. See Simbrella Result Codes", + "maxLength": 2, + "example": "00" + }, + "resultDescription": { + "type": "string", + "description": "Description of provided result code", + "maxLength": 100, + "example": "Successful" + } + }, + "required": [ + "resultCode", + "resultDescription" + ], + "xml": { + "name": "NotificationCallbackResponse" + } +} \ No newline at end of file diff --git a/schemas/PenalChargeRequest.json b/schemas/PenalChargeRequest.json index 64af9c8..8de7122 100644 --- a/schemas/PenalChargeRequest.json +++ b/schemas/PenalChargeRequest.json @@ -3,39 +3,63 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of transaction in Simbrella system", "example": "T004" }, "fbnTransactionId": { "type": "string", + "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests", "example": "Tr201712RK9232P115" }, "debtId": { "type": "string", + "description": "Unique identifier of providing loan in Simbrella system", "example": "273194670" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "penalCharge": { "type": "number", + "format": "double", + "description": "Penalty amount that needs to be collected from user's account", "example": 1.2 }, "lienAmount": { "type": "number", + "format": "double", + "description": "Aggregated (summed up) lien amount", "example": 101.2 }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "comment": { "type": "string", + "description": "Any additional comment for provided loan operation", "example": "Testing PenalChargeRequest" } + }, + "required": [ + "transactionId", + "fbnTransactionId", + "debtId", + "customerId", + "accountId", + "penalCharge", + "lienAmount", + "countryId" + ], + "xml": { + "name": "PenalChargeRequest" } } \ No newline at end of file diff --git a/schemas/PenalChargeResponse.json b/schemas/PenalChargeResponse.json index 0cc2482..73d2388 100644 --- a/schemas/PenalChargeResponse.json +++ b/schemas/PenalChargeResponse.json @@ -3,11 +3,20 @@ "properties": { "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Penal charge debited successfully" } + }, + "required": [ + "resultCode", + "resultDescription" + ], + "xml": { + "name": "PenalChargeResponse" } } \ No newline at end of file diff --git a/schemas/ProvideLoanRequest.json b/schemas/ProvideLoanRequest.json index e69de29..90a7452 100644 --- a/schemas/ProvideLoanRequest.json +++ b/schemas/ProvideLoanRequest.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "properties": { + "$type": { + "type": "string", + "description": "Value is fixed to 'ProvideLoanRequest'", + "example": "ProvideLoanRequest" + }, + "requestId": { + "type": "string", + "description": "Unique identifier of request", + "example": "202111170001371256908" + }, + "transactionId": { + "type": "string", + "description": "Unique ID of customer's USSD session. Must be consistent throughout whole USSD journey", + "example": "Tr201712RK9232P115" + }, + "customerId": { + "type": "string", + "description": "Unique identifier of a customer", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "description": "Specific identifier of a user's account", + "example": "ACN8263457" + }, + "msisdn": { + "type": "string", + "description": "User's mobile number in an international format", + "example": "3451342" + }, + "productId": { + "type": "string", + "description": "Identifier of a product chosen by user", + "example": "101" + }, + "lienAmount": { + "type": "number", + "format": "double", + "description": "Amount of lien placed on user's account", + "example": 400 + }, + "requestedAmount": { + "type": "number", + "format": "double", + "description": "Amount of loan that requested by user", + "example": 900 + }, + "collectionType": { + "type": "integer", + "description": "Type of collection that user is preferred. 0 – as soon as salary inflow occurs; 1- as soon as any new inflow occurs, 1 – collection after XX days.", + "enum": [0, 1], + "example": 1 + }, + "loanType": { + "type": "integer", + "description": "Type of loan. 0 – simple; 1 – refinance.", + "enum": [0, 1], + "example": 0 + }, + "channel": { + "type": "string", + "description": "Request channel: 'USSD' or 'MobileApp' or 'Web'", + "enum": ["USSD", "MobileApp", "Web"], + "example": "USSD" + } + }, + "required": [ + "$type", + "transactionId", + "customerId", + "accountId", + "productId", + "requestedAmount", + "collectionType", + "loanType", + "channel" + ], + "xml": { + "name": "ProvideLoanRequest" + } +} \ No newline at end of file diff --git a/schemas/ProvideLoanResponse.json b/schemas/ProvideLoanResponse.json index e69de29..5769398 100644 --- a/schemas/ProvideLoanResponse.json +++ b/schemas/ProvideLoanResponse.json @@ -0,0 +1,51 @@ +{ + "type": "object", + "properties": { + "requestId": { + "type": "string", + "description": "Unique identifier of request", + "example": "202111170001371256908" + }, + "transactionId": { + "type": "string", + "description": "Unique ID of customer's USSD session. Must be consistent throughout whole USSD journey", + "example": "Tr201712RK9232P115" + }, + "customerId": { + "type": "string", + "description": "Unique identifier of a customer", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "description": "Specific identifier of a user's account", + "example": "ACN8263457" + }, + "msisdn": { + "type": "string", + "description": "User's mobile number in an international format", + "example": "3451342" + }, + "resultCode": { + "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", + "example": "00" + }, + "resultDescription": { + "type": "string", + "description": "Description of provided result code", + "example": "Successful" + } + }, + "required": [ + "requestId", + "transactionId", + "customerId", + "accountId", + "resultCode", + "resultDescription" + ], + "xml": { + "name": "ProvideLoanResponse" + } +} \ No newline at end of file diff --git a/schemas/RACCheckRequest.json b/schemas/RACCheckRequest.json index e8449ac..f956d09 100644 --- a/schemas/RACCheckRequest.json +++ b/schemas/RACCheckRequest.json @@ -3,25 +3,40 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of transaction in Simbrella system", "example": "T001" }, "fbnTransactionId": { "type": "string", + "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests", "example": "Tr201712RK9232P115" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "RAC_Array": { - "type": "string", - "example": "XXX" + "type": "array", + "description": "Array of RAC items to check (BVN, CRC, CRMS, Salary account, lien, whitelist, lien, account status, no bounced check and existing loan)", + "items": { + "type": "string" + }, + "example": ["SalaryAccount", "BVN", "BVNAttachedtoAccount", "CRC", "CRMS", "AccountStatus", "Lien", "NoBouncedCheck", "Whitelist", "NoPastDueSalaryLoan", "NoPastDueOtherLoan"] } }, + "required": [ + "transactionId", + "fbnTransactionId", + "customerId", + "accountId", + "RAC_Array" + ], "xml": { "name": "RACCheckRequest" } diff --git a/schemas/RACCheckResponse.json b/schemas/RACCheckResponse.json index 110b555..5f19c87 100644 --- a/schemas/RACCheckResponse.json +++ b/schemas/RACCheckResponse.json @@ -3,62 +3,93 @@ "properties": { "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "RACResponse": { "type": "object", + "description": "Object containing binary responses for each RAC check", "properties": { "Salary account": { "type": "string", + "description": "Has Salary account or Not (1 = Yes, 0 = No)", "example": "1" }, "BVN": { "type": "string", + "description": "BVN Ok (1 = Yes, 0 = No)", "example": "1" }, "BVNAttachedtoAccount": { "type": "string", + "description": "BVN attached to account (1 = Yes, 0 = No)", "example": "1" }, "CRMS": { "type": "string", + "description": "No Delinquent loan in CRMS (1 = Yes, 0 = No)", "example": "1" }, "CRC": { "type": "string", + "description": "No Delinquent loan in CRC (1 = Yes, 0 = No)", "example": "1" }, "AccountStatus": { "type": "string", + "description": "Has 'Regular' account status (1 = Yes, 0 = No)", "example": "1" }, "Lien": { "type": "string", + "description": "No Lien on account (1 = Yes, 0 = No)", "example": "1" }, "NoBouncedCheck": { "type": "string", + "description": "No Bounced Check (1 = Yes, 0 = No)", "example": "1" }, "Whitelist": { "type": "string", + "description": "Not blacklisted (1 = Yes, 0 = No)", "example": "1" }, "NoPastDueSalaryLoan": { "type": "string", + "description": "No Past Due Salary Loan (1 = Yes, 0 = No)", "example": "1" }, "NoPastDueOtherLoan": { "type": "string", + "description": "No Past Due Other Loans (1 = Yes, 0 = No)", "example": "1" } - } + }, + "required": [ + "Salary account", + "BVNAttachedtoAccount", + "CRC", + "CRMS", + "AccountStatus", + "Lien", + "NoBouncedCheck", + "Whitelist", + "NoPastDueSalaryLoan", + "NoPastDueOtherLoan" + ] }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "RAC Check Successful" } }, + "required": [ + "resultCode", + "RACResponse", + "resultDescription" + ], "xml": { "name": "RACCheckResponse" } diff --git a/schemas/RepaymentRequest.json b/schemas/RepaymentRequest.json index 81759f8..c76c370 100644 --- a/schemas/RepaymentRequest.json +++ b/schemas/RepaymentRequest.json @@ -1,42 +1,52 @@ { "type": "object", + "required": [ + "$type", + "transactionId", + "customerId", + "debtId", + "productId", + "channel" + ], "properties": { "$type": { "type": "string", + "description": "Fixed value to identify request type", "example": "RepaymentRequest" }, - "msisdn": { - "type": "string", - "example": "3451342" - }, - "debtId": { - "type": "string", - "example": "273194670" - }, - "productId": { - "type": "string", - "example": "101" - }, "transactionId": { "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", "example": "20171209232115" }, "customerId": { "type": "string", + "description": "Unique identifier of a customer", "example": "CN621868" }, + "msisdn": { + "type": "string", + "description": "User's mobile number in an international format", + "example": "3451342" + }, + "debtId": { + "type": "string", + "description": "Debt identifier provided in 'Current Loans' response", + "example": "273194670" + }, + "productId": { + "type": "string", + "description": "Identifier of a product that user is repaying for", + "example": "101" + }, "channel": { "type": "string", + "description": "Request channel: USSD or APP", + "enum": ["USSD", "APP"], "example": "USSD" } }, - "required": [ - "$type", - "msisdn", - "debtId", - "productId", - "transactionId", - "customerId", - "channel" - ] + "xml": { + "name": "RepaymentRequest" + } } \ No newline at end of file diff --git a/schemas/RepaymentResponse.json b/schemas/RepaymentResponse.json index aebc0b9..9627945 100644 --- a/schemas/RepaymentResponse.json +++ b/schemas/RepaymentResponse.json @@ -1,32 +1,40 @@ { "type": "object", - "properties": { - "customerId": { - "type": "string", - "example": "CN621868" - }, - "productId": { - "type": "string", - "example": "101" - }, - "debtId": { - "type": "string", - "example": "273194670" - }, - "resultCode": { - "type": "string", - "example": "00" - }, - "resultDescription": { - "type": "string", - "example": "Successful" - } - }, "required": [ "customerId", "productId", "debtId", "resultCode", "resultDescription" - ] + ], + "properties": { + "customerId": { + "type": "string", + "description": "Unique identifier of a user", + "example": "CN621868" + }, + "productId": { + "type": "string", + "description": "Identifier of a product that user is payed for", + "example": "101" + }, + "debtId": { + "type": "string", + "description": "Unique identifier of an existing debt of a user", + "example": "273194670" + }, + "resultCode": { + "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", + "example": "00" + }, + "resultDescription": { + "type": "string", + "description": "Description of provided result code", + "example": "Successful" + } + }, + "xml": { + "name": "RepaymentResponse" + } } \ No newline at end of file diff --git a/schemas/RevokeEnableConsentRequest.json b/schemas/RevokeEnableConsentRequest.json index a148151..e55f5b1 100644 --- a/schemas/RevokeEnableConsentRequest.json +++ b/schemas/RevokeEnableConsentRequest.json @@ -3,36 +3,57 @@ "properties": { "transactionId": { "type": "string", + "description": "Unique identifier of transaction in Simbrella system", "example": "T0014" }, "fbnTransactionId": { "type": "string", + "description": "Unique id of the transaction received from FBN in CustomerConsentRequest", "example": "20171209232177" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "processTime": { "type": "string", "format": "date-time", + "description": "Date and time when consent request was processed", "example": "2019-10-18 14:26:21.063" }, "consentType": { "type": "string", + "description": "Type of consent: 'Enable' or 'Revoke'", + "enum": ["Enable", "Revoke"], "example": "Revoke" }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "comment": { "type": "string", + "description": "Any additional comment for consent operation", "example": "Testing RevokeEnableConsentRequest" } + }, + "required": [ + "transactionId", + "fbnTransactionId", + "customerId", + "accountId", + "processTime", + "consentType", + "countryId" + ], + "xml": { + "name": "RevokeEnableConsentRequest" } } \ No newline at end of file diff --git a/schemas/RevokeEnableConsentResponse.json b/schemas/RevokeEnableConsentResponse.json index 0d1bdba..afbd3b1 100644 --- a/schemas/RevokeEnableConsentResponse.json +++ b/schemas/RevokeEnableConsentResponse.json @@ -3,23 +3,38 @@ "properties": { "$type": { "type": "string", + "description": "Value is fixed to 'RevokeEnableConsentResponse'", "example": "RevokeEnableConsentResponse" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Success" } + }, + "required": [ + "$type", + "customerId", + "accountId", + "resultCode", + "resultDescription" + ], + "xml": { + "name": "RevokeEnableConsentResponse" } } \ No newline at end of file diff --git a/schemas/SMSRequest.json b/schemas/SMSRequest.json index d7ed3a8..c622138 100644 --- a/schemas/SMSRequest.json +++ b/schemas/SMSRequest.json @@ -3,14 +3,17 @@ "properties": { "text": { "type": "string", + "description": "Message to send to customer", "example": "This is a test message for SMS request method." }, "dest": { "type": "string", + "description": "Phone Number in international format", "example": "+2348039409144" }, "unicode": { "type": "boolean", + "description": "Character encoding standard (set as False for single SMS)", "example": false } }, @@ -18,5 +21,8 @@ "text", "dest", "unicode" - ] + ], + "xml": { + "name": "SMSRequest" + } } \ No newline at end of file diff --git a/schemas/SMSResponse.json b/schemas/SMSResponse.json index 76acf42..fe42e0a 100644 --- a/schemas/SMSResponse.json +++ b/schemas/SMSResponse.json @@ -3,22 +3,32 @@ "properties": { "data": { "type": "string", + "description": "Any additional data in response", "example": "" }, "statusCode": { "type": "integer", + "description": "Result code of executed process (200 = Success)", "example": 200 }, "IsSuccessful": { "type": "boolean", + "description": "An Indicator that the process was successful or not", "example": true }, "errorMessage": { - "type": [ - "string", - "null" - ], + "type": "string", + "description": "Description of status code if process is failed, null if successful", "example": null } + }, + "required": [ + "data", + "statusCode", + "IsSuccessful", + "errorMessage" + ], + "xml": { + "name": "SMSResponse" } } \ No newline at end of file diff --git a/schemas/SelectOfferRequest.json b/schemas/SelectOfferRequest.json index dd5530a..24e6dea 100644 --- a/schemas/SelectOfferRequest.json +++ b/schemas/SelectOfferRequest.json @@ -1,41 +1,60 @@ { "type": "object", + "required": [ + "requestId", + "transactionId", + "customerId", + "accountId", + "msisdn", + "requestedAmount", + "productid", + "channel" + ], "properties": { "requestId": { "type": "string", + "description": "Unique identifier of request", "example": "202111170001371256908" }, "transactionId": { "type": "string", + "description": "Unique ID of customer's USSD session. Must be consistent throughout whole USSD journey", "example": "1231231321232" }, "customerId": { "type": "string", - "example": "CN621868" + "description": "Unique identifier of a customer", + "example": "1256907" + }, + "accountId": { + "type": "string", + "description": "Specific identifier of a user's account", + "example": "5948306019" }, "msisdn": { "type": "string", + "description": "User's mobile number in an international format", "example": "123456789" }, "requestedAmount": { "type": "number", "format": "double", - "example": 10000.55 - }, - "accountId": { - "type": "string", - "example": "ACN8263457" + "description": "Amount of loan requested by user", + "example": 10000.0 }, "productid": { "type": "string", + "description": "Product ID", "example": "101" }, "channel": { "type": "string", + "description": "Channel of incoming request", + "enum": ["USSD", "MobApp", "Web"], "example": "USSD" } }, "xml": { - "name": "SelectOffersRequest" + "name": "SelectOfferRequest" } } \ No newline at end of file diff --git a/schemas/SelectOfferResponse.json b/schemas/SelectOfferResponse.json index 61f464a..2e55fdb 100644 --- a/schemas/SelectOfferResponse.json +++ b/schemas/SelectOfferResponse.json @@ -1,36 +1,152 @@ { "type": "object", + "required": [ + "requestId", + "transactionId", + "customerId", + "accountId", + "offers", + "resultCode", + "resultDescription" + ], "properties": { "requestId": { "type": "string", + "description": "Unique identifier of request", "example": "202111170001371256908" }, "transactionId": { "type": "string", + "description": "Unique ID of customer's USSD session", "example": "1231231321232" }, "customerId": { "type": "string", - "example": "CN621868" + "description": "Unique identifier of a customer", + "example": "1256907" }, "accountId": { "type": "string", - "example": "ACN8263457" + "description": "Specific identifier of a user's account", + "example": "5948306019" + }, + "outstandingDebtAmount": { + "type": "number", + "format": "double", + "description": "Outstanding debt amount if any", + "example": 0 }, "offers": { - "type": "string", - "example": "ARRAY of Offers" + "type": "array", + "description": "Array of loan offers", + "items": { + "type": "object", + "properties": { + "offerId": { + "type": "string", + "description": "Unique identifier of the offer", + "example": "14451" + }, + "productId": { + "type": "string", + "description": "Product identifier", + "example": "2030" + }, + "amount": { + "type": "number", + "format": "double", + "description": "Amount of loan customer is eligible for", + "example": 10000.0 + }, + "upfrontPayment": { + "type": "number", + "format": "double", + "description": "Amount to be deducted upfront", + "example": 1000.0 + }, + "interestRate": { + "type": "number", + "format": "double", + "description": "Percentage of interest rate", + "example": 3.0 + }, + "Interest": { + "type": "number", + "format": "double", + "description": "Amount of interest", + "example": 300.0 + }, + "ManagementRate": { + "type": "number", + "format": "double", + "description": "Percentage of management fee", + "example": 1.0 + }, + "ManagementFee": { + "type": "number", + "format": "double", + "description": "Amount of management fee", + "example": 100.0 + }, + "InsuranceRate": { + "type": "number", + "format": "double", + "description": "Percentage of insurance", + "example": 1.0 + }, + "InsuranceFee": { + "type": "number", + "format": "double", + "description": "Amount of insurance", + "example": 100.0 + }, + "VATRate": { + "type": "number", + "format": "double", + "description": "Percentage of VAT", + "example": 7.5 + }, + "VATamount": { + "type": "number", + "format": "double", + "description": "Amount of VAT", + "example": 100.0 + }, + "recommendedRepaymentDates": { + "type": "array", + "description": "Array of recommended payment dates for all installments in yyyy-mm-dd format", + "items": { + "type": "string", + "example": "2022-11-30" + } + }, + "installmentAmount": { + "type": "number", + "format": "double", + "description": "Amount to be paid each month (upfrontPayment not included)", + "example": 11000.0 + }, + "totalRepaymentAmount": { + "type": "number", + "format": "double", + "description": "Total amount to be paid by customer. All installment amounts + upfront payment", + "example": 11000.0 + } + } + } }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Successful" } }, "xml": { - "name": "SelectOffersResponse" + "name": "SelectOfferResponse" } } \ No newline at end of file diff --git a/schemas/TokenValidationRequest.json b/schemas/TokenValidationRequest.json index 65a3407..7c3a7b3 100644 --- a/schemas/TokenValidationRequest.json +++ b/schemas/TokenValidationRequest.json @@ -1,21 +1,34 @@ { "type": "object", "properties": { - "UserId": { - "type": "string", - "example": "TMP0840" - }, - "TokenCode": { - "type": "string", - "example": "32365214" - }, "RequestId": { "type": "string", + "description": "Unique Identifier in Simbrella system", "example": "SMB1234567" }, + "UserId": { + "type": "string", + "description": "Unique identifier of a user", + "example": "TMP0840" + }, "CountryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" + }, + "TokenCode": { + "type": "string", + "description": "Token code to be validated", + "example": "32365214" } + }, + "required": [ + "RequestId", + "UserId", + "CountryId", + "TokenCode" + ], + "xml": { + "name": "TokenValidationRequest" } } \ No newline at end of file diff --git a/schemas/TokenValidationResponse.json b/schemas/TokenValidationResponse.json index c3ff2c7..af1e9c8 100644 --- a/schemas/TokenValidationResponse.json +++ b/schemas/TokenValidationResponse.json @@ -3,23 +3,38 @@ "properties": { "Authenticated": { "type": "boolean", + "description": "Boolean value describing result of validation", "example": true }, "AuthenticatedMessage": { "type": "string", + "description": "Message describing authentication", "example": "The user Oluwole Olusoga has successfully authenticated!" }, "ResponseCode": { "type": "string", + "description": "Result code of response", "example": "00" }, "ResponseMessage": { "type": "string", + "description": "Response description", "example": "Successful" }, "RequestId": { "type": "string", + "description": "Unique id that was sent in request", "example": "SMB1234567" } + }, + "required": [ + "Authenticated", + "AuthenticatedMessage", + "ResponseCode", + "ResponseMessage", + "RequestId" + ], + "xml": { + "name": "TokenValidationResponse" } } \ No newline at end of file diff --git a/schemas/TransactionVerifyRequest.json b/schemas/TransactionVerifyRequest.json index beff068..b403cf2 100644 --- a/schemas/TransactionVerifyRequest.json +++ b/schemas/TransactionVerifyRequest.json @@ -3,31 +3,51 @@ "properties": { "counter": { "type": "string", + "description": "Unique counter for number of attempts of the API call. Original attempt is 1", "example": "2" }, "TransactionId": { "type": "string", + "description": "Id of the transaction we are checking", "example": "T002" }, "RequestId": { "type": "string", + "description": "Id of this transaction query", "example": "R02802" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, "countryId": { "type": "string", + "description": "Set to static value '01'", "example": "01" }, "transactionType": { "type": "string", + "description": "To check state of loan disbursal transaction, value must be 'Disbursement', to check state of loan collection transaction, value must be 'Collection', to check state of penalty charge transaction, value must be 'Penalty'", + "enum": ["Disbursement", "Collection", "Penalty"], "example": "Disbursement" } + }, + "required": [ + "counter", + "TransactionId", + "RequestId", + "customerId", + "accountId", + "countryId", + "transactionType" + ], + "xml": { + "name": "TransactionVerifyRequest" } } \ No newline at end of file diff --git a/schemas/TransactionVerifyResponse.json b/schemas/TransactionVerifyResponse.json index 8bff555..781430e 100644 --- a/schemas/TransactionVerifyResponse.json +++ b/schemas/TransactionVerifyResponse.json @@ -3,35 +3,64 @@ "properties": { "$type": { "type": "string", + "description": "Value is fixed to 'TransactionCheckResponse'", "example": "TransactionCheckResponse" }, "nativeId": { "type": "string", + "description": "Unique identifier of transaction in FIRSTBANK system", "example": "FBN20191031104405CN621868" }, "customerId": { "type": "string", + "description": "Unique identifier of a user", "example": "CN621868" }, "accountId": { "type": "string", + "description": "Specific identifier of a user's account", "example": "2017821799" }, + "transactionType": { + "type": "string", + "description": "Type of transaction: Disbursement, Collection, or Penalty", + "enum": ["Disbursement", "Collection", "Penalty"], + "example": "Collection" + }, "providedAmount": { "type": "number", + "format": "double", + "description": "Amount provided to a user within loan provision operation", "example": 0.0 }, "collectedAmount": { "type": "number", + "format": "double", + "description": "Amount collected from user's account within collection operation", "example": 7.50 }, "resultCode": { "type": "string", + "description": "Result code of executed transaction, e.g. (00 – Success etc.) see result codes table", "example": "00" }, "resultDescription": { "type": "string", + "description": "Description of provided result code", "example": "Collect Status retrieved successfully." } + }, + "required": [ + "$type", + "nativeId", + "customerId", + "accountId", + "providedAmount", + "collectedAmount", + "resultCode", + "resultDescription" + ], + "xml": { + "name": "TransactionVerifyResponse" } } \ No newline at end of file diff --git a/security/securitySchemes.json b/security/securitySchemes.json index 190e94d..bb8281d 100644 --- a/security/securitySchemes.json +++ b/security/securitySchemes.json @@ -15,5 +15,10 @@ "type": "apiKey", "name": "api_key", "in": "header" + }, + "basic_auth": { + "type": "http", + "scheme": "basic", + "description": "Basic authentication with username and password" } } \ No newline at end of file