532 lines
15 KiB
YAML
532 lines
15 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Sample Flask API
|
|
description: A simple Flask API with Swagger documentation running in Docker
|
|
version: 1.0.0
|
|
contact:
|
|
name: API Support
|
|
email: support@example.com
|
|
license:
|
|
name: MIT
|
|
url: https://opensource.org/licenses/MIT
|
|
|
|
servers:
|
|
- url: http://localhost:5000
|
|
description: Local development server
|
|
|
|
paths:
|
|
/health:
|
|
get:
|
|
summary: Returns a health message
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/status-call:
|
|
post:
|
|
summary: Perform a status call
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "R02802"
|
|
countryCode:
|
|
type: string
|
|
example: "NGR"
|
|
transactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
debtId:
|
|
type: string
|
|
example: "173021"
|
|
transactionType:
|
|
type: string
|
|
example: "Disbursement"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/sms:
|
|
post:
|
|
summary: Send a SMS
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
text:
|
|
type: string
|
|
example: "This is a test message for SMS request method."
|
|
dest:
|
|
type: string
|
|
example: "+2348039409144"
|
|
unicode:
|
|
type: boolean
|
|
example: false
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/bulk-sms:
|
|
post:
|
|
summary: Send a bulk SMS
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
text:
|
|
type: string
|
|
example: "This is a test message for SMS request method."
|
|
dest:
|
|
type: string
|
|
example: "+2348039409144"
|
|
unicode:
|
|
type: boolean
|
|
example: true
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/eligibility/check:
|
|
post:
|
|
summary: Performs eligibility check on a user
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
description: The transaction ID
|
|
example: Tr201712RK9232P115
|
|
customerId:
|
|
type: string
|
|
description: The customer ID
|
|
example: CN621868
|
|
countryCode:
|
|
type: string
|
|
description: The country code
|
|
example: NGR
|
|
accountId:
|
|
type: string
|
|
description: The account ID
|
|
example: ACN8263457
|
|
msisdn:
|
|
type: string
|
|
description: The MSISDN
|
|
example: 8012345678
|
|
channel:
|
|
type: string
|
|
description: The channel
|
|
example: 100
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/select-offer:
|
|
post:
|
|
summary: Selects an offer for a loan
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "202111170001371256908"
|
|
transactionId:
|
|
type: string
|
|
example: "1231231321232"
|
|
customerId:
|
|
type: string
|
|
example: "1256907"
|
|
accountId:
|
|
type: string
|
|
example: "5948306019"
|
|
msisdn:
|
|
type: string
|
|
example: "123456789"
|
|
requestedAmount:
|
|
type: integer
|
|
example: 10000
|
|
productId:
|
|
type: string
|
|
example: "101"
|
|
channel:
|
|
type: string
|
|
example: "USSD"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/provide-loan:
|
|
post:
|
|
summary: Provides a loan
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "202111170001371256908"
|
|
transactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
accountId:
|
|
type: string
|
|
example: "ACN8263457"
|
|
msisdn:
|
|
type: string
|
|
example: "3451342"
|
|
productId:
|
|
type: string
|
|
example: "101"
|
|
requestedAmount:
|
|
type: integer
|
|
example: 900
|
|
collectionType:
|
|
type: integer
|
|
example: 1
|
|
offerId:
|
|
type: integer
|
|
example: 1127
|
|
channel:
|
|
type: string
|
|
example: "100"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/status:
|
|
post:
|
|
summary: Returns the status of a loan
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
msisdn:
|
|
type: string
|
|
example: "3451342"
|
|
channel:
|
|
type: string
|
|
example: "100"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/repayment:
|
|
post:
|
|
summary: Repays a loan
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "R02802"
|
|
countryCode:
|
|
type: string
|
|
example: "NGR"
|
|
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"
|
|
collectedAmount:
|
|
type: integer
|
|
example: 80000
|
|
penalCharge:
|
|
type: integer
|
|
example: 0
|
|
collectionMethod:
|
|
type: integer
|
|
example: 1
|
|
lienAmount:
|
|
type: integer
|
|
example: 80000
|
|
comment:
|
|
type: string
|
|
example: "Testing CollectionLoanRequest"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/raccheck:
|
|
post:
|
|
summary: Performs RAC check on a user
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
example: "T001"
|
|
fbnTransactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
accountId:
|
|
type: string
|
|
example: "2017821799"
|
|
RAC_Array:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- "SalaryAccount"
|
|
- "BVN"
|
|
- "BVNAttachedtoAccount"
|
|
- "CRC"
|
|
- "CRMS"
|
|
- "AccountStatus"
|
|
- "Lien"
|
|
- "NoBouncedCheck"
|
|
- "Whitelist"
|
|
- "NoPastDueSalaryLoan"
|
|
- "NoPastDueOtherLoan"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/refresh-disbursement:
|
|
get:
|
|
summary: Refresh disburse of a loan
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "R02802"
|
|
countryCode:
|
|
type: string
|
|
example: "NGR"
|
|
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: integer
|
|
example: 100000
|
|
totalFees:
|
|
type: integer
|
|
example: 7075
|
|
feesDetails:
|
|
type: object
|
|
properties:
|
|
collectAmountInterest:
|
|
type: integer
|
|
example: 5000
|
|
collectAmountMgtFee:
|
|
type: integer
|
|
example: 1000
|
|
collectAmountInsurance:
|
|
type: integer
|
|
example: 1000
|
|
collectAmountVAT:
|
|
type: integer
|
|
example: 75
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/collect-loan:
|
|
post:
|
|
summary: Collect loan from a customer
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
example: "T002"
|
|
fbnTransactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
debtId:
|
|
type: string
|
|
example: "273194670"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
accountId:
|
|
type: string
|
|
example: "2017821799"
|
|
productId:
|
|
type: string
|
|
example: "101"
|
|
collectAmount:
|
|
type: integer
|
|
example: 80000
|
|
penalCharge:
|
|
type: integer
|
|
example: 0
|
|
collectionMethod:
|
|
type: integer
|
|
example: 1
|
|
lienAmount:
|
|
type: integer
|
|
example: 80000
|
|
countryId:
|
|
type: string
|
|
example: "01"
|
|
comment:
|
|
type: string
|
|
example: "Testing CollectionLoanRequest"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/verify-transactions:
|
|
get:
|
|
summary: Verify a transaction
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
requestId:
|
|
type: string
|
|
example: "R02802"
|
|
countryCode:
|
|
type: string
|
|
example: "NGR"
|
|
counter:
|
|
type: string
|
|
example: "2"
|
|
transactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
accountId:
|
|
type: string
|
|
example: "2017821799"
|
|
transactionType:
|
|
type: string
|
|
example: "Disbursement"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/penal-charge:
|
|
post:
|
|
summary: A penalty charge on a customer
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
example: "T004"
|
|
fbnTransactionId:
|
|
type: string
|
|
example: "Tr201712RK9232P115"
|
|
debtId:
|
|
type: string
|
|
example: "273194670"
|
|
customerId:
|
|
type: string
|
|
example: "CN621868"
|
|
accountId:
|
|
type: string
|
|
example: "2017821799"
|
|
penalCharge:
|
|
type: number
|
|
format: float
|
|
example: 101.2
|
|
lienAmount:
|
|
type: number
|
|
format: float
|
|
example: 101.2
|
|
comment:
|
|
type: string
|
|
example: "Testing PenalChargeRequest"
|
|
responses:
|
|
200:
|
|
description: A successful response
|
|
/loans/lien-check:
|
|
post:
|
|
summary: Perform a lien check
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
transactionId:
|
|
type: string
|
|
example: "SMB1234567"
|
|
customerId:
|
|
type: string
|
|
example: "123456"
|
|
accountId:
|
|
type: string
|
|
example: "E9F77222920BAAB1C5ACF2253C6D6113"
|
|
responses:
|
|
200:
|
|
description: A successful response
|