Allow Fines API to return closed fees in the /users/<userID>/fees/<feeID> endpoint
Something I have noticed is that the fines API has strange behavior when it comes to returning data. /users/<userID>/fees will return only fines for a certain status supplied in the query params, which defaults to active. This makes sense and is fine, but what doesn't make sense is that /users/<userID>/fees/<feeID> doesn't return closed (paid) fees. It returns this error message
{
"errorsExist": true,
"errorList": {
"error": [
{
"errorCode": "401873",
"errorMessage": "Request failed: API does not support closed fees.",
"trackingId": "E01-1412050816-2AZKJ-AWAE514295771"
}
]
},
"result": null
}
This is fairly strange, I would have expected for the fine to still be returned, especially considering that the status of the fine is returned as part of the body so the consumer could still see the status and do logic to filter out closed fees if they wanted. Or alternatively there could be a flag that the consumer sets (something like includeClosed = true/false) to allow the API to return these values
The use case for this is that we do a nightly reconcile of our transactions and run them again through our processors just to make sure nothing was missed, due to the sensitive nature of needing to get things to do with people's money done correctly. Our processors then do a lookup and check to see if it's a reconcile (receipt# in Alma = receipt# being processed) or if someone has done a duplicate payment somewhere along the line (receipt# in Alma is different to receipt# being processed). However this doesn't work because this endpoint doesn't allow us to lookup previously paid fees for a specific feeID
I know I could make a request to /users/<userID>/fees, with the filter of closed fines, but this is honestly a workaround and not a real solution. As I then have to search through all those closed fines in order to find the one that I want. As we continue to use Alma over the years this list could potentially be rather long for users that accrue lots of fees
tldr - behaviour seems strange for an endpoint to not return data for a fee that does exist when the endpoint's job is to return data for one specific record, no filtering required

-
Joe Ferguson commented
I would like to add extra content for Ex Libris. in 2019 the Fines/Fee API was expanded to include viewing CLOSED fines/fees from the user record using this call:
https://api-eu.hosted.exlibrisgroup.com/almaws/v1/users/<USERID>/fees?user_id_type=all_unique&status=CLOSED&apikey=<APIKEY>
but they never extended the ability to view individual fines/fees using this call even though the fine/fee link is in the list of closed fines/fees:
https://api-eu.hosted.exlibrisgroup.com/almaws/v1/users/<USERID>/fees/<FEEID>?user_id_type=all_unique&status=CLOSED&apikey=<APIKEY>