Files
digifi-swagger/digifi_swagger.json
T

874 lines
25 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"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": {
"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": "#/components/schemas/LoanInformationRequest"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoanInformationResponse"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationResponse"
}
}
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Loan not found"
},
"422": {
"description": "Validation exception"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
"/NotificationCallback": {
"post": {
"tags": [
"NotificationCallback"
],
"summary": "Loan Information Request ",
"description": "Loan Information Request",
"operationId": "startEligibilityCheck",
"requestBody": {
"description": "Post JSON to conduct eligibility tests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoanInformationResponse"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationResponse"
}
}
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Loan not found"
},
"422": {
"description": "Validation exception"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
}
},
"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 customers 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 customers 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",
"properties": {
"transactionId": {
"type": "string",
"example": "Tr201712RK9232P115"
},
"resultDescription": {
"type": "string",
"example": "Successful"
},
"customerId": {
"type": "string",
"example": "CN621868"
},
"msisdn": {
"type": "string",
"example": "3451342"
},
"channel": {
"type": "string",
"example": "USSD"
}
},
"xml": {
"name": "LoanInformationRequest"
}
},
"LoanInformationResponse": {
"type": "object",
"properties": {
"transactionId": {
"type": "string",
"example": "Tr201712RK9232P115"
},
"resultDescription":{
"type": "string",
"example": "Successful"
},
"resultCode": {
"type": "string",
"example": "00"
},
"customerId": {
"type": "string",
"example": "CN621868"
},
"loan": {
"type": "string",
"example": "Arrray of loans"
}
},
"xml": {
"name": "LoanInformationResponse"
}
},
"ApiResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
},
"message": {
"type": "string"
}
},
"xml": {
"name": "##default"
}
}
},
"securitySchemes": {
"basicAuth": {
"type": "http",
"scheme": "basic",
"description": "Basic Authentication method is implemented. Each request should contain Authorization header with Base64 encoded username:password"
}
}
}
}