-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLOS-API-Collection.json
More file actions
125 lines (125 loc) · 3.84 KB
/
LOS-API-Collection.json
File metadata and controls
125 lines (125 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"info": {
"name": "Loan Origination System - Complete API Tests",
"description": "Success and failure test cases for all LOS endpoints",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:8080/api/v1"
}
],
"item": [
{
"name": "✅ SUCCESS CASES",
"item": [
{
"name": "Submit Valid Loan Application",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"loanId\": \"LOAN001\",\n \"customerName\": \"Ramesh Kumar Singh\",\n \"customerPhone\": \"9123456789\",\n \"loanAmount\": 250000,\n \"loanType\": \"PERSONAL\"\n}"
},
"url": "{{baseUrl}}/loans"
}
},
{
"name": "Get Status Counts",
"request": {
"method": "GET",
"url": "{{baseUrl}}/loans/status-count"
}
},
{
"name": "Get Top Customers",
"request": {
"method": "GET",
"url": "{{baseUrl}}/customers/top"
}
},
{
"name": "Agent Approve Decision",
"request": {
"method": "PUT",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"decision\": \"APPROVE\"\n}"
},
"url": "{{baseUrl}}/agents/1/loans/LOAN001/decision"
}
},
{
"name": "Get Loans by Status",
"request": {
"method": "GET",
"url": "{{baseUrl}}/loans?status=UNDER_REVIEW&page=0&size=10"
}
}
]
},
{
"name": "❌ FAILURE CASES",
"item": [
{
"name": "Submit Invalid Loan - Missing Fields",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"loanId\": \"\",\n \"customerName\": \"\",\n \"loanAmount\": -1000\n}"
},
"url": "{{baseUrl}}/loans"
}
},
{
"name": "Invalid Phone Number",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"loanId\": \"LOAN002\",\n \"customerName\": \"Test User\",\n \"customerPhone\": \"123\",\n \"loanAmount\": 50000,\n \"loanType\": \"PERSONAL\"\n}"
},
"url": "{{baseUrl}}/loans"
}
},
{
"name": "Agent Decision - Invalid Agent ID",
"request": {
"method": "PUT",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"decision\": \"APPROVE\"\n}"
},
"url": "{{baseUrl}}/agents/999/loans/LOAN001/decision"
}
},
{
"name": "Agent Decision - Invalid Loan ID",
"request": {
"method": "PUT",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\n \"decision\": \"APPROVE\"\n}"
},
"url": "{{baseUrl}}/agents/1/loans/NONEXISTENT/decision"
}
},
{
"name": "Invalid Status Filter",
"request": {
"method": "GET",
"url": "{{baseUrl}}/loans?status=INVALID_STATUS&page=0&size=10"
}
}
]
}
]
}