bor_info

General Purpose

This service retrieves all information related to a given Patron: Global and Local records, Loan records, Loaned items records, Short doc record, Cash record, and so on, if the ID and verification code provided match.

If not, an error message is returned. Since the bor-info X-Service retrieves a very large amount of data, and not all of it may be relevant, you can choose to receive a part of the data, based on your needs.

Interface Type

X-Service

Product Version Compatibility

Version 18 and later

Input Parameters

1. LIBRARY – X (5).
2. BOR_ID – X (20).
3. VERIFICATION – X (20).
4. LOANS – X (1).
5. CASH – X (1).
6. FILTER_CASH – X (50).
7. HOLD – X (1).
8. FORMAT – X (1).

NOTE: Since this X-Service calls check_bor_id with the GUI check type, the Verification field is not mandatory.

  • Library: Enter the code of the library where the full information on the patron resides.
  • Bor_Id / Identification/ ID: Type the borrower ID (Patron) for which you want to receive full information.
  • Verification: Password of the borrower’s ID (Verification in Z308).
  • Loans: Controls the retrieval of loan information. This parameter is NOT mandatory. If it is not specified, then the default is Y. Possible Values:
    • Y (default) – Retrieves full information on the loan including item and brief title information.
    • N – Does not retrieve any loan information at all, that is, no <item-l> section appears in the output XML.
    • P – Only retrieves the item’s short bibliographic information (Z13) and tags with the due date for each loan. The due date will be retrieved in two tags:
    • <due-date>date</due-date>
    • <due-hour>hour</due-hour>
  • The date will be the effective due date.
  • A new tag is reported with each reported loan for both the Y and P options. The tag includes information on the currently incurred fines. The tag is as follows:
    • <current-fine>number</current-fine>.
      This tag is calculated per reported loan.
  • cash: Controls the retrieval of cash information. This parameter is NOT mandatory. If it is not specified, then the default is Y. Possible Values:
    • B – Only retrieves the balance. The balance is retrieved in two tags:
    • <balance>number</ balance>.
    • <sign>C/D</ sign>.For example:
    • <balance>150.50</ balance>.
    • <sign>D</ sign>.
    • Y (default) – Retrieves full information on the cash transaction (Z31), including item and brief title information.
    • N – Does not retrieve the cash transaction at all, that is, no <fine> section appears in the output XML.
    • O – Retrieves full information but only on open transactions, that is, similar to Y, except this is for open cash transaction (z31_status = ‘O’) only.
    • F – Filters by transaction type. The transaction types are specified in a separate parameter. If no filters are specified, then all transaction will be reported. Note that this option will report open transactions only, that is, it is similar to O, but only if the z31_type is one of the types specified under the filter_cash parameter.
      NOTE: In all values except N, two tags: <balance> & <sign> appear in the XML output. They come as a separate section, and not under the <fine> section.
  • filter_cash: This parameter is used when the cash parameter is set to F. It lists the types of transactions that will be reported, separated by an underscore, for example, filter-cash=0003_0005_0042.
    The number of transactions is limited to 10 different types. Transaction types MUST be separated by underscores, numeric, and exactly 4 digits long. For example, for transaction type =5, send 0005 under filter_cash.
  • hold: A parameter that will define whether or not to retrieve hold requests. This parameter is NOT mandatory. If it is not specified, then the default is Y.
    Possible Values:

    • Y (default) – Retrieves full information on holds (Z37) including item and brief title information.
    • N – Does not retrieve any information on holds, that is, no <item-h> section appears in the XML output.
    • P – Only the item short bibliographic information (Z13) and the Z37 tags that are listed below are reported:
    • <pickup location>
    • <last interest date>
    • <request status>
  • format: This parameter can be used to retrieve all Z304 (Addresses) and z308 (Patron ID) records. This parameter is NOT mandatory.
    It should be used as: ‘format=1’.
    For example:
    http://ram11:8995/X?op=bor-info&bor_id=00000012&verification=00000012&library=usm50&format=1

Output XML Format

The output XML includes the following information for the borrower ID (patron) you enter:

  • Global record of patron (Z303).
  • Local record of patron (Z305).
  • Addresses and phone numbers, personal record (Z304).
  • All loan records of the patron (Z36).
  • All item records which are loaned (Z30).
  • All short-doc records for loaned books (Z13).
  • All cash records of the patron (Z31).
  • All item records related to cash record (Z30).
  • All short-doc related to cash record (Z13).
  • All hold requests records of the patron (Z37).
  • All item records related to hold requests (Z30).
  • All short-Doc related to Hold requests (Z13).

