{ "openapi": "3.0.3", "info": { "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)", "termsOfService": "http://swagger.io/terms/", "contact": { "email": "support@chiefsoft.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0.11" }, "servers": [ { "url": "https://devcore.digifi.chiefsoft.net/v1/api/salary" } ], "tags": [ { "name": "EligibilityCheck", "description": "Eligibility Check Request", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "SelectOffer", "description": "This method is used the send the offer the customer selected to Simbrella.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "ProvideLoan", "description": "Provide Loan Request.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "LoanInformation", "description": "Loan Information Request.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "Repayment", "description": "Repayment Request.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "CustomerConsent", "description": "CustomerConsent Request.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } }, { "name": "NotificationCallback", "description": "This new feature will be used for informing Simbrella about status of the transactions that FBN have processed.", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" } } ], "paths": { "/EligibilityCheck": { "post": { "tags": [ "EligibilityCheck" ], "summary": "Start the process - initiate steps to eligibility RAC Checks", "description": "Initiate Eligibility Check Request", "operationId": "startEligibilityCheck", "requestBody": { "description": "Post JSON to conduct eligibility tests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EligibilityCheckRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EligibilityCheckResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Resource not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/SelectOffer": { "post": { "tags": [ "SelectOffer" ], "summary": "This method is used to 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 with selected offer details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectOffersRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectOffersResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Offers not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/ProvideLoan": { "post": { "tags": [ "ProvideLoan" ], "summary": "Provide Loan Request", "description": "Provide Loan Request", "operationId": "provideLoan", "requestBody": { "description": "Post JSON to provide loan", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvideLoanRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvideLoanResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Resource not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/LoanInformation": { "post": { "tags": [ "LoanInformation" ], "summary": "Loan Information Request", "description": "Loan Information Request", "operationId": "getLoanInformation", "requestBody": { "description": "Post JSON to get loan information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoanInformationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoanInformationResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Loan not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/Repayment": { "post": { "tags": [ "Repayment" ], "summary": "Repayment Request", "description": "Repayment Request", "operationId": "repaymentRequest", "requestBody": { "description": "Post JSON to request repayment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RepaymentRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RepaymentResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Resource not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/CustomerConsent": { "post": { "tags": [ "CustomerConsent" ], "summary": "Customer Consent Request", "description": "Customer Consent Request", "operationId": "customerConsentRequest", "requestBody": { "description": "Post JSON for customer consent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerConsentRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerConsentResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Resource not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } }, "/NotificationCallback": { "post": { "tags": [ "NotificationCallback" ], "summary": "Notification Callback", "description": "This new feature will be used for informing Simbrella about status of the transactions that FBN have processed", "operationId": "notificationCallback", "requestBody": { "description": "Post JSON for notification callback", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationCallbackRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationCallbackResponse" } } } }, "400": { "description": "Invalid request parameters" }, "404": { "description": "Resource not found" }, "422": { "description": "Validation exception" } }, "security": [ { "basicAuth": [] } ] } } }, "components": { "schemas": { "EligibilityCheckRequest": { "type": "object", "required": [ "$type", "transactionId", "countryCode", "customerId", "accountId", "lienAmount", "channel" ], "properties": { "$type": { "type": "string", "example": "EligibilityCheckRequest", "description": "Value is fixed to 'EligibilityCheckRequest'" }, "transactionId": { "type": "string", "example": "Tr201712RK9232P115", "description": "Unique identifier of transaction in FIRSTBANK system" }, "countryCode": { "type": "string", "example": "NGR", "description": "Unique country code. Please refer to 'Country Codes' table" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "ACN8263457", "description": "Specific identifier of a user's account" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "lienAmount": { "type": "number", "format": "double", "example": 4.0, "description": "Amount of lien placed on user's account" }, "channel": { "type": "string", "example": "USSD", "description": "Request channel: 'USSD' or 'MobApp' or 'Web'" } } }, "EligibilityCheckResponse": { "type": "object", "required": [ "customerId", "transactionId", "eligibleOffers", "resultCode", "resultDescription" ], "properties": { "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "transactionId": { "type": "string", "example": "Tr201712RK9232P115", "description": "Unique identifier of transaction in FIRSTBANK system" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "eligibleOffers": { "type": "array", "items": { "type": "object", "properties": { "minamount": { "type": "number", "format": "double", "example": 5000 }, "maxamount": { "type": "number", "format": "double", "example": 20000 }, "productId": { "type": "integer", "example": 101 }, "offerid": { "type": "integer", "example": 101 }, "Tenor": { "type": "integer", "example": 30 } } } }, "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction, e.g. (00 – Success etc.)" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Textual description of provided result code" } } }, "SelectOffersRequest": { "type": "object", "required": [ "requestId", "transactionId", "customerId", "accountId", "msisdn", "requestedAmount", "productid", "channel" ], "properties": { "requestId": { "type": "string", "example": "202111170001371256908", "description": "Unique identifier of request" }, "transactionId": { "type": "string", "example": "1231231321232", "description": "Unique ID of customer's USSD session. Must be consistent throughout whole USSD journey" }, "customerId": { "type": "string", "example": "1256907", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "5948306019", "description": "Specific identifier of a user's account" }, "msisdn": { "type": "string", "example": "123456789", "description": "User's mobile number in an international format" }, "requestedAmount": { "type": "number", "format": "double", "example": 10000.0, "description": "Amount of loan requested by user" }, "productid": { "type": "string", "example": "101", "description": "Product ID" }, "channel": { "type": "string", "example": "USSD", "description": "Channel of incoming request: USSD" } } }, "SelectOffersResponse": { "type": "object", "required": [ "requestId", "transactionId", "customerId", "accountId", "offers", "resultCode", "resultDescription" ], "properties": { "outstandingDebtAmount": { "type": "number", "format": "double", "example": 0 }, "requestId": { "type": "string", "example": "202111170001371256908", "description": "Unique identifier of request" }, "transactionId": { "type": "string", "example": "1231231321232", "description": "Unique ID of customer's USSD session" }, "customerId": { "type": "string", "example": "1256907", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "5948306019", "description": "Specific identifier of a user's account" }, "offers": { "type": "array", "items": { "type": "object", "properties": { "offerId": { "type": "string", "example": "14451" }, "productId": { "type": "string", "example": "2030" }, "amount": { "type": "number", "format": "double", "example": 10000.0 }, "upfrontPayment": { "type": "number", "format": "double", "example": 1000.0 }, "interestRate": { "type": "number", "format": "double", "example": 3.0 }, "ManagementRate": { "type": "number", "format": "double", "example": 1.0 }, "ManagementFee": { "type": "number", "format": "double", "example": 1.0 }, "InsuranceRate": { "type": "number", "format": "double", "example": 1.0 }, "InsuranceFee": { "type": "number", "format": "double", "example": 100.0 }, "VATRate": { "type": "number", "format": "double", "example": 7.5 }, "VATamount": { "type": "number", "format": "double", "example": 100.0 }, "recommendedRepaymentDates": { "type": "array", "items": { "type": "string" }, "example": [ "2022-11-30"] }, "installmentAmount": { "type": "number", "format": "double", "example": 11000.0 }, "totalRepaymentAmount": { "type": "number", "format": "double", "example": 11000.0 } } } }, "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Description of provided result code" } } }, "ProvideLoanRequest": { "type": "object", "required": [ "$type", "transactionId", "customerId", "accountId", "productId", "requestedAmount", "collectionType", "loanType", "channel" ], "properties": { "$type": { "type": "string", "example": "ProvideLoanRequest", "description": "Value is fixed to 'ProvideLoanRequest'" }, "requestId": { "type": "string", "example": "202111170001371256908", "description": "Unique identifier of request" }, "transactionId": { "type": "string", "example": "Tr201712RK9232P115", "description": "Unique ID of customer’s USSD session. Must be consistent throughout whole USSD journey" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "ACN8263457", "description": "Specific identifier of a user's account" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "productId": { "type": "string", "example": "101", "description": "Identifier of a product chosen by user" }, "lienAmount": { "type": "number", "format": "double", "example": 400, "description": "Amount of lien" }, "requestedAmount": { "type": "number", "format": "double", "example": 900, "description": "Amount of loan that requested by user" }, "collectionType": { "type": "integer", "example": 1, "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" }, "loanType": { "type": "integer", "example": 0, "description": "Type of loan. 0 - simple; 1 - refinance" }, "channel": { "type": "string", "example": "USSD", "description": "Request channel: 'USSD' or 'MobileApp' or 'Web'" } } }, "ProvideLoanResponse": { "type": "object", "required": [ "requestId", "transactionId", "customerId", "accountId", "resultCode", "resultDescription" ], "properties": { "requestId": { "type": "string", "example": "202111170001371256908", "description": "Unique identifier of request" }, "transactionId": { "type": "string", "example": "Tr201712RK9232P115", "description": "Unique ID of customer’s USSD session. Must be consistent throughout whole USSD journey" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "ACN8263457", "description": "Specific identifier of a user's account" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Description of provided result code" } } }, "LoanInformationRequest": { "type": "object", "required": [ "$type", "transactionId", "customerId", "channel" ], "properties": { "$type": { "type": "string", "example": "LoanInformationRequest", "description": "Value is fixed to 'LoanInformationRequest'" }, "transactionId": { "type": "string", "example": "Tr201712RK9232P115", "description": "Unique identifier of transaction in FIRSTBANK system" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "channel": { "type": "string", "example": "USSD", "description": "Request channel: 'USSD' or 'MobileApp' or 'Web'" } } }, "LoanInformationResponse": { "type": "object", "required": [ "customerId", "loans", "resultCode", "resultDescription" ], "properties": { "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a user" }, "loans": { "type": "array", "items": { "type": "object", "properties": { "debtId": { "type": "string", "example": "123456789", "description": "Unique identifier of a debt of a user" }, "loanDate": { "type": "string", "format": "date-time", "example": "2019-10-18 14:26:21.063", "description": "Date and time of provided loan" }, "dueDate": { "type": "string", "format": "date-time", "example": "2019-11-20 14:26:21.063", "description": "Due date of provided loan" }, "currentLoanAmount": { "type": "number", "format": "double", "example": 8500.0, "description": "Outstanding debt amount of the user" }, "initialLoanAmount": { "type": "number", "format": "double", "example": 10000.0, "description": "Initial loan amount" }, "defaultFee": { "type": "number", "format": "double", "example": 0.0, "description": "Penalty fee amount" }, "continiousFee": { "type": "number", "format": "double", "example": 0.0, "description": "Interest fee charged continuously. First occurs when payment is delayed. Continuous fee is equal to Service Fee divided into 30 days. Service fee is equal to 5%, Continuous Interest is 5%/30 = 0,0016% daily." }, "productId": { "type": "string", "example": "101", "description": "Identifier of a provided product to a user" } } }, "description": "Array of loan entities. If customer doesn't have a loan, 'loans' array will be empty and length of this array will be zero." }, "totalDebtAmount": { "type": "number", "format": "double", "example": 8500.0, "description": "Sum amount of all existing debts of a user" }, "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Description of provided result code" } } }, "RepaymentRequest": { "type": "object", "required": [ "$type", "transactionId", "customerId", "debtId", "productId", "channel" ], "properties": { "$type": { "type": "string", "example": "RepaymentRequest", "description": "Value is fixed to 'RepaymentRequest'" }, "transactionId": { "type": "string", "example": "20171209232115", "description": "Unique identifier of transaction in FIRSTBANK system" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "msisdn": { "type": "string", "example": "3451342", "description": "User's mobile number in an international format" }, "debtId": { "type": "string", "example": "273194670", "description": "Debt identifier provided in 'Current Loans' response" }, "productId": { "type": "string", "example": "101", "description": "Identifier of a product that user is repaying for" }, "channel": { "type": "string", "example": "USSD", "description": "Request channel: 'USSD' or 'APP'" } } }, "RepaymentResponse": { "type": "object", "required": [ "customerId", "productId", "debtId", "resultCode", "resultDescription" ], "properties": { "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a user" }, "productId": { "type": "string", "example": "101", "description": "Identifier of a product that user is payed for" }, "debtId": { "type": "string", "example": "273194670", "description": "Unique identifier of an existing debt of a user" }, "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Description of provided result code" } } }, "CustomerConsentRequest": { "type": "object", "required": [ "$type", "transactionId", "customerId", "accountId", "requestTime", "consentType", "channel" ], "properties": { "$type": { "type": "string", "example": "CustomerConsentRequest", "description": "Value is fixed to 'CustomerConsentRequest'" }, "transactionId": { "type": "string", "example": "20171209232177", "description": "Unique identifier of transaction in FIRSTBANK system" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "ACN8263457", "description": "Specific identifier of a user's account" }, "requestTime": { "type": "string", "format": "date-time", "example": "2019-10-18 14:26:21.063", "description": "Date and time of consent request" }, "consentType": { "type": "string", "example": "Revoke", "description": "'Enable' or 'Revoke'" }, "channel": { "type": "string", "example": "USSD", "description": "Request channel: 'USSD' or 'APP'" } } }, "CustomerConsentResponse": { "type": "object", "required": [ "resultCode", "resultDescription" ], "properties": { "resultCode": { "type": "string", "example": "00", "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", "example": "Request is received", "description": "Description of provided result code" } } }, "NotificationCallbackRequest": { "type": "object", "required": [ "fbnTransactionId", "transactionId", "customerId", "accountId", "debtId", "transactionType", "amountProvided", "amountCollected", "responseCode", "responseDescription" ], "properties": { "fbnTransactionId": { "type": "string", "example": "123456789", "description": "Unique id of the transaction received from FBN in Eligibility or Provision requests" }, "transactionId": { "type": "string", "example": "123456789", "description": "Unique identifier of transaction in FIRSTBANK system" }, "customerId": { "type": "string", "example": "CN621868", "description": "Unique identifier of a customer" }, "accountId": { "type": "string", "example": "ACN8263457", "description": "Specific identifier of a user's account" }, "debtId": { "type": "string", "example": "987654321", "description": "Unique identifier of providing loan in Simbrella system" }, "transactionType": { "type": "string", "example": "Disbursement", "description": "Type of transaction initiated by Simbrella: 'Disbursement', 'Collection', or 'PenalCharge'" }, "amountProvided": { "type": "number", "format": "double", "example": 1000.00, "description": "Amount provided to customer within Disbursement operation. Will equal to 0 when transaction type is Collection or PenalCharge." }, "amountCollected": { "type": "number", "format": "double", "example": 0.00, "description": "Amount collected during execution of operation. Will equal to 0 when transaction type is Disbursement." }, "responseCode": { "type": "string", "example": "00", "description": "Result code of the notification" }, "responseDescription": { "type": "string", "example": "Successful", "description": "Result description of the notification, detailing status of the transaction" } } }, "NotificationCallbackResponse": { "type": "object", "required": [ "resultCode", "resultDescription" ], "properties": { "resultCode": { "type": "string", "example": "00", "description": "Result code of successful request" }, "resultDescription": { "type": "string", "example": "Successful", "description": "Description of provided result code" } } } }, "securitySchemes": { "basicAuth": { "type": "http", "scheme": "basic", "description": "Basic Authentication method is implemented. Each request should contain Authorization header with Base64 encoded username:password" } } } }