openapi: 3.0.1 info: title: Receipt Wrangler API. termsOfService: there are no TOS at this moment, use at your own risk we take no responsibility license: name: GPLV3 url: https://www.gnu.org/licenses/gpl-3.0.en.html version: 5.0.0 servers: - url: /api security: - bearerAuth: [ ] paths: /dashboard/{groupId}: parameters: - in: path name: groupId schema: type: string required: true description: Id of group to get dashboard for get: tags: - Dashboard summary: Get dashboards for a user by group id description: This will get a dashboards for a user by group id operationId: getDashboardsForUserByGroupId responses: 200: description: The dashboard content: application/json: schema: type: array items: $ref: "#/components/schemas/Dashboard" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /dashboard/{dashboardId}: parameters: - in: path name: dashboardId schema: type: integer required: true description: Id of dashboard to operate on put: tags: - Dashboard summary: Update dashboard description: This will update a dashboard operationId: updateDashboard requestBody: description: Dashboard to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertDashboardCommand" responses: 200: description: The updated dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Dashboard summary: Delete dashboard description: This will delete a dashboard by id operationId: deleteDashboard responses: 200: description: The deleted dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /dashboard/: post: tags: - Dashboard summary: Create dashboard description: This will create a dashboard [SYSTEM USER] requestBody: description: Dashboard required: true content: application/json: schema: $ref: "#/components/schemas/UpsertDashboardCommand" operationId: createDashboard responses: 200: description: The created dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /category/{categoryName}: parameters: - in: path name: categoryName schema: type: string required: true description: Category name to get count of get: tags: - Category summary: Get category count by name description: This will return a count of categories with the same name operationId: getCategoryCountByName responses: 200: description: The number of categories with the same name content: text/plain: schema: type: integer 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /category/getPagedCategories: post: tags: - Category summary: Get paged categories description: This will return paged categories operationId: getPagedCategories requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedRequestCommand" responses: 200: description: Paged categories content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /category/: get: tags: - Category summary: Get all categories description: This will return all categories in the system operationId: getAllCategories responses: 200: description: All categories in the system content: application/json: schema: type: array items: $ref: "#/components/schemas/Category" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] post: tags: - Category summary: Create category description: This will create a category operationId: createCategory requestBody: description: Category to create required: true content: application/json: schema: $ref: "#/components/schemas/Category" responses: 200: description: The created category content: application/json: schema: $ref: "#/components/schemas/Category" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /category/{categoryId}: parameters: - in: path name: categoryId schema: type: integer required: true description: Category Id to get put: tags: - Category summary: Update category description: This will update a category operationId: updateCategory requestBody: description: Category to update required: true content: application/json: schema: $ref: "#/components/schemas/Category" responses: 200: $ref: "#/components/responses/Ok" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Category summary: Delete category description: This will delete a category by id operationId: deleteCategory responses: 200: $ref: "#/components/responses/Ok" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /comment/: post: tags: - Comment summary: Add comment description: This will add a comment to a receipt, [SYSTEM USER] requestBody: description: Comment to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertCommentCommand" operationId: addComment responses: 200: description: The created comment content: application/json: schema: $ref: "#/components/schemas/Comment" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /comment/{commentId}: delete: tags: - Comment summary: Delete comment description: This will delete a comment by id [SYSTEM User] parameters: - in: path name: commentId schema: type: integer required: true description: Comment Id to delete operationId: deleteComment responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /featureConfig: get: tags: - FeatureConfig summary: Get feature config description: This will get the server's feature config operationId: getFeatureConfig responses: 200: description: The feature config content: application/json: schema: $ref: "#/components/schemas/FeatureConfig" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /group: get: tags: - Groups summary: Get groups for user description: This will get groups for the currently logged in user operationId: getGroupsForuser responses: 200: description: The groups content: application/json: schema: type: array items: $ref: "#/components/schemas/Group" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] post: tags: - Groups summary: Create group description: This will create a group requestBody: description: Group to create required: true content: application/json: schema: $ref: "#/components/schemas/Group" operationId: createGroup responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /group/{groupId}/ocrText: get: tags: - Groups summary: Reads each image in a group and returns the zipped read text description: This will get the ocr text, zipped, for each image in a group and one text file per image operationId: getOcrTextForGroup parameters: - in: path name: groupId schema: type: integer required: true description: Group Id to get ocr text for responses: 200: description: Zip file containing text from each image 500: $ref: "#/components/responses/Internal" 403: $ref: "#/components/responses/Forbidden" security: - bearerAuth: [ ] /group/{groupId}/pollGroupEmail: post: tags: - Groups summary: Poll group email description: This will poll the group email for new receipts and add them to the group operationId: pollGroupEmail parameters: - in: path name: groupId schema: type: integer required: true description: Group Id to poll responses: 200: $ref: "#/components/responses/Ok" 400: $ref: "#/components/responses/BadRequest" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /group/{groupId}: parameters: - in: path name: groupId schema: type: integer required: true description: Group Id to get get: tags: - Groups summary: Gets a group by Id description: This will get a group by Id operationId: getGroupById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] put: tags: - Groups summary: Update a group description: This will update a group requestBody: description: Group to update required: true content: application/json: schema: $ref: "#/components/schemas/Group" operationId: updateGroup responses: 200: $ref: "#/components/responses/Ok" 400: $ref: "#/components/responses/BadRequest" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Groups summary: Delete group description: This will delete a group by id operationId: deleteGroup responses: 200: $ref: "#/components/responses/Ok" 400: $ref: "#/components/responses/BadRequest" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /group/{groupId}/groupSettings: put: tags: - Groups summary: Update group settings description: This will update the group settings for a group operationId: updateGroupSettings parameters: - in: path name: groupId schema: type: integer required: true description: Group Id to update requestBody: description: Group settings to update required: true content: application/json: schema: $ref: "#/components/schemas/UpdateGroupSettingsCommand" responses: 200: description: The updated group settings content: application/json: schema: $ref: "#/components/schemas/GroupSettings" 400: $ref: "#/components/responses/BadRequest" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /group/getPagedGroups: post: tags: - Groups summary: Get paged groups description: This will return paged groups operationId: getPagedGroups requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedGroupRequestCommand" responses: 200: description: Paged groups content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" security: - bearerAuth: [ ] /login/: post: tags: - Auth summary: Login description: This will log a user into the system requestBody: description: Login data required: true content: application/json: schema: $ref: "#/components/schemas/LoginCommand" operationId: login responses: 200: description: App data content: application/json: schema: $ref: "#/components/schemas/AppData" 500: $ref: "#/components/responses/Internal" /logout/: post: tags: - Auth summary: Logout description: This will log a user out of the system and revoke their token [SYSTEM USER] operationId: logout requestBody: description: Refresh token required: false content: application/json: schema: $ref: "#/components/schemas/LogoutCommand" responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /notifications/: get: tags: - Notifications summary: Get all user notifications description: This will get all the notifications for the currently logged in user operationId: getNotificationsForuser responses: 200: description: The notifications content: application/json: schema: type: array items: $ref: "#/components/schemas/Notification" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Notifications summary: Delete all notifications for user description: This deletes all notifications for a user operationId: deleteAllNotificationsForUser responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /notifications/{notificationId}: delete: tags: - Notifications summary: Delete notification by id description: This deletes a notification by id parameters: - in: path name: notificationId schema: type: integer required: true description: Notification Id to delete operationId: deleteNotificationById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /notifications/notificationCount: get: tags: - Notifications summary: Notification count description: This will get the notification count for the currently logged in user operationId: getNotificationCount responses: 200: description: The notification count content: application/json: schema: type: integer 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/: post: tags: - Receipt summary: Create receipt description: This will create a receipt [SYSTEM USER] requestBody: description: Receipt to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertReceiptCommand" operationId: createReceipt responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/quickScan: post: tags: - Receipt summary: Quick scan a receipt description: This take an image and use magic fill to fill and save the receipt [SYSTEM USER] requestBody: description: Quick scan data required: true content: multipart/form-data: schema: $ref: "#/components/schemas/QuickScanCommand" operationId: quickScanReceipt responses: 200: description: The created receipts content: application/json: schema: type: array items: $ref: "#/components/schemas/Receipt" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/hasAccess: get: tags: - Receipt summary: Has access to receipt description: This will return whether or not the currently logged in user has access to the receipt operationId: hasAccessToReceipt parameters: - in: query name: receiptId schema: type: integer required: true - in: query name: groupRole schema: type: string description: Role required to have access to receipt responses: 200: $ref: "#/components/responses/Ok" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/{receiptId}: parameters: - in: path name: receiptId schema: type: integer required: true description: Id of receipt to get get: tags: - Receipt summary: Get receipt description: This will get a receipt by receipt id [SYSTEM USER] operationId: getReceiptById responses: 200: description: The receipt content: application/json: schema: $ref: "#/components/schemas/Receipt" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] put: tags: - Receipt summary: Update receipt description: This will update a receipt by receipt id [SYSTEM USER] requestBody: description: Receipt to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertReceiptCommand" operationId: updateReceipt responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Receipt summary: Delete receipt description: This will delete a receipt by id [SYSTEM USER] operationId: deleteReceiptById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/{receiptId}/duplicate: post: tags: - Receipt summary: Duplicate receipt description: This will duplicate a receipt [SYSTEM USER] parameters: - in: path name: receiptId schema: type: integer required: true description: Id of receipt to duplicate operationId: duplicateReceipt responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/bulkStatusUpdate: post: tags: - Receipt summary: Bulk receipt status update description: This will bulk update receipt statuses with the option of adding a comment to each [SYSTEM USER] operationId: bulkReceiptStatusUpdate requestBody: description: Bulk status data required: true content: application/json: schema: $ref: "#/components/schemas/BulkStatusUpdateCommand" responses: 200: description: The updated receipts content: application/json: schema: type: array items: $ref: "#/components/schemas/Receipt" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receipt/group/{groupId}: post: tags: - Receipt summary: Gets receipts description: This will return receipts with the option to sort and filter [SYSTEM USER] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReceiptPagedRequestCommand" parameters: - in: path name: groupId schema: type: integer required: true description: Get all receipts that belong to groupId operationId: getReceiptsForGroup responses: 200: description: The receipts content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receiptImage/: post: tags: - ReceiptImage summary: Uploads a receipt image description: This will upload a receipt image, [SYSTEM USER] requestBody: description: Receipt image to upload required: true content: multipart/form-data: schema: $ref: "#/components/schemas/ReceiptFileUploadCommand" operationId: uploadReceiptImage responses: 200: description: The uploaded receipt image content: application/json: schema: $ref: "#/components/schemas/FileDataView" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receiptImage/convertToJpg: post: tags: - ReceiptImage summary: Converts a receipt image to jpg description: This will convert a receipt image to jpg, [SYSTEM USER] requestBody: description: Receipt image to convert required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary description: Base64 encoded image operationId: convertToJpg responses: 200: description: The converted image content: application/json: schema: $ref: "#/components/schemas/EncodedImage" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receiptImage/magicFill: post: tags: - ReceiptImage summary: Reads a receipt image and returns the parsed results description: This will parse and read a receipt image, [SYSTEM USER] operationId: magicFillReceipt requestBody: required: false content: multipart/form-data: schema: type: object properties: file: type: string format: binary parameters: - in: query name: receiptImageId schema: type: integer required: false description: Id of receipt image to perform magic fill on responses: 200: description: The parsed receipt content: application/json: schema: $ref: "#/components/schemas/Receipt" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /receiptImage/{receiptImageId}: parameters: - in: path name: receiptImageId schema: type: integer required: true description: Id of receipt image to get get: tags: - ReceiptImage summary: Get receipt image description: This will get a receipt image by id, [SYSTEM USER] operationId: getReceiptImageById responses: 200: description: The receipt image content: application/json: schema: $ref: "#/components/schemas/FileDataView" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - ReceiptImage summary: Delete receipt image description: This will delete a receipt image by id [SYSTEM USER] operationId: deleteReceiptImageById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /search/: get: tags: - Search summary: Receipt Search description: This will search for receipts based on a search term operationId: receiptSearch parameters: - name: searchTerm in: query description: search term required: true schema: type: string responses: 200: description: The search results content: application/json: schema: type: array items: $ref: "#/components/schemas/SearchResult" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /signUp: post: tags: - Auth summary: Signs up description: This will sign a user up for the system operationId: signUp requestBody: description: Sign up data required: true content: application/json: schema: $ref: "#/components/schemas/SignUpCommand" responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /tag/getPagedTags: post: tags: - Tag summary: Get paged tags description: This will return paged tags operationId: getPagedTags requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedRequestCommand" responses: 200: description: Paged tags content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /tag/{tagName}: parameters: - in: path name: tagName schema: type: string required: true description: Tag name to get count of get: tags: - Tag summary: Get tag count by name description: This will count of names with the same name operationId: getTagCountByName responses: 200: description: The number of tags with the same name content: text/plain: schema: type: integer 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /tag/{tagId}: parameters: - in: path name: tagId schema: type: integer required: true description: Id of tag to get put: tags: - Tag summary: Update tag description: This will update a tag operationId: updateTag requestBody: description: Tag to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertTagCommand" responses: 200: description: The updated tag content: application/json: schema: $ref: "#/components/schemas/Tag" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - Tag summary: Delete tag description: This will delete a tag by id operationId: deleteTag responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /tag/: get: tags: - Tag summary: Get all tags description: This will return all tags in the system operationId: getAllTags responses: 200: description: All tags in the system content: application/json: schema: type: array items: $ref: "#/components/schemas/Tag" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] post: tags: - Tag summary: Create tag description: This will create a tag operationId: createTag requestBody: description: Tag to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertTagCommand" responses: 200: description: The created tag content: application/json: schema: $ref: "#/components/schemas/Tag" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /token/: post: tags: - Auth summary: Get fresh tokens description: This will get a fresh token pair for the user operationId: getNewRefreshToken requestBody: description: Refresh token body for clients that don't use cookies required: false content: application/json: schema: $ref: "#/components/schemas/LogoutCommand" responses: 200: description: The new token pair content: application/json: schema: oneOf: - $ref: "#/components/schemas/TokenPair" - $ref: "#/components/schemas/Claims" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user: get: tags: - User summary: Get users description: This will get all the users in the system and return a view without sensative information operationId: getUsers responses: 200: description: The users content: application/json: schema: type: array items: $ref: "#/components/schemas/UserView" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] post: tags: - User summary: Create user description: This will to create a user, [SYSTEM ADMIN] requestBody: description: User to create required: true content: application/json: schema: $ref: "#/components/schemas/User" operationId: createUser responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/{userId}: put: tags: - User summary: Update user by id description: This will update a user by id, [SYSTEM ADMIN] requestBody: description: User to update required: true content: application/json: schema: $ref: "#/components/schemas/User" parameters: - in: path name: userId schema: type: integer required: true description: Id of user to update operationId: updateUserById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] delete: tags: - User summary: Delete user description: This will delete a system user by id [SYSTEM ADMIN] parameters: - in: path name: userId schema: type: integer required: true description: Id of user to update operationId: deleteUserById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/{userId}/convertDummyUserToNormalUser: post: tags: - User summary: Converts dummy user description: This will convert a dummy user to a normal system user, [SYSTEM ADMIN] requestBody: description: Login credentials for new user required: true content: application/json: schema: $ref: "#/components/schemas/ResetPasswordCommand" parameters: - in: path name: userId schema: type: integer required: true description: Id of user to convert to normal system user operationId: convertDummyUserById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/{userId}/resetPassword: post: tags: - User summary: Reset password description: This will reset a password for a user, [SYSTEM ADMIN] requestBody: description: Login credentials for new user required: true content: application/json: schema: $ref: "#/components/schemas/ResetPasswordCommand" parameters: - in: path name: userId schema: type: integer required: true description: Id of user to reset password operationId: resetPasswordById responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/{username}: get: tags: - User summary: Get username count description: This will return the number of users in the system with the same username parameters: - in: path name: username schema: type: string required: true description: Username to get the count of operationId: getUsernameCount responses: 200: description: The number of users with the same username content: application/json: schema: type: integer 500: $ref: "#/components/responses/Internal" /user/amountOwedForUser: get: tags: - User summary: Get amount owed for user description: This will return the amount owed for the logged in user, in the specified group, [SYSTEM USER] parameters: - in: query name: groupId schema: type: integer required: false description: The Id of the group to get amount owed for - in: query name: receiptIds schema: type: array items: type: integer required: false description: The Id of the receipts to get amount owed for operationId: getAmountOwedForUser responses: 200: description: The amount owed content: application/json: schema: type: object additionalProperties: type: string 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/getUserClaims: get: tags: - User summary: Get claims for logged in user description: This will return the user's token claims for the currently logged in user [SYSTEM USER] operationId: getUserClaims responses: 200: description: The user's claims content: application/json: schema: $ref: "#/components/schemas/Claims" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/updateUserProfile: put: tags: - User summary: Update user profile description: This will update the logged in user's user profile requestBody: description: User profile to update required: true content: application/json: schema: $ref: "#/components/schemas/UpdateProfileCommand" operationId: updateUserProfile responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /user/appData: get: tags: - User summary: Get app data description: This will return the user's app data for the currently logged in user [SYSTEM USER] operationId: getAppData responses: 200: description: The user's app data content: application/json: schema: $ref: "#/components/schemas/AppData" 403: $ref: "#/components/responses/Forbidden" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /userPreferences: get: tags: - UserPreferences summary: Get user preferences description: This will return the user's preferences for the currently logged in user [SYSTEM USER] operationId: getUserPreferences responses: 200: description: The user's preferences content: application/json: schema: $ref: "#/components/schemas/UserPreferences" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] put: tags: - UserPreferences summary: Update user preferences description: This will update the user's preferences for the currently logged in user [SYSTEM USER] requestBody: description: User preferences to update required: true content: application/json: schema: $ref: "#/components/schemas/UserPreferences" operationId: updateUserPreferences responses: 200: description: The user's preferences content: application/json: schema: $ref: "#/components/schemas/UserPreferences" 500: $ref: "#/components/responses/Internal" security: - bearerAuth: [ ] /systemEmail/: post: tags: - SystemEmail summary: Create system email description: This will create a system email operationId: createSystemEmail requestBody: description: System email to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertSystemEmailCommand" responses: 200: description: The created system email content: application/json: schema: $ref: "#/components/schemas/SystemEmail" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /systemEmail/checkConnectivity: post: tags: - SystemEmail summary: Check system email connectivity description: This will check system email connectivity operationId: checkSystemEmailConnectivity requestBody: description: System email to check connectivity required: true content: application/json: schema: $ref: "#/components/schemas/CheckEmailConnectivityCommand" responses: 200: $ref: "#/components/schemas/SystemTask" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /systemEmail/{id}: get: tags: - SystemEmail summary: Get system email by id description: This will get a system email by id operationId: getSystemEmailById parameters: - in: path name: id schema: type: integer required: true description: Id of system email to get responses: 200: description: The system email content: application/json: schema: $ref: "#/components/schemas/SystemEmail" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" put: tags: - SystemEmail summary: Update system email by id description: This will update a system email by id operationId: updateSystemEmailById requestBody: description: System email to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertSystemEmailCommand" parameters: - in: path name: id schema: type: integer required: true description: Id of system email to update - in: query name: updatePassword schema: type: boolean required: true description: Whether or not to update the password responses: 200: description: The updated system email content: application/json: schema: $ref: "#/components/schemas/SystemEmail" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" delete: tags: - SystemEmail summary: Delete system email by id description: This will delete a system email by id operationId: deleteSystemEmailById parameters: - in: path name: id schema: type: integer required: true description: Id of system email to delete responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /systemEmail/getSystemEmails: post: tags: - SystemEmail summary: Gets paged system emails description: This will return paged and sorted system emails operationId: getPagedSystemEmails requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedRequestCommand" responses: 200: description: Paged system emails content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" security: - bearerAuth: [ ] /systemTask/getPagedSystemTasks: post: tags: - SystemTask summary: Gets paged system tasks description: This will return paged system tasks operationId: getPagedSystemTasks requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/GetSystemTaskCommand" responses: 200: description: Paged system tasks content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" security: - bearerAuth: [ ] /prompt/: post: tags: - Prompt summary: Create prompt description: This will create a prompt operationId: createPrompt requestBody: description: Prompt to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertPromptCommand" responses: 200: description: The created prompt content: application/json: schema: $ref: "#/components/schemas/Prompt" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /prompt/{id}: get: tags: - Prompt summary: Get prompt by id description: This will get a prompt by id operationId: getPromptById parameters: - in: path name: id schema: type: integer required: true description: Id of prompt to get responses: 200: description: The prompt content: application/json: schema: $ref: "#/components/schemas/Prompt" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" put: tags: - Prompt summary: Update prompt by id description: This will update a prompt by id operationId: updatePromptById requestBody: description: Prompt to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertPromptCommand" parameters: - in: path name: id schema: type: integer required: true description: Id of prompt to update responses: 200: description: The updated prompt content: application/json: schema: $ref: "#/components/schemas/Prompt" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" delete: tags: - Prompt summary: Delete prompt by id description: This will delete a prompt by id operationId: deletePromptById parameters: - in: path name: id schema: type: integer required: true description: Id of prompt to delete responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /prompt/getPagedPrompts: post: tags: - Prompt summary: Gets paged prompts description: This will return paged prompts operationId: getPagedPrompts requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedRequestCommand" responses: 200: description: Paged prompts content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" security: - bearerAuth: [ ] /prompt/createDefaultPrompt: post: tags: - Prompt summary: Create default prompt description: This will create a default prompt operationId: createDefaultPrompt responses: 200: description: The created prompt content: application/json: schema: $ref: "#/components/schemas/Prompt" 500: $ref: "#/components/responses/Internal" 403: $ref: "#/components/responses/Forbidden" /receiptProcessingSettings/{id}: get: tags: - ReceiptProcessingSettings summary: Get receipt processing settings by id description: This will get receipt processing settings by id operationId: getReceiptProcessingSettingsById parameters: - in: path name: id schema: type: integer required: true description: Id of receipt processing settings to get responses: 200: description: The receipt processing settings content: application/json: schema: $ref: "#/components/schemas/ReceiptProcessingSettings" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" put: tags: - ReceiptProcessingSettings summary: Update receipt processing settings by id description: This will update receipt processing settings by id operationId: updateReceiptProcessingSettingsById requestBody: description: Receipt processing settings to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertReceiptProcessingSettingsCommand" parameters: - in: path name: id schema: type: integer required: true description: Id of receipt processing settings to update - in: query name: updateKey schema: type: boolean required: true description: Whether or not to update the key responses: 200: description: The updated receipt processing settings content: application/json: schema: $ref: "#/components/schemas/ReceiptProcessingSettings" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" delete: tags: - ReceiptProcessingSettings summary: Delete receipt processing settings by id description: This will delete receipt processing settings by id operationId: deleteReceiptProcessingSettingsById parameters: - in: path name: id schema: type: integer required: true description: Id of receipt processing settings to delete responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" 403: $ref: "#/components/responses/Forbidden" /receiptProcessingSettings: post: tags: - ReceiptProcessingSettings summary: Create receipt processing settings description: This will create receipt processing settings operationId: createReceiptProcessingSettings requestBody: description: Receipt processing settings to create required: true content: application/json: schema: $ref: "#/components/schemas/UpsertReceiptProcessingSettingsCommand" responses: 200: description: The created receipt processing settings content: application/json: schema: $ref: "#/components/schemas/ReceiptProcessingSettings" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /receiptProcessingSettings/getPagedProcessingSettings: post: tags: - ReceiptProcessingSettings summary: Gets paged processing settings description: This will return paged processing settings operationId: getPagedProcessingSettings requestBody: description: Paging and sorting data required: true content: application/json: schema: $ref: "#/components/schemas/PagedRequestCommand" responses: 200: description: Paged processing settings content: application/json: schema: $ref: "#/components/schemas/PagedData" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" security: - bearerAuth: [ ] /receiptProcessingSettings/checkConnectivity: post: tags: - ReceiptProcessingSettings summary: Check receipt processing settings connectivity operationId: checkReceiptProcessingSettingsConnectivity requestBody: description: Receipt processing settings to check connectivity required: true content: application/json: schema: $ref: "#/components/schemas/CheckReceiptProcessingSettingsConnectivityCommand" responses: 200: description: The system task content: application/json: schema: $ref: "#/components/schemas/SystemTask" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" /systemSettings: get: tags: - SystemSettings summary: Get system settings description: This will get system settings operationId: getSystemSettings responses: 200: description: The system settings content: application/json: schema: $ref: "#/components/schemas/SystemSettings" 500: $ref: "#/components/responses/Internal" 403: $ref: "#/components/responses/Forbidden" put: tags: - SystemSettings summary: Update system settings description: This will update system settings operationId: updateSystemSettings requestBody: description: System settings to update required: true content: application/json: schema: $ref: "#/components/schemas/UpsertSystemSettingsCommand" responses: 200: description: The updated system settings content: application/json: schema: $ref: "#/components/schemas/SystemSettings" 500: $ref: "#/components/responses/Internal" 403: $ref: "#/components/responses/Forbidden" /import/importConfigJson: post: tags: - Import summary: Import config json description: This will import a config json operationId: importConfigJson requestBody: description: Config json to import required: true content: multipart/form-data: schema: $ref: "#/components/schemas/ConfigImportCommand" responses: 200: $ref: "#/components/responses/Ok" 500: $ref: "#/components/responses/Internal" 400: $ref: "#/components/responses/BadRequest" 403: $ref: "#/components/responses/Forbidden" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT responses: Ok: description: Request was successfully processed BadRequest: description: The request was malformed Forbidden: description: The request was not allowed Internal: description: There was an error processing the request schemas: ReceiptStatus: description: Status of a receipt type: string enum: - "OPEN" - "NEEDS_ATTENTION" - "RESOLVED" - "DRAFT" ItemStatus: type: string enum: - "OPEN" - "RESOLVED" - "DRAFT" GroupStatus: type: string enum: - "ACTIVE" - "ARCHIVED" GroupRole: type: string enum: - "OWNER" - "VIEWER" - "EDITOR" FilterOperation: type: string enum: - CONTAINS - EQUALS - GREATER_THAN - LESS_THAN UserRole: type: string enum: - ADMIN - USER SortDirection: type: string enum: - asc - desc - "" WidgetType: type: string enum: - "GROUP_SUMMARY" - "FILTERED_RECEIPTS" AiType: type: string enum: - "OPEN_AI_CUSTOM" - "OPEN_AI" - "GEMINI" - "OLLAMA" OcrEngine: type: string enum: - "TESSERACT" - "EASY_OCR" SystemTaskStatus: type: string enum: - "SUCCEEDED" - "FAILED" SystemTaskType: type: string enum: - "OCR_PROCESSING" - "CHAT_COMPLETION" - "MAGIC_FILL" - "QUICK_SCAN" - "EMAIL_READ" - "EMAIL_UPLOAD" - "SYSTEM_EMAIL_CONNECTIVITY_CHECK" - "RECEIPT_PROCESSING_SETTINGS_CONNECTIVITY_CHECK" - "RECEIPT_UPLOADED" - "PROMPT_GENERATED" AssociatedEntityType: type: string enum: - "SYSTEM_EMAIL" - "RECEIPT_PROCESSING_SETTINGS" - "PROMPT" AssociatedGroup: type: string enum: - "MINE" - "ALL" ImportType: type: string enum: - "IMPORT_CONFIG" BaseModel: type: object required: - id - createdAt properties: id: type: integer format: uint64 createdAt: type: string createdBy: type: integer format: uint64 default: 0 createdByString: type: string description: Created by entity's name default: "" updatedAt: type: string default: "" Category: type: object properties: createdAt: type: string createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Name of the category description: type: string description: Description of the category updatedAt: type: string x-go-name: UpdatedAt description: Category to relate receipts to UpsertCategoryCommand: required: - name type: object properties: id: type: integer description: Category id name: type: string description: Category name description: type: string description: Category description CategoryView: required: - id - name - numberOfReceipts type: object properties: createdAt: type: string createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Name of the category description: type: string description: Description of the category updatedAt: type: string numberOfReceipts: type: integer description: Number of receipts associated with this category description: Category to relate receipts to Comment: required: - comment - receiptId - userId - id type: object properties: additionalInfo: type: string description: Additional information about the comment comment: type: string description: Comment itself commentId: type: integer description: Comment foreign key used for repleis format: uint64 createdAt: type: string createdBy: type: integer format: uint64 id: type: integer format: uint64 receiptId: type: integer description: Receipt foreign key updatedAt: type: string userId: type: integer description: User foreign key format: uint64 description: User comment left on receipts FileData: required: - receiptId - id type: object properties: createdAt: type: string x-go-name: CreatedAt createdBy: type: integer format: uint64 x-go-name: CreatedBy fileType: type: string description: MIME file type x-go-name: FileType id: type: integer format: uint64 x-go-name: ID imageData: type: array description: Image data items: type: integer format: uint8 x-go-name: ImageData name: type: string description: File name x-go-name: Name receiptId: type: integer description: Receipt foreign key format: uint64 x-go-name: ReceiptId size: type: integer description: File size format: uint64 x-go-name: Size updatedAt: type: string x-go-name: UpdatedAt description: File data for images on a receipt x-go-package: receipt-wrangler/api/internal/models Group: required: - name - status - id - groupMembers - isAllGroup type: object properties: createdAt: type: string createdBy: type: integer format: uint64 groupSettings: $ref: "#/components/schemas/GroupSettings" groupMembers: type: array description: Members of the group items: $ref: "#/components/schemas/GroupMember" id: type: integer format: uint64 isDefault: type: boolean description: Is default group (not used yet) name: type: string description: Name of the group isAllGroup: type: boolean description: Is all group for user status: type: string $ref: "#/components/schemas/GroupStatus" updatedAt: type: string description: Group in the system x-go-package: receipt-wrangler/api/internal/models GroupMember: required: - groupId - groupRole - userId type: object properties: createdAt: type: string groupId: type: integer description: Group compound primary key format: uint64 groupRole: type: string $ref: "#/components/schemas/GroupRole" updatedAt: type: string x-go-name: UpdatedAt userId: type: integer description: User compound primary key format: uint64 x-go-name: UserID description: Group member x-go-package: receipt-wrangler/api/internal/models Item: required: - amount - chargedToUserId - name - receiptId - status type: object properties: IsTaxed: type: boolean description: Is taxed (not used) amount: type: string description: Amount the item costs chargedToUserId: type: integer description: User foreign key format: uint64 createdAt: type: string createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Item name receiptId: type: integer description: Receipt foreign key format: uint64 status: type: string $ref: "#/components/schemas/ItemStatus" updatedAt: type: string description: Itemized item on a receipt x-go-package: receipt-wrangler/api/internal/models Notification: required: - title - type - userId - id - body type: object properties: body: type: string description: |- Notification body requried: true x-go-name: Body createdAt: type: string x-go-name: CreatedAt createdBy: type: integer format: uint64 x-go-name: CreatedBy id: type: integer format: uint64 x-go-name: ID title: type: string description: Title x-go-name: Title type: $ref: "#/components/schemas/NotificationType" updatedAt: type: string x-go-name: UpdatedAt userId: type: integer description: User foreign key format: uint64 x-go-name: UserId description: Notification x-go-package: receipt-wrangler/api/internal/models NotificationType: type: string x-go-package: receipt-wrangler/api/internal/models Receipt: required: - amount - date - groupId - name - paidByUserId - status - id type: object properties: amount: type: string description: Receipt total amount categories: type: array description: Categories associated to receipt items: $ref: "#/components/schemas/Category" comments: type: array description: Comments associated to receipt items: $ref: "#/components/schemas/Comment" createdAt: type: string createdBy: type: integer format: uint64 date: type: string description: Receipt date groupId: type: integer description: Group foreign key format: uint64 id: type: integer format: uint64 imageFiles: type: array description: Files associated to receipt items: $ref: "#/components/schemas/FileData" name: type: string description: Receipt name paidByUserId: type: integer description: User paid foreign key format: uint64 receiptItems: type: array description: Items associated to receipt items: $ref: "#/components/schemas/Item" resolvedDate: type: string description: Date resolved status: type: string $ref: "#/components/schemas/ReceiptStatus" tags: type: array description: Tags associated to receipt items: $ref: "#/components/schemas/Tag" updatedAt: type: string createdByString: type: string description: Created by string, which is anything that is not a user description: Receipt Tag: required: - name type: object properties: createdAt: type: string x-go-name: CreatedAt createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Tag name updatedAt: type: string description: Tag to relate receipts to Dashboard: required: - id - name - userId type: object properties: createdAt: type: string x-go-name: CreatedAt createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Dashboard name groupId: type: integer format: uint64 description: Group foreign key userId: type: integer format: uint64 description: User foreign key updatedAt: type: string widgets: type: array description: Widgets associated to dashboard items: $ref: "#/components/schemas/Widget" description: Dashboard for a user Widget: required: - id - dashboardId type: object properties: createdAt: type: string x-go-name: CreatedAt createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Widget name dashboardId: type: integer format: uint64 description: Dashboard foreign key updatedAt: type: string widgetType: type: string $ref: "#/components/schemas/WidgetType" description: Type of widget configuration: type: object additionalProperties: { } description: Configuration of widget description: Widget related to a user's dashboard UpsertTagCommand: required: - name type: object properties: id: type: integer description: Tag id name: type: string description: Tag name description: type: string description: Tag description description: Tag to relate receipts to TagView: required: - id - name - numberOfReceipts type: object properties: createdAt: type: string createdBy: type: integer format: uint64 id: type: integer format: uint64 name: type: string description: Name of the tag description: type: string description: Description of the tag updatedAt: type: string numberOfReceipts: type: integer description: Number of receipts associated with this tag description: Tag to relate receipts to User: required: - username - displayName - isDummyUser - userRole - id type: object properties: password: type: string description: User's password username: type: string description: User's username used to login createdAt: type: string createdBy: type: integer format: uint64 defaultAvatarColor: type: string description: Default avatar color x-go-name: DefaultAvatarColor displayName: type: string description: Display name x-go-name: DisplayName id: type: integer isDummyUser: type: boolean description: Is dummy user x-go-name: IsDummyUser updatedAt: type: string x-go-name: UpdatedAt userRole: type: string $ref: "#/components/schemas/UserRole" description: User's role description: User in the system x-go-package: receipt-wrangler/api/internal/models UserView: required: - username - displayName - isDummyUser - userRole - id type: object properties: username: type: string description: User's username used to login createdAt: type: string createdBy: type: integer format: uint64 defaultAvatarColor: type: string description: Default avatar color displayName: type: string description: Display name id: type: integer isDummyUser: type: boolean description: Is dummy user updatedAt: type: string userRole: type: string $ref: "#/components/schemas/UserRole" description: User's role description: User in the system x-go-package: receipt-wrangler/api/internal/models UpdateProfileCommand: required: - displayName - defaultAvatarColor type: object properties: displayName: type: string description: User's displayName defaultAvatarColor: type: string description: Color of default avatar description: Command to update user's profile ResetPasswordCommand: required: - password type: object properties: password: type: string description: User's new password description: Command to reset user's password profile LoginCommand: required: - username - password type: object properties: username: type: string description: User's username password: type: string description: User's password SignUpCommand: required: - username - password - displayname type: object properties: username: type: string description: User's username password: type: string description: User's password displayName: type: string description: User's displayname isDummyUser: type: boolean description: Whether the user is a dummy user userRole: type: string $ref: "#/components/schemas/UserRole" description: User's role BulkStatusUpdateCommand: required: - status - receiptIds type: object properties: comment: type: string description: Optional comment to leave on each receipt status: type: string description: Status to update to receiptIds: type: array items: type: integer description: Receipt ids to update PagedRequestCommand: required: - page - pageSize type: object properties: page: type: integer description: Page number pageSize: type: integer description: Number of records per page orderBy: type: string description: field to order on sortDirection: type: string $ref: "#/components/schemas/SortDirection" PagedGroupRequestCommand: allOf: - $ref: "#/components/schemas/PagedRequestCommand" - type: object properties: filter: $ref: "#/components/schemas/GroupFilter" GroupFilter: type: object properties: associatedGroup: $ref: "#/components/schemas/AssociatedGroup" ReceiptPagedRequestCommand: required: - page - pageSize type: object properties: page: type: integer description: Page number pageSize: type: integer description: Number of records per page orderBy: type: string description: field to order on sortDirection: type: string $ref: "#/components/schemas/SortDirection" filter: $ref: "#/components/schemas/ReceiptPagedRequestFilter" ReceiptPagedRequestFilter: type: object properties: date: $ref: "#/components/schemas/PagedRequestField" amount: $ref: "#/components/schemas/PagedRequestField" name: $ref: "#/components/schemas/PagedRequestField" paidBy: $ref: "#/components/schemas/PagedRequestField" categories: $ref: "#/components/schemas/PagedRequestField" tags: $ref: "#/components/schemas/PagedRequestField" status: $ref: "#/components/schemas/PagedRequestField" resolvedDate: $ref: "#/components/schemas/PagedRequestField" createdAt: $ref: "#/components/schemas/PagedRequestField" PagedRequestField: required: - value - operation type: object properties: operation: type: string $ref: "#/components/schemas/FilterOperation" description: Filter operation value: oneOf: - type: string - type: integer - type: array items: type: string - type: array items: type: integer description: Field value SearchResult: required: - id - name - type - groupId - date type: object properties: id: type: integer name: type: string type: type: string groupId: type: integer date: type: string PagedData: required: - data - totalCount type: object properties: data: type: array items: oneOf: - $ref: "#/components/schemas/Receipt" - $ref: "#/components/schemas/Category" - $ref: "#/components/schemas/Tag" totalCount: type: integer FeatureConfig: required: - enableLocalSignUp - aiPoweredReceipts type: object properties: aiPoweredReceipts: type: boolean description: Whether AI powered receipts are enabled enableLocalSignUp: type: boolean description: Whether local sign up is enabled MagicFillCommand: required: - imageData - filename type: object properties: imageData: type: array items: type: integer description: Image data filename: type: string description: Name of file QuickScanCommand: required: - files - groupIds - statuses - paidByUserIds type: object properties: files: type: array items: type: string format: binary description: Files to quick scan groupIds: type: array items: type: integer description: Group foreign key paidByUserIds: type: array items: type: integer description: User foreign key statuses: type: array items: $ref: "#/components/schemas/ReceiptStatus" UserPreferences: allOf: - $ref: "#/components/schemas/BaseModel" - type: object required: - id - userId properties: id: type: integer description: User preferences id userId: type: integer description: User foreign key quickScanDefaultGroupId: type: integer description: Group foreign key default: 0 quickScanDefaultPaidById: type: integer description: User foreign key default: 0 quickScanDefaultStatus: type: string $ref: "#/components/schemas/ReceiptStatus" description: Default quick scan status default: "OPEN" GroupSettings: type: object required: - id - groupId properties: id: type: integer description: Group settings id groupId: type: integer description: Group foreign key emailIntegrationEnabled: type: boolean description: Whether email integration is enabled systemEmailId: type: integer description: System email foreign key systemEmail: $ref: "#/components/schemas/SystemEmail" emailToRead: type: string description: Email to read subjectLineRegexes: type: array description: Subject line regexes items: $ref: "#/components/schemas/SubjectLineRegex" emailWhiteList: type: array description: Email white list items: $ref: "#/components/schemas/GroupSettingsWhiteListEmail" emailDefaultReceiptStatus: type: string $ref: "#/components/schemas/ReceiptStatus" description: Default receipt status emailDefaultReceiptPaidById: type: integer description: User foreign key prompt: $ref: "#/components/schemas/Prompt" promptId: type: integer description: Prompt foreign key fallbackPrompt: $ref: "#/components/schemas/Prompt" fallbackPromptId: type: integer description: Fallback prompt foreign key createdAt: type: string createdBy: type: integer format: uint64 updatedAt: type: string SubjectLineRegex: type: object required: - id - groupSettingsId - regex properties: id: type: integer description: Subject line regex id groupSettingsId: type: integer description: Group settings foreign key regex: type: string description: Regex to match subject line createdAt: type: string createdBy: type: integer format: uint64 updatedAt: type: string GroupSettingsWhiteListEmail: type: object required: - id - groupSettingsId - email properties: id: type: integer description: Group settings email id groupSettingsId: type: integer description: Group settings foreign key email: type: string description: Email to match createdAt: type: string createdBy: type: integer format: uint64 updatedAt: type: string UpdateGroupSettingsCommand: type: object required: - systemEmailId - subjectLineRegexes - emailWhiteList properties: systemEmailId: type: integer description: System email foreign key emailIntegrationEnabled: type: boolean description: Whether email integration is enabled subjectLineRegexes: type: array description: Subject line regexes items: $ref: "#/components/schemas/SubjectLineRegex" emailWhiteList: type: array description: Email white list items: $ref: "#/components/schemas/GroupSettingsWhiteListEmail" emailDefaultReceiptStatus: type: string $ref: "#/components/schemas/ReceiptStatus" description: Default receipt status emailDefaultReceiptPaidById: type: integer description: User foreign key promptId: type: integer description: Prompt foreign key fallbackPromptId: type: integer description: Fallback prompt foreign key ReceiptFileUploadCommand: type: object required: - file - receiptId properties: file: type: string format: binary receiptId: type: integer description: Receipt foreign key encodedImage: type: string description: Base64 encoded image for file types that aren't viewable natively in the browser, such as PDFs FileDataView: allOf: - $ref: "#/components/schemas/BaseModel" - type: object required: - encodedImage - name properties: encodedImage: type: string description: Base64 encoded image name: type: string description: File name EncodedImage: type: object required: - encodedImage properties: encodedImage: type: string description: base64 encoded jpg UpsertDashboardCommand: type: object required: - name - groupId properties: name: type: string description: Dashboard name groupId: type: string description: Group foreign key widgets: type: array description: Widgets associated to dashboard items: $ref: "#/components/schemas/UpsertWidgetCommand" UpsertWidgetCommand: type: object required: - widgetType properties: name: type: string description: Widget name widgetType: type: string $ref: "#/components/schemas/WidgetType" description: Type of widget configuration: type: object additionalProperties: { } description: Configuration of widget AppData: type: object required: - claims - groups - users - userPreferences - featureConfig - categories - tags properties: claims: $ref: "#/components/schemas/Claims" groups: type: array description: Groups in the system items: $ref: "#/components/schemas/Group" users: type: array description: Users in the system items: $ref: "#/components/schemas/UserView" userPreferences: $ref: "#/components/schemas/UserPreferences" featureConfig: $ref: "#/components/schemas/FeatureConfig" categories: type: array description: Categories in the system items: $ref: "#/components/schemas/Category" tags: type: array description: Tags in the system items: $ref: "#/components/schemas/Tag" jwt: type: string description: JWT token refreshToken: type: string description: Refresh token TokenPair: type: object required: - jwt - refreshToken properties: jwt: type: string description: JWT token refreshToken: type: string description: Refresh token Claims: type: object required: - userId - userRole - displayName - defaultAvatarColor - username - iss - exp properties: userId: type: integer description: User foreign key default: 0 userRole: type: string $ref: "#/components/schemas/UserRole" description: User's role default: "USER" displayName: type: string description: Display name default: "" defaultAvatarColor: type: string description: Default avatar color default: "" username: type: string description: User's username used to login default: "" iss: type: string description: Issuer default: "" sub: type: string description: Subject default: "" aud: type: array items: type: string description: Audience default: [ ] exp: type: integer description: Expiration time default: 0 nbf: type: integer description: Not before default: 0 iat: type: integer description: Issued at default: 0 jti: type: string description: JWT ID default: "" LogoutCommand: type: object required: - refreshToken properties: refreshToken: type: string description: Refresh token UpsertReceiptCommand: type: object required: - name - amount - date - groupId - paidByUserId - status properties: name: type: string description: Receipt name amount: type: string description: Receipt total amount date: type: string description: Receipt date groupId: type: integer description: Group foreign key paidByUserId: type: integer description: User paid foreign key status: $ref: "#/components/schemas/ReceiptStatus" categories: type: array description: Categories associated to receipt items: $ref: "#/components/schemas/UpsertCategoryCommand" tags: type: array description: Tags associated to receipt items: $ref: "#/components/schemas/UpsertTagCommand" receiptItems: type: array description: Items associated to receipt items: $ref: "#/components/schemas/UpsertItemCommand" comments: type: array description: Comments associated to receipt items: $ref: "#/components/schemas/UpsertCommentCommand" UpsertItemCommand: type: object required: - amount - chargedToUserId - name - receiptId - status properties: amount: type: string description: Amount the item costs chargedToUserId: type: integer description: User foreign key name: type: string description: Item name receiptId: type: integer description: Receipt foreign key status: $ref: "#/components/schemas/ItemStatus" UpsertCommentCommand: type: object required: - comment - receiptId properties: comment: type: string description: Comment itself receiptId: type: integer description: Receipt foreign key userId: type: integer description: User foreign key SystemEmail: allOf: - $ref: "#/components/schemas/BaseModel" - type: object properties: host: type: string description: IMAP host port: type: integer description: IMAP port username: type: string description: IMAP username password: type: string description: IMAP password UpsertSystemEmailCommand: type: object required: - host - port - username - password properties: host: type: string description: IMAP host port: type: integer description: IMAP port username: type: string description: IMAP username password: type: string description: IMAP password SystemSettings: allOf: - $ref: "#/components/schemas/BaseModel" - type: object properties: enableLocalSignUp: type: boolean description: Whether local sign up is enabled default: false debugOcr: type: boolean description: Debug OCR default: false numWorkers: type: integer description: Number of workers to use default: 1 emailPollingInterval: type: integer description: Email polling interval default: 1800 receiptProcessingSettingsId: type: integer description: Receipt processing settings foreign key fallbackReceiptProcessingSettingsId: type: integer description: Fallback receipt processing settings foreign key UpsertSystemSettingsCommand: type: object properties: enableLocalSignUp: type: boolean description: Whether local sign up is enabled debugOcr: type: boolean numWorkers: type: integer description: Number of workers to use default: 1 emailPollingInterval: type: integer description: Email polling interval receiptProcessingSettingsId: type: integer description: Receipt processing settings foreign key fallbackReceiptProcessingSettingsId: type: integer description: Fallback receipt processing settings foreign key CheckEmailConnectivityCommand: type: object properties: id: type: integer description: System email id host: type: string description: IMAP host port: type: integer description: IMAP port username: type: string description: IMAP username password: type: string description: IMAP password SystemTask: allOf: - $ref: "#/components/schemas/BaseModel" - type: object properties: type: $ref: "#/components/schemas/SystemTaskType" status: $ref: "#/components/schemas/SystemTaskStatus" startedAt: type: string endedAt: type: string associatedEntityId: type: integer associatedEntityType: $ref: "#/components/schemas/AssociatedEntityType" ranByUserId: type: integer format: uint64 resultDescription: type: string childSystemTasks: type: array items: $ref: "#/components/schemas/SystemTask" GetSystemTaskCommand: allOf: - $ref: "#/components/schemas/PagedRequestCommand" - type: object properties: associatedEntityId: type: integer description: Associated entity id associatedEntityType: $ref: "#/components/schemas/AssociatedEntityType" ReceiptProcessingSettings: allOf: - $ref: "#/components/schemas/BaseModel" - type: object properties: name: type: string description: Name of the settings description: type: string description: Description of the settings aiType: $ref: "#/components/schemas/AiType" url: type: string description: URL for custom endpoints key: type: string description: Key for endpoints that require authentication model: type: string description: LLM model ocrEngine: $ref: "#/components/schemas/OcrEngine" prompt: $ref: "#/components/schemas/Prompt" promptId: type: integer description: Prompt foreign key UpsertReceiptProcessingSettingsCommand: type: object required: - name - aiType - numWorkers - ocrEngine - promptId properties: name: type: string description: Name of the settings description: type: string description: Description of the settings aiType: $ref: "#/components/schemas/AiType" url: type: string description: URL for custom endpoints key: type: string description: Key for endpoints that require authentication model: type: string description: LLM model ocrEngine: $ref: "#/components/schemas/OcrEngine" promptId: type: integer description: Prompt foreign key Prompt: allOf: - $ref: "#/components/schemas/BaseModel" - type: object required: - name - prompt properties: name: type: string description: Prompt name description: type: string description: Prompt description prompt: type: string description: Prompt text UpsertPromptCommand: type: object required: - name - prompt properties: name: type: string description: Prompt name description: type: string description: Prompt description prompt: type: string description: Prompt text CheckReceiptProcessingSettingsConnectivityCommand: type: object properties: id: type: integer description: Receipt processing settings id name: type: string description: Name of the settings aiType: $ref: "#/components/schemas/AiType" url: type: string description: URL for custom endpoints key: type: string description: Key for endpoints that require authentication model: type: string description: LLM model numWorkers: type: integer description: Number of workers to use ocrEngine: $ref: "#/components/schemas/OcrEngine" promptId: type: integer description: Prompt foreign key ConfigImportCommand: type: object required: - file properties: file: type: string format: binary description: Files to quick scan