diff --git a/digifi_swagger.json b/digifi_swagger.json index eba381e..ab26a4b 100644 --- a/digifi_swagger.json +++ b/digifi_swagger.json @@ -82,7 +82,7 @@ "tags": [ "EligibilityCheck" ], - "summary": "Start the process - initiate steps to eligibility RAC Checks ", + "summary": "Start the process - initiate steps to eligibility RAC Checks", "description": "Initiate Eligibility Check Request", "operationId": "startEligibilityCheck", "requestBody": { @@ -127,30 +127,19 @@ }, "/SelectOffer": { "post": { - "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": "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 to conduct eligibility tests", + "description": "Post JSON with selected offer details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectOffersRequest" } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/SelectOffersRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/SelectOffersRequest" - } } }, "required": true @@ -163,16 +152,11 @@ "schema": { "$ref": "#/components/schemas/SelectOffersResponse" } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/SelectOffersResponse" - } } } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request parameters" }, "404": { "description": "Offers not found" @@ -183,9 +167,7 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" + "basicAuth": [ ] } ] @@ -516,79 +498,186 @@ }, "SelectOffersRequest": { "type": "object", + "required": [ + "requestId", + "transactionId", + "customerId", + "accountId", + "msisdn", + "requestedAmount", + "productid", + "channel" + ], "properties": { "requestId": { "type": "string", - "example": "202111170001371256908" + "example": "202111170001371256908", + "description": "Unique identifier of request" }, "transactionId": { "type": "string", - "example": "1231231321232" + "example": "1231231321232", + "description": "Unique ID of customer's USSD session. Must be consistent throughout whole USSD journey" }, "customerId": { "type": "string", - "example": "CN621868" + "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" + "example": "123456789", + "description": "User's mobile number in an international format" }, "requestedAmount": { "type": "number", "format": "double", - "example": 10000.55 - }, - "accountId": { - "type": "string", - "example": "ACN8263457" + "example": 10000.0, + "description": "Amount of loan requested by user" }, "productid": { "type": "string", - "example": "101" + "example": "101", + "description": "Product ID" }, "channel": { "type": "string", - "example": "USSD" + "example": "USSD", + "description": "Channel of incoming request: USSD" } - }, - "xml": { - "name": "SelectOffersRequest" } }, "SelectOffersResponse": { "type": "object", + "required": [ + "requestId", + "transactionId", + "customerId", + "accountId", + "offers", + "resultCode", + "resultDescription" + ], "properties": { + "outstandingDebtAmount": { + "type": "number", + "format": "double", + "example": 0 + }, "requestId": { "type": "string", - "example": "202111170001371256908" + "example": "202111170001371256908", + "description": "Unique identifier of request" }, "transactionId": { "type": "string", - "example": "1231231321232" + "example": "1231231321232", + "description": "Unique ID of customer's USSD session" }, "customerId": { "type": "string", - "example": "CN621868" + "example": "1256907", + "description": "Unique identifier of a customer" }, "accountId": { "type": "string", - "example": "ACN8263457" + "example": "5948306019", + "description": "Specific identifier of a user's account" }, "offers": { - "type": "string", - "example": "ARRAY of 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" + "example": "00", + "description": "Result code of executed transaction" }, "resultDescription": { "type": "string", - "example": "Successful" + "example": "Successful", + "description": "Description of provided result code" } - }, - "xml": { - "name": "SelectOffersResponse" } }, "LoanInformationRequest": {