Closed christinach closed 3 years ago
We decided with the Alma group to break down this issue in different scenarios. This will help to improve the way we retrieve currently the availability.
the structure of the bib object: https://developers.exlibrisgroup.com/alma/apis/docs/xsd/rest_bib.xsd/?tags=GET.
GET /almaws/v1/bibs/{mms_id}
Adding expand=p_avail: will add an AVA (availability) tag in the record with the physical availability:
https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/991129830000541?expand=p_avail
will return:
<datafield ind1=" " ind2=" " tag="AVA">
<subfield code="0">991129830000541</subfield> mms_id
<subfield code="8">224687740000541</subfield> holding_id
<subfield code="a">01PRI_INST</subfield> Institution code
<subfield code="b">MAIN</subfield> library value
<subfield code="c">Stacks</subfield> location desc
<subfield code="d">292 H31m</subfield> call_number
<subfield code="e">available</subfield> availability
<subfield code="f">1</subfield> total items
<subfield code="g">0</subfield> non available items
<subfield code="j">main</subfield> Location code
<subfield code="k">8</subfield> Call number type
<subfield code="p">1</subfield> priority
<subfield code="q">Main Library</subfield> library desc
</datafield>
Edit to add: Note that the availability here will be one of 3 values: "available", "unavailable", "check holdings"
for an electronic title:
GET /almaws/v1/bibs/{mms_id}
Adding expand=e_avail: will add an AVE (availability) tag in the record with the electronic availability:
https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/991946890000521?expand=e_avail
<datafield ind1=" " ind2=" " tag="AVE">
<subfield code="8">5310439700000521</subfield> portfolio
<subfield code="c">6110439730000521</subfield> collection identifier for the electronic resource
<subfield code="e">Available</subfield> activation status
<subfield code="m">North East Research Libraries Nature Single Titles Plus</subfield> Collection name
<subfield code="s"> Available from 1869 volume: 1 issue: 1.</subfield> coverage statement (as displayed in Primo's ViewIt mashup)
<subfield code="t">Nature</subfield> Interface name
<subfield code="u">publishing_base_url undefined?u.ignore_date_coverage=true&rft.mms_id=991946890000521</subfield>
</datafield>
From https://developers.exlibrisgroup.com/alma/apis/docs/bibs/R0VUIC9hbG1hd3MvdjEvYmlicy97bW1zX2lkfQ==/
AVA field is added per holding record (related to the input mms-id or to a related Bib records) as following: $$a - Institution code, $$b - Library code, $$c - Location display name, $$h - Campus, $$d - Call number, $$e - Availability (such as available, unavailable, or check_holdings), $$j - Location code, $$k - Call number type, $$f - total items, $$g - non available items, $$v - Calculated summary information, $$p - priority, $$0 - Bib record ID, $$8 - Holdings ID (of items on permanent location only), $$t - Holdings Information, $$q - library name. AVA is added also for items in temporary location. For such items, $$8 (holding id) will not be added.
AVE field is added per portfolio, as following: $$l -library code, $$m - Collection name, $$n - Public note, $$u - link to the bibliographic record's services page, $$s - coverage statement (as displayed in Primo's ViewIt mashup), $$t - Interface name. $$8 - portfolio pid, $$c - collection identifier for the electronic resource, $$e - activation status. $$i - Available for institution, $$d - Available for library, $$b - Available for campus. Note: $$u will be created based on a Customer Parameter in the "Customer Parameters" mapping table (module: general): publishing_base_url.
We identified with @mzelesky that the availability of a specific item misses sequence
and on_reserve
. We use them in: https://github.com/pulibrary/voyager_helpers/blob/26166ac7e68bfce5d5326f11c0a05933f2b07880/lib/voyager_helpers/liberator.rb#L283
GET /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items
This will retrieve the items list.
Edit to add: Note that we can get all item information by using a holdings number
ALL
If we want Item and label printing information, use item_pid from the record.
GET /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}
The item_data also includes barcode information. https://developers.exlibrisgroup.com/alma/apis/docs/xsd/rest_item.xsd/#item
barcode: The item's barcode. If not sent as part of the PUT or POST actions, Alma will generate a barcode based on the barcode generation rules.
Documentation for the order_status in Alma: https://knowledge.exlibrisgroup.com/Alma/Product_Documentation/010Alma_Online_Help_(English)/020Acquisitions/020Purchasing/030Searching_for_PO_Lines
In Alma we are able to customize the availability
labels. for example an item which is checked out has a label <base_status desc="**Item not in place**">0</base_status>
.
This will give us the ability to customize labels in Alma based on our needs and avoid some of the mapping we do on the front end (Orangelight).
example :
GET /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items
https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/99222241506421/holdings/2281569980006421/items
We need to find a journal with current issues.
We need to find if the sequence exists in somewhere else (@mzelesky suggests to check the inventory area of the apis. )
https://developers.exlibrisgroup.com/alma/apis/docs/xsd/rest_items.xsd/?tags=GET
(info returned from an item call)
related to : #712 related to : #573 https://developers.exlibrisgroup.com/alma/apis/docs/bibs/R0VUIC9hbG1hd3MvdjEvYmlicy97bW1zX2lkfQ==/
physical inventory information use "expand=p_avail":
digital inventory information use: "expand=d_avail"
We are not using full availability for digital inventory.electronic inventory information use: "expand=e_avail"