update
This commit is contained in:
+500
-60
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"name": "Authorize",
|
"name": "Authorize",
|
||||||
"description": "This feature will be used for authorizing customers.",
|
"description": "This feature will be used for authorizing customers.",
|
||||||
"externalDocs": {
|
"externalDocs": {
|
||||||
@@ -74,83 +74,523 @@
|
|||||||
"description": "Find out more",
|
"description": "Find out more",
|
||||||
"url": "https://www.simbrellang.net"
|
"url": "https://www.simbrellang.net"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Loans",
|
||||||
|
"description": "Get all loans with optional filtering.",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "https://www.simbrellang.net"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Transactions",
|
||||||
|
"description": "Get all transactions with optional filtering.",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "https://www.simbrellang.net"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"/Authorize": {
|
"/Authorize": {
|
||||||
"$ref": "swagger/paths/Authorize.json"
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Authorize"
|
||||||
|
],
|
||||||
|
"summary": "Authorize a user",
|
||||||
|
"description": "Authorize a user with credentials",
|
||||||
|
"operationId": "authorize",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "User credentials",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AuthorizeRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AuthorizeResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"/AuthorizeRefresh": {
|
"/AuthorizeRefresh": {
|
||||||
"$ref": "swagger/paths/AuthorizeRefresh.json"
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"AuthorizeRefresh"
|
||||||
|
],
|
||||||
|
"summary": "Refresh authorization token",
|
||||||
|
"description": "Refresh an expired authorization token",
|
||||||
|
"operationId": "authorizeRefresh",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "Refresh token",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AuthorizeRefreshRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AuthorizeRefreshResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"/EligibilityCheck": {
|
"/loans": {
|
||||||
"$ref": "swagger/paths/EligibilityCheck.json"
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Loans"
|
||||||
|
],
|
||||||
|
"summary": "Get all loans with optional filtering",
|
||||||
|
"description": "Retrieve loans with various filter options including customer ID, account ID, status, etc.",
|
||||||
|
"operationId": "getLoans",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "customer_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by customer ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "CUST123"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by account ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by loan status",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "active"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "offer_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by offer ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "OFFER789"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "product_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by product ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "PROD101"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by start date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "end_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by end date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "due_before",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter loans due before this date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "due_after",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter loans due after this date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LoansResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"/SelectOffer": {
|
"/transactions": {
|
||||||
"$ref": "swagger/paths/SelectOffer.json"
|
"get": {
|
||||||
},
|
"tags": [
|
||||||
"/ProvideLoan": {
|
"Transactions"
|
||||||
"$ref": "swagger/paths/ProvideLoan.json"
|
],
|
||||||
},
|
"summary": "Get all transactions with optional filtering",
|
||||||
"/LoanStatus": {
|
"description": "Retrieve transactions with various filter options including account ID, type, channel, etc.",
|
||||||
"$ref": "swagger/paths/LoanStatus.json"
|
"operationId": "getTransactions",
|
||||||
},
|
"parameters": [
|
||||||
"/Repayment": {
|
{
|
||||||
"$ref": "swagger/paths/Repayment.json"
|
"name": "account_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by account ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by transaction type",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "PAYMENT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "channel",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by channel",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "MOBILE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by start date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "end_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by end date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/TransactionsResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"EligibilityCheckRequest": {
|
|
||||||
"$ref": "swagger/schemas/EligibilityCheckRequest.json"
|
|
||||||
},
|
|
||||||
"EligibilityCheckResponse": {
|
|
||||||
"$ref": "swagger/schemas/EligibilityCheckResponse.json"
|
|
||||||
},
|
|
||||||
"SelectOfferRequest": {
|
|
||||||
"$ref": "swagger/schemas/SelectOfferRequest.json"
|
|
||||||
},
|
|
||||||
"SelectOfferResponse": {
|
|
||||||
"$ref": "swagger/schemas/SelectOfferResponse.json"
|
|
||||||
},
|
|
||||||
"LoanStatusRequest": {
|
|
||||||
"$ref": "swagger/schemas/LoanStatusRequest.json"
|
|
||||||
},
|
|
||||||
"LoanStatusResponse": {
|
|
||||||
"$ref": "swagger/schemas/LoanStatusResponse.json"
|
|
||||||
},
|
|
||||||
"RepaymentRequest": {
|
|
||||||
"$ref": "swagger/schemas/RepaymentRequest.json"
|
|
||||||
},
|
|
||||||
"RepaymentResponse": {
|
|
||||||
"$ref": "swagger/schemas/RepaymentResponse.json"
|
|
||||||
},
|
|
||||||
"CustomerConsentRequest": {
|
|
||||||
"$ref": "swagger/schemas/CustomerConsentRequest.json"
|
|
||||||
},
|
|
||||||
"CustomerConsentResponse": {
|
|
||||||
"$ref": "swagger/schemas/CustomerConsentResponse.json"
|
|
||||||
},
|
|
||||||
"NotificationCallbackRequest": {
|
|
||||||
"$ref": "swagger/schemas/NotificationCallbackRequest.json"
|
|
||||||
},
|
|
||||||
"NotificationCallbackResponse": {
|
|
||||||
"$ref": "swagger/schemas/NotificationCallbackResponse.json"
|
|
||||||
},
|
|
||||||
"ApiResponse": {
|
"ApiResponse": {
|
||||||
"$ref": "swagger/schemas/ApiResponse.json"
|
"type": "object",
|
||||||
},
|
"properties": {
|
||||||
"AuthorizeResponse": {
|
"code": {
|
||||||
"$ref": "swagger/schemas/AuthorizeResponse.json"
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"AuthorizeRequest": {
|
"AuthorizeRequest": {
|
||||||
"$ref": "swagger/schemas/AuthorizeRequest.json"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "user123"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "password123"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["username", "password"]
|
||||||
},
|
},
|
||||||
"AuthorizeRefreshResponse": {
|
"AuthorizeResponse": {
|
||||||
"$ref": "swagger/schemas/AuthorizeRefreshResponse.json"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"access_token": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
},
|
||||||
|
"refresh_token": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
},
|
||||||
|
"token_type": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "bearer"
|
||||||
|
},
|
||||||
|
"expires_in": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 3600
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"AuthorizeRefreshRequest": {
|
"AuthorizeRefreshRequest": {
|
||||||
"$ref": "swagger/schemas/AuthorizeRefreshRequest.json"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"refresh_token": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["refresh_token"]
|
||||||
|
},
|
||||||
|
"AuthorizeRefreshResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"access_token": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
},
|
||||||
|
"token_type": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "bearer"
|
||||||
|
},
|
||||||
|
"expires_in": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 3600
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LoansResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"loans": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"customer_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "CUST123"
|
||||||
|
},
|
||||||
|
"account_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
"offer_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "OFFER789"
|
||||||
|
},
|
||||||
|
"initial_loan_amount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 10000.0
|
||||||
|
},
|
||||||
|
"current_loan_amount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 8500.0
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "active"
|
||||||
|
},
|
||||||
|
"product_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "PROD101"
|
||||||
|
},
|
||||||
|
"default_penalty_fee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 500.0
|
||||||
|
},
|
||||||
|
"continuous_fee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 50.0
|
||||||
|
},
|
||||||
|
"due_date": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-20T14:45:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"count": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": {
|
||||||
|
"name": "LoansResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TransactionsResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"transactions": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"transaction_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "TRX123456"
|
||||||
|
},
|
||||||
|
"account_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "PAYMENT"
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "MOBILE"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"count": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": {
|
||||||
|
"name": "TransactionsResponse"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
{
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Loans"
|
||||||
|
],
|
||||||
|
"summary": "Get all loans with optional filtering",
|
||||||
|
"description": "Retrieve loans with various filter options including customer ID, account ID, status, etc.",
|
||||||
|
"operationId": "getLoans",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "customer_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by customer ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "CUST123"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by account ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by loan status",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "active"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "offer_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by offer ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "OFFER789"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "product_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by product ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "PROD101"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by start date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "end_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by end date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "due_before",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter loans due before this date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "due_after",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter loans due after this date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/LoansResponse.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Transactions"
|
||||||
|
],
|
||||||
|
"summary": "Get all transactions with optional filtering",
|
||||||
|
"description": "Retrieve transactions with various filter options including account ID, type, channel, etc.",
|
||||||
|
"operationId": "getTransactions",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by account ID",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "type",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by transaction type",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "PAYMENT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "channel",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by channel",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"example": "MOBILE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "start_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by start date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-01-01T00:00:00Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "end_date",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Filter by end date (ISO format)",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/TransactionsResponse.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"loans": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"customer_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "CUST123"
|
||||||
|
},
|
||||||
|
"account_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
"offer_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "OFFER789"
|
||||||
|
},
|
||||||
|
"initial_loan_amount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 10000.0
|
||||||
|
},
|
||||||
|
"current_loan_amount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 8500.0
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "active"
|
||||||
|
},
|
||||||
|
"product_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "PROD101"
|
||||||
|
},
|
||||||
|
"default_penalty_fee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 500.0
|
||||||
|
},
|
||||||
|
"continuous_fee": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "float",
|
||||||
|
"example": 50.0
|
||||||
|
},
|
||||||
|
"due_date": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-12-31T23:59:59Z"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-20T14:45:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"count": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": {
|
||||||
|
"name": "LoansResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"transactions": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"transaction_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "TRX123456"
|
||||||
|
},
|
||||||
|
"account_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "ACC456"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "PAYMENT"
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "MOBILE"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-01-15T10:30:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"count": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xml": {
|
||||||
|
"name": "TransactionsResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user