This story is part of the fees/fines refactoring feature. Design doc: https://wiki.folio.org/pages/viewpage.action?pageId=36576978
Currently, calculations for fee/fine actions are happening on FE without any checks on the BE side.
Instead, when a value is entered in the amount field, an additional call to the "check" endpoint needs to be made prior to the action in order to check if this value is valid and if the action is allowed. After receiving a positive response from BE ("allowed": true), when a user proceeds with the fee/fine action, instead of updating Account and creating FeeFineAction objects directly UI needs to call the new endpoint with the same body.
Cancel doesn't have a "check" endpoint, it is triggered directly.
New endpoint to be added to the mod-feesfines module:
BE should take care of updating Account objects and creating new FeeFineAction objects.
- In case of success:
Status code: 201
- In case if the account is not found:
Status code: 404