bic-org-uk / bic-lcf

BIC Library Communication Framework
https://bic-org-uk.github.io/bic-lcf
Other
7 stars 4 forks source link

Are the various HTTP commands part of the standard? #298

Closed franciscave closed 1 year ago

franciscave commented 1 year ago

The following enquiry has been received from a potential library user of LCF in Ireland. The enquiry has been anonymised.

Are the various HTTP commands part of the standard? For example, [one implementer] uses the following to check-in a book.

PUT /circulation/1.0/items/id/{id}/loans

Do all companies use the exact same ‘path’ when performing the same function? For example, is the command for checking in a book, the same as the above command in the case of [other implementers]?

Is the current REST specification sufficiently clear about the formulation of HTTP requests? The above appears to be a non-standard short-cut. This appears to relate to issue #218.

franciscave commented 1 year ago

The Technical Panel discussed this issue and agreed that the implementer's solution does not conform to what is expected in an LCF implementation.

Assuming that the terminal client knows the item ID (by scanning the barcode), there would need to be a request to retrieve the loan record associated with that item:

GET https://{lcf-server}/lcf/1.0/items/{item-id}/loans?status=01

This would retrieve the list of active loan IDs for records associated with the item, of which there could only be one.

The terminal would then be able to retrieve the active loan itself:

GET https://{lcf-server}/lcf/1.0/loans/{loan-id}

Finally, the terminal would be able to modify the loan to indicate that the item was being checked in:

PUT https://{lcf-server}/lcf/1.0/loans/{loan-id}

The first of these requests is not needed if the terminal already knows the loan ID.

The above is documented in the REST specification.

mdovey commented 1 year ago

Agreed to close at the 6 December 2022 Technical Panel.