Newer
Older
{
"openapi": "3.0.1",
"info": {
"title": "Sparesti API",
"description": "The Sparesti API",
"version": "3.0"
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Generated server url"
}
],
"security": [
{
"Bearer Authentication": []
}
],
{
"name": "Item",
"description": "Endpoints for managing store and user inventory."
},
{
"name": "Friend",
"description": "API for managing friend relationships"
}
],
"/api/users/subscription/{subscriptionLevel}": {
"put": {
"tags": [
"User"
],
"summary": "Update User Subscription Level",
"description": "Updates the subscription level of the current user",
"operationId": "updateSubscriptionLevel",
"parameters": [
{
"name": "subscriptionLevel",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Subscription level updated successfully",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/api/friends/{friendId}": {
"put": {
"tags": [
"Friend"
],
"summary": "Accept a friend request",
"description": "Accepts a friend request from another user.",
"operationId": "acceptFriendRequest",
"parameters": [
{
"name": "friendId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"404": {
"description": "Friend request not found",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
},
"200": {
"description": "Friend request successfully accepted",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
}
}
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
},
"delete": {
"tags": [
"Friend"
],
"summary": "Delete a friend or cancel a friend request",
"description": "Deletes an existing friend from your friend list or cancels a received friend request.",
"operationId": "deleteFriendOrFriendRequest",
"parameters": [
{
"name": "friendId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"404": {
"description": "Friend or friend request not found",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
},
"200": {
"description": "Friend successfully deleted or friend request cancelled",
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
}
}
}
"/bank/v1/transaction/norwegian-domestic-payment-to-self": {
"post": {
"tags": [
"transaction-controller"
],
"summary": "Transfer to account",
"description": "Transfer money from a users account to another account of the same user",
"operationId": "transferToSelf",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionDTO"
}
}
},
"required": true
},
"responses": {
"404": {
"description": "Bank profile id does not exist",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/TransactionDTO"
}
}
}
},
"200": {
"description": "No accounts associated with a bank user",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/TransactionDTO"
}
}
}
}
}
}
},
"/bank/v1/profile/create-profile": {
"post": {
"tags": [
"bank-profile-controller"
],
"summary": "Create bank profile",
"description": "Create a bank profile by providing a social security number",
"operationId": "createBankProfile",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BankProfileDTO"
}
}
},
"required": true
},
"responses": {
"400": {
"description": "Could not create profile",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/BankProfileResponseDTO"
}
}
}
},
"200": {
"description": "Successfully created a bank profile",
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/BankProfileResponseDTO"
}
}
}
}
}
}
},
"/bank/v1/account/create-account": {
"post": {
"tags": [
"account-controller"
],
"summary": "Create account",
"description": "Create account with random balance",
"operationId": "createAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountRequestDTO"
}
}
},
"required": true
},
"responses": {
"404": {
"description": "Provided bank profile id could not be found",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/AccountResponseDTO"
}
}
}
},
"200": {
"description": "Successfully created account",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/AccountResponseDTO"
}
}
}
}
}
}
},
"/api/users/send-feedback": {
"post": {
"tags": [
"User"
],
"summary": "Send feedback",
"description": "Send feedback from an email.",
"operationId": "sendFeedback",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FeedbackRequestDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success"
}
}
}
},
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
"/api/users/reset-password": {
"post": {
"tags": [
"User"
],
"summary": "Initiate a password reset",
"description": "Send a password reset mail to the user with the specified email",
"operationId": "resetPassword",
"requestBody": {
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Successfully initiated a password reset"
}
},
"security": []
}
},
"/api/users/confirm-password": {
"post": {
"tags": [
"User"
],
"summary": "Confirm a password reset",
"description": "Confirms a password reset using a token and a new password",
"operationId": "confirmPasswordReset",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasswordResetDTO"
}
}
},
"required": true
},
"responses": {
"403": {
"description": "Invalid token"
},
"204": {
"description": "Password was reset successfully"
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
"/api/item/{itemId}": {
"post": {
"tags": [
"Item"
],
"summary": "Purchase an item",
"description": "Performs a purchase of the item by the user. Points will be deducted from the user.",
"operationId": "buyItem",
"parameters": [
{
"name": "itemId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"403": {
"description": "Insufficient points to purchase the item",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"201": {
"description": "Item purchased and added to inventory successfully",
"content": {
"application/json": {
}
}
}
}
}
},
"post": {
"tags": [
"Image"
],
"summary": "Upload an image",
"description": "Upload an image to the server",
"operationId": "uploadImage",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"required": [
"file"
],
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
"responses": {
"description": "Successfully uploaded the image",
"content": {
"*/*": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
"/api/goals": {
"get": {
"tags": [
"Goal"
],
"summary": "Get goals",
"description": "Get the goals of the authenticated user",
"operationId": "getGoals",
"responses": {
"200": {
"description": "Successfully retrieved the goals",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GoalDTO"
}
}
}
}
}
}
},
"summary": "Create a goal",
"description": "Create a new goal",
"operationId": "createGoal",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateGoalDTO"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successfully created a goal",
"schema": {
"$ref": "#/components/schemas/GoalDTO"
}
}
}
}
}
}
},
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
"/api/goals/update-challenge": {
"post": {
"tags": [
"Goal"
],
"summary": "Update a challenge",
"description": "Update a challenge day as completed",
"operationId": "updateChallenge",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MarkChallengeDTO"
}
}
},
"required": true
},
"responses": {
"401": {
"description": "Day is already completed or day outside of range",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/ExceptionResponse"
}
}
}
},
"200": {
"description": "Successfully updated the challenge"
}
}
}
},
"/api/goals/update-challenge-amount": {
"post": {
"tags": [
"Goal"
],
"summary": "Update challenge saving amount",
"description": "Update the challenge saving amount",
"operationId": "updateChallengeAmount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MarkChallengeDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated the challenge"
}
}
}
},
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
"/api/friends/{userId}": {
"post": {
"tags": [
"Friend"
],
"summary": "Send a friend request",
"description": "Sends a new friend request to another user.",
"operationId": "addFriendRequest",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"201": {
"description": "Friend request successfully created"
}
}
}
},
"post": {
"tags": [
"User"
],
"summary": "Updates a budget",
"description": "Updates a budget based on the budget request",
"operationId": "updateBudget",
"parameters": [
{
"name": "budgetId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
}
}
},
"required": true
},
"responses": {
"500": {
"description": "Budget is not found",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"200": {
"description": "Successfully updated budget",
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/api/budget/update/expense/{budgetId}": {
"post": {
"tags": [
"User"
],
"summary": "Created/Updates an expense",
"description": "Creates/Updates a budget based on the budget request",
"operationId": "updateExpense",
"parameters": [
{
"name": "budgetId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExpenseRequestDTO"
}
}
},
"required": true
},
"responses": {
"500": {
"description": "Error updating expense",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"200": {
"description": "Successfully updated budget",
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/api/budget/create": {
"post": {
"tags": [
"User"
],
"summary": "Create a new budget",
"description": "Create a new budget with based on the budget request",
"operationId": "createBudget",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BudgetRequestDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully created new budget",
"content": {
"application/json": {
"schema": {
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
}
}
}
}
}
}
},
"/api/auth/valid-email/{email}": {
"post": {
"tags": [
"Authentication"
],
"summary": "Validate email",
"description": "Check that the given email is valid",
"operationId": "validateEmail",
"parameters": [
{
"name": "email",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"409": {
"description": "Email already exists",
"$ref": "#/components/schemas/ExceptionResponse"
"200": {
"description": "Email is valid",
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
}
}
}
}
},
"security": []
}
},
"/api/auth/signup": {
"post": {
"tags": [
"Authentication"
],
"summary": "User Signup",
"description": "Sign up a new user",
"operationId": "signup",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignUpRequest"
}
}
},
"required": true
},
"responses": {
"409": {
"description": "Email already exists",
"$ref": "#/components/schemas/ExceptionResponse"
"201": {
"description": "Successfully signed up",
"$ref": "#/components/schemas/AuthenticationResponse"
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
}
}
}
}
},
"security": []
}
},
"/api/auth/login": {
"post": {
"tags": [
"Authentication"
],
"summary": "User Login",
"description": "Log in with an existing user",
"operationId": "login",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully logged in",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthenticationResponse"
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExceptionResponse"
}
}
}
},
"404": {
"description": "User not found",
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExceptionResponse"
}
}
}
}
},
"security": []
}
},
"/api/users": {
"patch": {
"tags": [
"User"
],
"summary": "Update a profile",
"description": "Update the profile of the authenticated user",
"operationId": "update",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserUpdateDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated profile",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
},
"/api/users/update-account": {
"patch": {
"tags": [
"User"
],
"summary": "Update a user's bank account",
"description": "Changes either a user's checking account or savings account",
"operationId": "selectBankAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BankAccountDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
},
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
"/api/users/password": {
"patch": {
"tags": [
"User"
],
"summary": "Update a password",
"description": "Update the password of the authenticated user",
"operationId": "updatePassword",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasswordUpdateDTO"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated password",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/UserDTO"
}
}
}
}
}
}
},
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
"/bank/v1/account/accounts/ssn/{ssn}": {
"get": {
"tags": [
"account-controller"
],
"summary": "Get user accounts",
"description": "Get accounts associated with a user by providing their social security number",
"operationId": "getAccountsBySsn",
"parameters": [
{
"name": "ssn",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "No accounts associated with a bank user",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
},
"404": {
"description": "Social security number does not exist",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
}
},
"/bank/v1/account/accounts/profile/{bankProfileId}": {
"get": {
"tags": [
"account-controller"
],
"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
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
},
"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"
},
"amount": {
"type": "number"
}
}
},
"ExceptionResponse": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
"type": "object",
"properties": {
"budgetName": {
"type": "string"
},
"budgetAmount": {
"type": "number"
},
"expenseAmount": {
"type": "number"
}
}
},
"ExpenseRequestDTO": {
"type": "object",
"properties": {
"expenseId": {
"type": "integer",
"format": "int64"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
},
"ConfigurationDTO": {
"type": "object",
"properties": {
"commitment": {
"type": "string"
},
"experience": {
"type": "string"
},
"challengeTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SignUpRequest": {
"required": [
"configuration"
],
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"configuration": {
"$ref": "#/components/schemas/ConfigurationDTO"
}
}
},
"AuthenticationResponse": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"userId": {
"type": "integer",
"format": "int64"
},
"profileImage": {
"type": "integer",
"format": "int64"
},
"subscriptionLevel": {
"type": "string"
},
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
"token": {
"type": "string"
}
}
},
"LoginRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"UserUpdateDTO": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"profileImage": {
"type": "integer",
"format": "int64"
},
"configuration": {
"$ref": "#/components/schemas/ConfigurationDTO"
}
}
},
"BankAccountDTO": {
"type": "object",
"properties": {
"bban": {
"type": "integer",
"format": "int64"
},
"bankAccountType": {
"type": "string"
}
}
},
"PasswordUpdateDTO": {
"type": "object",
"properties": {
"oldPassword": {
"type": "string"
},
"newPassword": {
"type": "string"
}
}
},
"ProfileDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"profileImage": {
"type": "integer",
"format": "int64"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
},
"FeedbackResponseDTO": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
Loading
Loading full blame...