Forum - Alma API – Item availability from barcode
- This topic has 3 replies, 2 voices, and was last updated 8 years, 3 months ago by Anonymous.
- AuthorPosts
- October 17, 2014 at 6:57 pm #33959AnonymousInactive
I see a related topic but it doesn’t seem to be quite the same question.
We are considering an application for our exit procedure where we would scan the barcode on an item and show whether that item was checked out or not.
What is the best way to do this using the Alma APIs?
If you used:
/almaws/v1/items?item_barcode={item_barcode}
is the loan status in the process_type field on the item? or do you then need to call this:
/almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}/booking-availability
If we actually needed details on the user the item was loaned to would we need to call this
/almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}/booking-availability
followed by
/almaws/v1/users/{user_id}
or is there a more direct way to do this?
October 19, 2014 at 11:08 am #35344AnonymousInactiveYes, the field <process_type> retrieved via /almaws/v1/items?item_barcode={item_barcode} can be used to find out if the item is on loan.
Identifying the user to whom the item is checked out – I’m afraid we don’t have an API for that.
The booking-availability API can be used only to get a list of periods in which specific item is unavailable for booking.
We will be looking into adding information about the user who checked out the item in the future.
Best regards,
Ori
Alma APIs TeamOctober 22, 2014 at 1:49 pm #35349AnonymousInactiveHi Ori,
Thanks. Two questions:1) I’m confused, can you clarify — if the booking-availability API returns “The Primary ID of the user who has the resource at the specified time. This is relevant in cases a user already requested the item or has it on loan. Will only be populated in item level queries.” and it returned an unavailability for the current period/day, why wouldn’t the user id that is returned that indicate who the item was on loan to that user?
2) When I make the /almaws/v1/items?item_barcode={item_barcode} with the format=json in the query string, it always returns xml – it seems to lose the format part of the request during the redirect. Is there a way to make this call and get json?
Thanks,
KarenOctober 23, 2014 at 12:12 pm #35351AnonymousInactiveHi Karen,
1. If it works for you – go ahead and use it. Only because this wasn’t the intention of this API I can’t recommend it.
2. Good catch! We will try to fix that soon. In the meantime please try sending the header Accept: application/json
Thanks,
Ori - AuthorPosts
- You must be logged in to reply to this topic.