Newer
Older
],
"summary": "Get user accounts",
"description": "Get accounts associated with a user by providing their bank profile id",
"operationId": "getAccounts",
"parameters": [
{
"name": "bankProfileId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"404": {
"description": "Bank profile id does not exist",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
},
"200": {
"description": "No accounts associated with a bank user",
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
}
},
"/api/users/{userId}/profile": {
"get": {
"tags": [
"User"
],
"summary": "Get a profile",
"description": "Get the profile of a user",
"operationId": "getProfile",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Successfully got profile",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProfileDTO"
}
}
}
}
}
}
},
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
"/api/users/search/{searchTerm}/{filter}": {
"get": {
"tags": [
"User"
],
"summary": "Search for users by name and filter",
"description": "Returns a list of users whose names contain the specified search term and match the filter.",
"operationId": "getUsersByNameAndFilter",
"parameters": [
{
"name": "searchTerm",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "filter",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully retrieved list of users",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
}
},
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
"/api/users/search/random/{amount}/{filter}": {
"get": {
"tags": [
"User"
],
"summary": "Get X amount of random users",
"description": "Get X amount of random users that fit the filter",
"operationId": "getRandomUsers",
"parameters": [
{
"name": "amount",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "filter",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully retrieved list of users",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
}
},
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
"/api/users/me": {
"get": {
"tags": [
"User"
],
"summary": "Get the authenticated user",
"description": "Get all user information for the authenticated user",
"operationId": "getUser",
"responses": {
"200": {
"description": "Successfully got user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
},
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
"/api/users/get-feedback": {
"get": {
"tags": [
"User"
],
"summary": "Send feedback",
"description": "Send feedback from a user.",
"operationId": "getFeedback",
"responses": {
"200": {
"description": "Success",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FeedbackResponseDTO"
}
}
}
}
}
}
}
},
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
"/api/leaderboard": {
"get": {
"tags": [
"Leaderboard"
],
"operationId": "getLeaderboard",
"parameters": [
{
"name": "type",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "filter",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "entryCount",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeaderboardDTO"
}
}
}
}
}
}
},
"/api/leaderboard/surrounding": {
"get": {
"tags": [
"Leaderboard"
],
"operationId": "getSurrounding",
"parameters": [
{
"name": "type",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "filter",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "entryCount",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeaderboardDTO"
}
}
}
}
}
}
},
"summary": "Get available store items",
"description": "Retrieves all items available in the store and a flag indicating whether the user has purchased each item.",
"operationId": "getStore",
"description": "List of store items fetched successfully",
"type": "array",
"items": {
"$ref": "#/components/schemas/ItemDTO"
}
"summary": "Get user inventory items",
"description": "Retrieves a list of all items currently in the inventory of the user.",
"operationId": "getInventory",
"description": "List of inventory items fetched successfully",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InventoryDTO"
"Image"
],
"summary": "Retrieve an image",
"description": "Retrieve an image from the server",
"operationId": "getImage",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
"description": "Successfully retrieved the image",
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Image not found",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/ExceptionResponse"
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
"/api/friends": {
"get": {
"tags": [
"Friend"
],
"summary": "Get all friends",
"description": "Returns a list of all friends.",
"operationId": "getFriends",
"responses": {
"200": {
"description": "Successfully retrieved list of friends",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
}
},
"/api/friends/requests": {
"get": {
"tags": [
"Friend"
],
"summary": "Get friend requests",
"description": "Returns a list of all users who have sent a friend request.",
"operationId": "getFriendRequests",
"responses": {
"200": {
"description": "Successfully retrieved friend requests",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
}
},
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
"/api/budget": {
"get": {
"tags": [
"User"
],
"summary": "Get the list of budgets",
"description": "Get all budgets related to the authenticated user",
"operationId": "getBudgetsByUser",
"responses": {
"200": {
"description": "Successfully got budgets",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BudgetResponseDTO"
}
}
}
}
}
}
}
},
"/api/budget/{budgetId}": {
"get": {
"tags": [
"User"
],
"summary": "Get the budget",
"description": "Get budget by its id ",
"operationId": "getBudget",
"parameters": [
{
"name": "budgetId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"500": {
"description": "Budget is not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BudgetResponseDTO"
}
}
}
},
"200": {
"description": "Successfully got budget",
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BudgetResponseDTO"
}
}
}
}
}
}
},
"/api/budget/expenses/{budgetId}": {
"get": {
"tags": [
"User"
],
"summary": "Get the list of budgets",
"description": "Get all budgets related to the authenticated user",
"operationId": "getExpenses",
"parameters": [
{
"name": "budgetId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Successfully got expenses",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpenseResponseDTO"
}
}
}
}
}
}
}
},
"/api/budget/expense/{expenseId}": {
"get": {
"tags": [
"User"
],
"summary": "Get the expense",
"description": "Get expense by its id ",
"operationId": "getExpense",
"parameters": [
{
"name": "expenseId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Successfully got expense",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExpenseResponseDTO"
}
}
}
},
"500": {
"description": "Expense is not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExpenseResponseDTO"
}
}
}
}
}
}
},
"/api/budget/delete/{budgetId}": {
"get": {
"tags": [
"User"
],
"summary": "Deletes a budget",
"description": "Deletes a budget based on provided budget id",
"operationId": "deleteBudget",
"parameters": [
{
"name": "budgetId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"500": {
"description": "Budget is not found",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"200": {
"description": "Successfully deleted budget",
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/api/budget/delete/expense/{expenseId}": {
"get": {
"tags": [
"User"
],
"summary": "Deletes an expense",
"description": "Deletes an expense based on provided expense id",
"operationId": "deleteExpense",
"parameters": [
{
"name": "expenseId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted expense",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"500": {
"description": "Expense is not found",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"TransactionDTO": {
"type": "object",
"properties": {
"debtorBBAN": {
"type": "integer",
"format": "int64"
},
"creditorBBAN": {
"type": "integer",
"format": "int64"
},
"amount": {
"type": "number"
}
}
},
"BankProfileDTO": {
"type": "object",
"properties": {
"ssn": {
"type": "integer",
"format": "int64"
}
}
},
"Account": {
"type": "object",
"properties": {
"bban": {
"type": "integer",
"format": "int64"
},
"balance": {
"type": "number"
},
"bankProfile": {
"$ref": "#/components/schemas/BankProfile"
}
}
},
"BankProfile": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"ssn": {
"type": "integer",
"format": "int64"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
},
"BankProfileResponseDTO": {
"type": "object",
"properties": {
"ssn": {
"type": "integer",
"format": "int64"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
},
"AccountRequestDTO": {
"type": "object",
"properties": {
"ssn": {
"type": "integer",
"format": "int64"
}
}
},
"AccountResponseDTO": {
"type": "object",
"properties": {
"bankProfileId": {
"type": "integer",
"format": "int64"
},
"balance": {
"type": "number"
}
}
},
"FeedbackRequestDTO": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"PasswordResetDTO": {
"required": [
"token"
],
"type": "object",
"properties": {
"token": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"CreateGoalDTO": {
"type": "object",
"properties": {
"type": "string"
},
"description": {
"type": "string"
},
"targetAmount": {
}
}
},
"ChallengeDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"amount": {
"type": "number"
},
"points": {
"endDate": {
"type": "string",
"format": "date-time"
},
"challengeTemplate": {
"$ref": "#/components/schemas/ChallengeTemplateDTO"
},
"progressList": {
"$ref": "#/components/schemas/ProgressDTO"
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"amount": {
"type": "number"
},
"type": {
"enum": [
"NO_COFFEE",
"NO_CAR",
"SHORTER_SHOWER",
"SPEND_LESS_ON_FOOD",
"BUY_USED_CLOTHES",
"LESS_SHOPPING",
"DROP_SUBSCRIPTION",
"SELL_SOMETHING",
"BUY_USED",
"EAT_PACKED_LUNCH",
"STOP_SHOPPING",
"ZERO_SPENDING",
"RENT_YOUR_STUFF",
"MEATLESS",
"SCREEN_TIME_LIMIT",
"UNPLUGGED_ENTERTAINMENT"
]
}
}
},
"GoalDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"type": "string"
},
"description": {
"type": "string"
},
"targetAmount": {
},
"targetDate": {
"type": "string",
"format": "date-time"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"challenges": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChallengeDTO"
}
},
"user": {
"$ref": "#/components/schemas/UserDTO"
"id": {
"type": "integer",
"format": "int64"
"day": {
"type": "integer",
"format": "int32"
},
"amount": {
"type": "number"
},
"completedAt": {
"type": "string",
"format": "date-time"
"id": {
"type": "integer",
"format": "int64"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
},
"profileImage": {
"type": "integer",
"format": "int64"
},
"email": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"role": {
"type": "string"
},
"subscriptionLevel": {
"type": "string"
}
}
},
"MarkChallengeDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"day": {
"type": "integer",
"format": "int32"