diff --git a/digifi_swagger.json b/digifi_swagger.json index 0dafa27..a148ec9 100644 --- a/digifi_swagger.json +++ b/digifi_swagger.json @@ -84,7 +84,7 @@ } }, { - "name": "LoanDisbursement", + "name": "Disbursement", "description": "Loan Disbursement Request", "externalDocs": { "description": "Find out more", @@ -92,7 +92,7 @@ } }, { - "name": "Collect Loan", + "name": "CollectLoan", "description": "Collect Loan Request", "externalDocs": { "description": "Find out more", @@ -100,8 +100,8 @@ } }, { - "name": "TransactionCheck", - "description": "Transaction Check Request", + "name": "TransactionVerify", + "description": "Transaction Verify Request", "externalDocs": { "description": "Find out more", "url": "https://www.simbrellang.net" @@ -425,6 +425,112 @@ ] } }, + "/Repayment": { + "post": { + "tags": [ + "Repayment" + ], + "summary": "Repayment Request", + "description": "Repayment Request", + "operationId": "Repayment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepaymentRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/RepaymentRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/RepaymentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Repayment Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepaymentResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/RepaymentResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/CustomerConsent": { + "post": { + "tags": [ + "CustomerConsent" + ], + "summary": "Customer Consent Request", + "description": "Customer Consent Request", + "operationId": "CustomerConsent", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerConsentRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CustomerConsentRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/CustomerConsentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerConsentResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CustomerConsentResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, "/NotificationCallback": { "post": { "tags": [ @@ -542,8 +648,537 @@ } } } + }, + "/Disbursement": { + "post": { + "tags": [ + "Disbursement" + ], + "summary": "Disbursement Request", + "description": "Disbursement Request", + "operationId": "Disbursement", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisbursementRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DisbursementRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DisbursementRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Disbursement Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisbursementResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DisbursementResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/CollectLoan": { + "post": { + "tags": [ + "CollectLoan" + ], + "summary": "Collect Loan Request", + "description": "Collect Loan Request", + "operationId": "CollectLoan", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectLoanRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CollectLoanRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/CollectLoanRequest" + } + } + } + }, + "responses": { + "200": { + "description": "CollectLoan Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectLoanResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/CollectLoanResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/TransactionVerify": { + "post": { + "tags": [ + "TransactionVerify" + ], + "summary": "Transaction Verify Request", + "description": "Transaction Verify Request", + "operationId": "TransactionVerify", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionVerifyRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/TransactionVerifyRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/TransactionVerifyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "TransactionVerify Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionVerifyResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/TransactionVerifyResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/PenalCharge": { + "post": { + "tags": [ + "PenalCharge" + ], + "summary": "Penal Charge Request", + "description": "Penal Charge Request", + "operationId": "PenalCharge", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PenalChargeRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/PenalChargeRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PenalChargeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "PenalCharge Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PenalChargeResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/PenalChargeResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/RevokeEnableConsent": { + "post": { + "tags": [ + "RevokeEnableConsent" + ], + "summary": "Revoke Enable Consent Request", + "description": "Revoke Enable Consent Request", + "operationId": "RevokeEnableConsent", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeEnableConsentRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/RevokeEnableConsentRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/RevokeEnableConsentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "RevokeEnableConsent Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeEnableConsentResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/RevokeEnableConsentResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/TokenValidation": { + "post": { + "tags": [ + "TokenValidation" + ], + "summary": "Token Validation Request", + "description": "Token Validation Request", + "operationId": "TokenValidation", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenValidationRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/TokenValidationRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/TokenValidationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "TokenValidation Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenValidationResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/TokenValidationResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/LienCheck": { + "post": { + "tags": [ + "LienCheck" + ], + "summary": "Lien Check Request", + "description": "Lien Check Request", + "operationId": "LienCheck", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LienCheckRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/LienCheckRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/LienCheckRequest" + } + } + } + }, + "responses": { + "200": { + "description": "LienCheck Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LienCheckResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/LienCheckResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/NewTransactionCheck": { + "post": { + "tags": [ + "NewTransactionCheck" + ], + "summary": "New Transaction Check Request", + "description": "New Transaction Check Request", + "operationId": "NewTransactionCheck", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTransactionCheckRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/NewTransactionCheckRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/NewTransactionCheckRequest" + } + } + } + }, + "responses": { + "200": { + "description": "NewTransactionCheck Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTransactionCheckResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/NewTransactionCheckResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/SMS": { + "post": { + "tags": [ + "SMS" + ], + "summary": "SMS Request", + "description": "SMS Request", + "operationId": "SMS", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SMSRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/SMSRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/SMSRequest" + } + } + } + }, + "responses": { + "200": { + "description": "SMS Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SMSResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/SMSResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/BulkSMS": { + "post": { + "tags": [ + "BulkSMS" + ], + "summary": "BulkSMS Request", + "description": "BulkSMS Request", + "operationId": "BulkSMS", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSMSRequest" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/BulkSMSRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/BulkSMSRequest" + } + } + } + }, + "responses": { + "200": { + "description": "BulkSMS Successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSMSResponse" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/BulkSMSResponse" + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "500": { + "description": "Internal server error" + } + } + } } - }, "components": { "schemas": { @@ -749,6 +1384,80 @@ "name": "LoanInformationResponse" } }, + "RepaymentRequest": { + "type": "object", + "properties": { + "$type": { + "type": "string", + "example": "RepaymentRequest" + }, + "msisdn": { + "type": "string", + "example": "3451342" + }, + "debtId": { + "type": "string", + "example": "273194670" + }, + "productId": { + "type": "string", + "example": "101" + }, + "transactionId": { + "type": "string", + "example": "20171209232115" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "channel": { + "type": "string", + "example": "USSD" + } + }, + "required": [ + "$type", + "msisdn", + "debtId", + "productId", + "transactionId", + "customerId", + "channel" + ] + }, + "RepaymentResponse": { + "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" + ] + }, "RACCheckRequest": { "type": "object", "properties": { @@ -842,6 +1551,462 @@ "name": "RACCheckResponse" } }, + "CustomerConsentRequest": { + "type": "object", + "properties": { + "$type": { + "type": "string", + "example": "CustomerConsentRequest" + }, + "transactionId": { + "type": "string", + "example": "20171209232177" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "example": "ACN8263457" + }, + "requestTime": { + "type": "string", + "format": "date-time", + "example": "2019-10-18 14:26:21.063" + }, + "consentType": { + "type": "string", + "example": "Revoke" + }, + "channel": { + "type": "string", + "example": "USSD" + } + }, + "required": [ + "$type", + "transactionId", + "customerId", + "accountId", + "requestTime", + "consentType", + "channel" + ] + }, + "CustomerConsentResponse": { + "type": "object", + "properties": { + "resultCode": { + "type": "string", + "example": "00" + }, + "resultDescription": { + "type": "string", + "example": "Request is received" + } + }, + "required": [ + "resultCode", + "resultDescription" + ] + }, + "DisbursementRequest": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "example": "T001" + }, + "TransactionId": { + "type": "string", + "example": "Tr201712RK9232P115" + }, + "debtId": { + "type": "string", + "example": "273194670" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "example": "2017821799" + }, + "productId": { + "type": "string", + "example": "101" + }, + "provideAmount": { + "type": "number", + "format": "double", + "example": 100000.0 + }, + "collectAmountInterest": { + "type": "number", + "format": "double", + "example": 5000.0 + }, + "collectAmountMgtFee": { + "type": "number", + "format": "double", + "example": 1000.0 + }, + "collectAmountInsurance": { + "type": "number", + "format": "double", + "example": 1000.0 + }, + "collectAmountVAT": { + "type": "number", + "format": "double", + "example": 75.0 + }, + "countryId": { + "type": "string", + "example": "01" + }, + "comment": { + "type": "string", + "example": "Testing LoanRequest" + } + }, + "required": [ + "transactionId", + "TransactionId", + "debtId", + "customerId", + "accountId", + "productId", + "provideAmount", + "collectAmountInterest", + "collectAmountMgtFee", + "collectAmountInsurance", + "collectAmountVAT", + "countryId", + "comment" + ] + }, + "DisbursementResponse": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "example": "T001" + }, + "TransactionId": { + "type": "string", + "example": "Tr201712RK9232P115" + }, + "debtId": { + "type": "string", + "example": "273194670" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "example": "2017821799" + }, + "productId": { + "type": "string", + "example": "101" + }, + "provideAmount": { + "type": "number", + "format": "double", + "example": 100000.0 + }, + "collectAmountInterest": { + "type": "number", + "format": "double", + "example": 5000.0 + }, + "collectAmountMgtFee": { + "type": "number", + "format": "double", + "example": 1000.0 + }, + "collectAmountInsurance": { + "type": "number", + "format": "double", + "example": 1000.0 + }, + "collectAmountVAT": { + "type": "number", + "format": "double", + "example": 75.0 + }, + "countryId": { + "type": "string", + "example": "01" + }, + "resultCode": { + "type": "string", + "example": "00" + }, + "resultDescription": { + "type": "string", + "example": "Loan Request Completed Successfully!" + } + }, + "required": [ + "transactionId", + "TransactionId", + "debtId", + "customerId", + "accountId", + "productId", + "provideAmount", + "collectAmountInterest", + "collectAmountMgtFee", + "collectAmountInsurance", + "collectAmountVAT", + "countryId", + "resultCode", + "resultDescription" + ] + }, + "CollectLoanRequest": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "example": "T002" + }, + "debtId": { + "type": "string", + "example": "273194670" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "example": "2017821799" + }, + "productId": { + "type": "string", + "example": "101" + }, + "collectAmount": { + "type": "number", + "format": "double", + "example": 80000.0 + }, + "penalCharge": { + "type": "number", + "format": "double", + "example": 0.0 + }, + "collectionMethod": { + "type": "integer", + "example": 1 + }, + "lienAmount": { + "type": "number", + "format": "double", + "example": 80000.0 + }, + "countryId": { + "type": "string", + "example": "01" + }, + "comment": { + "type": "string", + "example": "Testing CollectionLoanRequest" + } + }, + "required": [ + "transactionId", + "debtId", + "customerId", + "accountId", + "productId", + "collectAmount", + "penalCharge", + "collectionMethod", + "lienAmount", + "countryId", + "comment" + ] + }, + "CollectLoanResponse": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "example": "T002" + }, + "debtId": { + "type": "string", + "example": "273194670" + }, + "customerId": { + "type": "string", + "example": "CN621868" + }, + "accountId": { + "type": "string", + "example": "2017821799" + }, + "productId": { + "type": "string", + "example": "101" + }, + "collectAmount": { + "type": "number", + "format": "double", + "example": 60000.0 + }, + "penalCharge": { + "type": "number", + "format": "double", + "example": 0.0 + }, + "lienAmount": { + "type": "number", + "format": "double", + "example": 20000.0 + }, + "countryId": { + "type": "string", + "example": "01" + }, + "comment": { + "type": "string", + "example": "Testing CollectionLoanRequest" + }, + "resultCode": { + "type": "string", + "example": "00" + }, + "resultDescription": { + "type": "string", + "example": "Loan Collection Successful" + } + }, + "required": [ + "transactionId", + "debtId", + "customerId", + "accountId", + "productId", + "collectAmount", + "penalCharge", + "lienAmount", + "countryId", + "comment", + "resultCode", + "resultDescription" + ] + }, + "TransactionVerifyRequest": { + "type": "object", + "properties": { + "counter": { + "type": "string" + }, + "TransactionId": { + "type": "string" + }, + "RequestId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "countryId": { + "type": "string" + }, + "transactionType": { + "type": "string" + } + }, + "required": ["counter", "TransactionId", "RequestId", "customerId", "accountId", "countryId", "transactionType"] + }, + "TransactionVerifyResponse": { + "type": "object", + "properties": { + "$type": { + "type": "string" + }, + "nativeId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "providedAmount": { + "type": "number" + }, + "collectedAmount": { + "type": "number" + }, + "resultCode": { + "type": "string" + }, + "resultDescription": { + "type": "string" + } + }, + "required": ["$type", "nativeId", "customerId", "accountId", "providedAmount", "collectedAmount", "resultCode", "resultDescription"] + }, + "PenalChargeRequest": { + "type": "object", + "properties": { + "transactionId": { + "type": "string" + }, + "fbnTransactionId": { + "type": "string" + }, + "debtId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "penalCharge": { + "type": "number" + }, + "lienAmount": { + "type": "number" + }, + "countryId": { + "type": "string" + }, + "comment": { + "type": "string" + } + }, + "required": ["transactionId", "fbnTransactionId", "debtId", "customerId", "accountId", "penalCharge", "lienAmount", "countryId", "comment"] + }, + "PenalChargeResponse": { + "type": "object", + "properties": { + "resultCode": { + "type": "string" + }, + "resultDescription": { + "type": "string" + } + }, + "required": ["resultCode", "resultDescription"] + }, "ApiResponse": { "type": "object", "properties": {