Example

1. To retrieve all information for patron 00000012, enter the following URL:

http://ram11:8995/X?op=bor-info&bor_id=00000012&verification=00000012&library=usm50

If all goes well, the above example will generate XML output containing all relevant information (that is, <item-l> includes information from Z36 + Z30 + Z13, <fine> includes information from Z31 + Z30 + Z13, <item-h> includes information from Z37 + Z30 + Z13). As a great deal of data is retrieved, only the head of section is shown here in this example:

 <bor-info>
 <z303>
 <z304>
 <z305>
 <item-l>
   + <z36>
   + <z30>
   + <z13>
      <current-fine>17.50</current-fine>
  <due-date>24/10/2005</due-date>
  <due-hour>24:00</due-hour>
</item-l>
.... and so on for all loans for patron
<balance>61100.00</balance>
  <sign>D</sign>
<fine>
  + <z31>
  + <z30>
  + <z13>
</fine>
.... and so on for all cash for patron
<item-h>
  + <z37>
  + <z30>
  + <z13>
</item-h>


.... and so on for all hold requests for the patron.

<session-id>DPD3A7ER245EUPMV8UNJSS8A9NNT3LC8VUJ8Q8XUDQAN7FMAJE</session-id>
  </bor-info>

2. To retrieve the following information for patron 00000012:
Loans: The item’s short bibliographic information and calculated effective date per loan.
Cash: The balance.
Hold: No hold information is required.
Enter the following URL:

http://ram11:8995/X?op=bor-info&bor_id=00000012&verification=00000012&library=usm50&loans=P&cash=B&hold=N

If all goes well, the example above will generate XML output containing all relevant information (that is, <item-l> will include information extracted from Z36 + Z30 + Z13, <fine> will include information extracted from Z31 + z30 + Z13, and <item-h> will include information extracted from Z37 + Z30 + Z13). As a great deal of data is retrieved, only the head of the section is shown here in this example:

<bor-info>
 <z303>
 <z304>
 <z305>
 <item-l>
       <z13>
      <current-fine>17.50</current-fine>
  <due-date>24/10/2005</due-date>
  <due-hour>24:00</due-hour>
</item-l>


.... and so on for all loans for patron

<balance>61100.00</balance>
  <sign>D</sign>

Since only the balance has been requested, no <fine> section appears in the XML.
Since the user did not want to see hold requests data, no <item-h> section appears in the XML.

<session-id>DPD3A7ER245EUPMV8UNJSS8A9NNT3LC8VUJ8Q8XUDQAN7FMAJE</session-id>
</bor-info>

Possible Error Codes

1. If this x-service is activated without a Borrower ID having been entered, the following error message appears in the XML output:

< error>Bor_Id must be supplied</error>

2. If, for some reason, an error occurs when the system checks the verification:

< error>Error retrieving Patron System Key</error>

3. If a Global record (Z303) is not found for the given patron:

< error>Error retrieving Patron Record</error>

4. If the loans input parameter appears in the URL with a value other than Y, N, or P:

< error> Illegal character in parameter: Loans (must contain: Y or N or P or remain empty).</error>

5. If the cash input parameter appears in the URL with a value other than Y, N, B, O, or F:

< error>Illegal character in parameter: Cash (must contain: Y or N or B or O or F or remain empty).</error>

6. If the hold input parameter appears in the URL with a value other than Y, N, or P:

< error> Illegal character in parameter: Hold (must contain: Y or N or P or remain empty).</error>

7. If the cash parameter in the URL = F and filter_cash parameter is specified, but one (or more) of the transaction types specified contains more than four digits (for example, filter_cash=00034_…):

< error>Each transaction-type in parameter: Filter_Cash, separated by underline, must contain exactly 4 digits.</error>

8. If the cash parameter in the URL = F and filter_cash parameter is specified, but one (or more) of the transaction types specified contains an alphanumeric value (for example, filter_cash=00034_12ax_…):

< error>Each transaction-type in parameter: Filter_Cash, separated by underline, must be Numeric.</error>

9. If the cash parameter in the URL = F and filter_cash parameter is specified, but the list contains more than 10 transaction types (for example, filter_cash=00034_1223_1234_9876_0909_8887_3456_0003_0004_0045_00013):

< error>Filter_cash can hold up to 10 different types of transactions, separated by
underlines. You passed the limit.</error>