diff --git a/digifi_swagger.json b/digifi_swagger.json index b14a348..18a8f53 100644 --- a/digifi_swagger.json +++ b/digifi_swagger.json @@ -265,6 +265,53 @@ ] } }, + "/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": [] + } + ] + } + }, "/NotificationCallback": { "post": { @@ -765,8 +812,7 @@ "description": "Description of provided result code" } } - }, - + }, "LoanInformationRequest": { "type": "object", "required": [ @@ -890,22 +936,89 @@ } } }, - "ApiResponse": { + "RepaymentRequest": { "type": "object", + "required": [ + "$type", + "transactionId", + "customerId", + "debtId", + "productId", + "channel" + ], "properties": { - "code": { - "type": "integer", - "format": "int32" + "$type": { + "type": "string", + "example": "RepaymentRequest", + "description": "Value is fixed to 'RepaymentRequest'" }, - "type": { - "type": "string" + "transactionId": { + "type": "string", + "example": "20171209232115", + "description": "Unique identifier of transaction in FIRSTBANK system" }, - "message": { - "type": "string" + "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" } - }, - "xml": { - "name": "##default" } } },