📇
Catalogue API
  • Catalogue API
  • developers
  • How users request items
  • Search
    • Current queries
      • images
      • Query structure
    • Search
      • Changelog
      • Collecting data
      • Query design
      • Query design
      • wellcomecollection.org query development index
      • Reporting and metrics
      • Work IDs crib sheet
      • Analysis
        • Less than 3-word searches
        • Subsequent searches
        • Searches with 3 words or more
      • Hypotheses
        • Behaviours
        • Concepts, subject, and another field
        • Concepts, subjects with other field
        • Concepts, subjects
        • Contributor with other field
        • Contributors
        • Further research and design considerations
        • Genre with other field
        • Genres
        • Mood
        • Phrases
        • Reference number with other field
        • Reference numbers
        • Search scenarios
        • Synonymous names and subjects
        • Title with other field
        • Titles
      • Relevance tests
        • Test 1 - Explicit feedback
        • Test 2 - Implicit feedback
        • Test 3 - Adding notes
        • Test 4 - AND or OR
        • Test 5 - Scoring Tiers
        • Test 6 - English tokeniser and Contributors
        • Test 7 - BoolBoosted vs ConstScore
        • Test 8 - BoolBoosted vs PhaserBeam
    • Rank
      • Rank cluster
      • Developing with rank
      • Testing
Powered by GitBook
On this page

How users request items

PreviousdevelopersNextSearch

Last updated 5 months ago

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:

```mermaid
sequenceDiagram
     participant user
     participant front end
     participant works API
     participant items API
     participant requests API
     participant Sierra
     participant content api

     user->>front end: views a works page<br/> with items

     front end->>works API: get information about<br/>items on a work
     works API-->>front end: OK

     front end->>items API: get up-to-date status of items<br/>using catalogue ID
     items API->>works API: get matching Sierra IDs<br/>for catalogue IDs
     works API-->>items API: OK
     items API->>Sierra: get latest Sierra item data
     Sierra-->>items API: OK

     items API ->> content api: get nextOpeningDates for venue(s) that matches the item's<br/>Sierra location code

     items API->>front end: returns items with up-to-date status<br/> and available dates for pick up (1)
     front end->>front end: render items with<br/>updated information

     user->>front end: clicks "Request item"
     front end->>requests API: request an item using catalogue ID
     requests API->>works API: get matching Sierra IDs<br/>for catalogue IDs
     works API-->>requests API: OK
     requests API->>Sierra: place request in<br/>Sierra
     Sierra-->>requests API: OK
     requests API->>front end: return result of request to user
```

(1) Available dates for pickup

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 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

If the request is made on a closed day or before 10am on an open day, the list of AvailableDatesstarts 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.

NOTE on the content-api /venues endpoint

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.

We request both Deepstore and Wellcome library open days from the content-api ()

We request Wellcome library open days from the content-api ()

https://api-stage.wellcomecollection.org/content/v0/venues?title=library%2Cdeepstore
https://api-stage.wellcomecollection.org/content/v0/venues?title=library
How does item requesting work?