How users request items
Last updated
Last updated
Users can use the website to request items to view in the library; we provide a series of APIs to help them do that.
See also
This is what the flow looks like:
The items API returns a list of dates (AvailableDates
) when the item can be viewed.
Once we have the latest Sierra item data:
If the item has the Sierra item location code "harop"
This means the item is held at Deepstore (off-site storage).
We request both Deepstore and Wellcome library open days from the content-api (https://api-stage.wellcomecollection.org/content/v0/venues?title=library%2Cdeepstore)
We find the 11th Deepstore working day (lead time is 10 days). The list of AvailableDates
is comprised of all Wellcome library opening days after that.
If the item has any other Sierra item location code
We request Wellcome library open days from the content-api (https://api-stage.wellcomecollection.org/content/v0/venues?title=library)
If the request is made on a closed day or before 10am on an open day, the list of AvailableDates
starts from the 2nd on the list returned by the content-api.
If the request is made after 10am on an open day, the list of AvailableDates
starts from the 3rd on the list returned by the content-api.
The response includes a nextOpeningDates
list for each venue requested, which is used by the itemsAPI to generate the list of AvailableDates
.
The nextOpeningDates
list is created from the venue's regular open days and exceptional closed days stored in the venues index. We start from a list of 50 days starting today, and filter out all regular open days and exceptional closed days.
The list starts today, unless today is a closed/non-working day.