Forum - Query Rapido Lending Requests from Task Lists API

  • This topic has 2 replies, 2 voices, and was last updated 2 months ago by Matt Niehoff.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #73685
    Matt Niehoff
    Participant

    Hi,

    We use the Get and Act on Lending Request API calls in the Task Lists API (https://developers.exlibrisgroup.com/alma/apis/tasklists/) to process our incoming lending requests.

    We use Act on Lending Requests where reported=N to mark new requests as “processed,” since this is the only op supported in the API.

    Unfortunately due to the limitations of the API (max 100 results, no paging, no get/post by request number) and the rare technical hiccup in processing, requests sometimes fall through the cracks and get marked reported when we did not see/receive the result.

    POST https://api-eu.hosted.exlibrisgroup.com/almaws/v1/task-lists/rs/lending-requests?apikey={apikey}&library={libraryName}&op=mark_reported&reported=N

    As a fail-safe for this, each night we query by each known partner code to see if there are any requests we get returned that are not in our database. This is the only way we’ve found to get around the 100 request limit, and that sometimes can be cutting it close during busy times.

    GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/task-lists/rs/lending-requests?library={libraryName}&apikey={apikey}&reported=Y&partner={partnerCode}

    Because Rapido requests do not have a partner code, we’ve had to add a name lookup table for when we receive these requests and this works ok, but we are unable to query back for any of these requests that might have been missed. When I try to query with the library name, I receive the message:

    “The parameter partner is invalid. Received: {library name}. Valid options are: a valid partner code.

    What are my options to query back any requests that have been migrated over from Rapido?

    Thanks,

    Matt Niehoff
    Minitex

    #74024
    Eyal Naamati
    Participant

    Hi Matt,
    I am not sure I understand what you mean by “we are unable to query back for any of these requests that might have been missed”
    Can you please send an example of an API call that fails?

    Thanks,
    Eyal

    #74045
    Matt Niehoff
    Participant

    Hi Eyal,

    Thanks for the response.

    Because the API is limited to 100 responses, I can’t do a generic query for requests marked reported and get all of the requests (as a reminder we use the POST action to mark requests as reported to indicate we’ve processed them).

    For example, running this query:

    GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/task-lists/rs/lending-requests?library=RES_SHARE&apikey={apikey}&reported=Y

    I get 100 records.

    <?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
    <user_resource_sharing_requests total_record_count=”100″>
    <user_resource_sharing_request>
    …..

    I’m not sure what order these are returned, but we have more than 100 requests in that status. To get around this, we try a few different parameters. We’ll look for BEING_PROCESSED and LOCATE_FAILED in the status parameter for example.

    One of the other parameters we use is the partner. This filter works for requests that have a partner code. For example here is a query for Northwestern requests that are in the BEING_PROCESSED status:

    GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/task-lists/rs/lending-requests?library=RES_SHARE&apikey={apikey}&status=BEING_PROCESSED&reported=Y&partner=NOW

    This works and I can query those requests. However, requests that come from Rapid have a library’s name in the response, rather than a partner code. The XML for a request from Bethel has this in the partner tag:

    <partner desc=”Bethel University – Bethel University Library” link=”https://api-na.hosted.exlibrisgroup.com/almaws/v1/partners/Bethel University – Bethel University Library”>Bethel University – Bethel University Library</partner>

    However, when I try to query by that:

    GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/task-lists/rs/lending-requests?library=RES_SHARE&apikey={apikey}&status=BEING_PROCESSED&reported=Y&partner=BETHEL%20UNIVERSITY%20-%20BETHEL%20UNIVERSITY%20LIBRARY

    I get the error:

    <?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
    <web_service_result xmlns=”http://com/exlibris/urm/general/xmlbeans”&gt;
    <errorsExist>true</errorsExist>
    <errorList>
    <error>
    <errorCode>40166410</errorCode>
    <errorMessage>The parameter partner is invalid. Received: BETHEL UNIVERSITY – BETHEL UNIVERSITY LIBRARY. Valid options are: a valid partner code.</errorMessage>
    <trackingId>E02-0609195043-7EEO7-AWAE1396249410</trackingId>
    </error>
    </errorList>
    </web_service_result>

    I might be missing/messing up something obvious, but is there a way to have a filter by partner name on these queries?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.