Patron

General Purpose

The resource may be accessed with a GET method to retrieve specific patron information from the patron home server.

This resource may be accessed with the GET method to retrieve new patron self-registration parameters on patron home server.

A new patron can self register with the PUT method after entering all required parameters.
The definition of parameters can be defined in SysAdmin –> Web Services –> Patron Self-Registration.
Last name and address line 1 are the required parameters.

Product Version Compatibility

Voyager 7.2.0 and later.
Voyager 9.0.0 and later for self registration capabilities.

Input Parameters

ParameterTypeDescriptionValueDefaultRequired
patron IDpath parameterVoyager system patron ID. The system ID can be retrieved from the Voyager circulation staff client interface or returned from the AuthenticatePatronService Web service with patron barcode and last name.stringNoneY, if requesting patron information
patron_homedbquery parameterVoyager patron home DB key.  Use the RESTful DB Info Service to retrieve the DB key.stringNoneY, if requesting patron information

Input XML Format

The following is an example of input to register a patron via HTTP PUT method:

<?xml version="1.0" encoding="UTF-8"?>
<new-patron-parameters>
    <institutionId>123abc</institutionId>
    <lastName>Smith</lastName>
    <primaryPhone>1-847-555-1234</primaryPhone>
    <address1>123 Some Street</address1>
    <state>XYZ</state>
    <country>ABC</country>
    <zipCode>12345</zipCode>
    <emailAddress>patron.name@exlibris.edu</emailAddress>
</new-patron-parameters>

Input URL Syntax

The following is an example of a URL to retrieve a patron record from the patron home server:

http://10.100.2.37:30114/vxws/patron/1000007?patron_homedb=1@QA20012DB20020613131313

The following is an example of a URL to retrieve the patron self-registration form from the patron home server via HTTP GET Method:

http://10.100.2.37:30114/vxws/patron

The same URL can be used to register a patron via HTTP PUT method.

Output XML Format

The following is an example of output from retrieving specific patron data from the patron home server:

<?xml version="1.0" encoding="UTF-8" ?>
<response>
  <reply-text>ok</reply-text>
  <reply-code>0</reply-code>
  <patron>
      <info type="Circulation Actions" href="http://10.100.2.37:30114/vxws/patron/1000007/circulationActions?patron_homedb=1@QA20012DB20020613131313" />
      <info type="Patron Information" href="http://10.100.2.37:30114/vxws/patron/1000007/patronInformation?patron_homedb=1@QA20012DB20020613131313" />
      <institution id="LOCAL">
         <instName>VOYDEV</instName>
      </institution>
  </patron>
</response>

The following patron record shows that the patron has activities in different institutions:

<?xml version="1.0" encoding="UTF-8" ?>
<response>
  <reply-text>ok</reply-text>
  <reply-code>0</reply-code>
  <patron>
      <info type="Circulation Actions" href="http://10.100.2.37:30314/vxws/patron/204/circulationActions?patron_homedb=1@DMADB20010103091142" />
      <info type="Patron Information" href="http://10.100.2.37:30314/vxws/patron/204/patronInformation?patron_homedb=1@DMADB20010103091142" />
      <info type="UBRequest" href="http://10.100.2.37:30314/vxws/patron/204/ubrequest?patron_homedb=1@DMADB20010103091142" allowed="Y" />
      <institution id="GWCC">
          <instName>ubgwcc720db</instName>
      </institution>
      <institution id="LOCAL">
          <instName>DMA</instName>
      </institution>
      <institution id="RSCC">
          <instName>ubrscc720db</instName>
      </institution>
  </patron>
</response>

The following patron record shows that the patron has a patron status like block messages:

<?xml version="1.0" encoding="UTF-8" ?>
<response>
  <reply-text>ok</reply-text>
  <reply-code>0</reply-code>
  <patron>
      <info type="Circulation Actions" href="http://10.100.2.37:30314/vxws/patron/211/circulationActions?patron_homedb=1@DMADB20010103091142" />
      <info type="Patron Information" href="http://10.100.2.37:30314/vxws/patron/211/patronInformation?patron_homedb=1@DMADB20010103091142" />
      <info type="Patron Status" href="http://10.100.2.37:30314/vxws/patron/211/patronStatus?patron_homedb=1@DMADB20010103091142" />
      <institution id="LOCAL">
        <instName>DEV720DMADB</instName>
      </institution>
  </patron>
</response>

The following is an output example of the patron self-registration from the patron home server
responding to the HTTP GET method.
Note that only one of <institutionId> or <SSN> fields will included in the reponse,
or neither, depending on the service configuration.

<?xml version="1.0" encoding="UTF-8" ?>
<response>
  <reply-text>ok</reply-text>
  <reply-code>0</reply-code>
  <new-patron-parameters>
      <firstName max_len="50" usage="Mandatory" />
      <lastName max_len="50" usage="Mandatory" />
      <primaryPhone max_len="25" usage="Mandatory" />
      <address1 max_len="100" usage="Mandatory" />
      <address2 max_len="100" usage="Optional" />
      <city max_len="40" usage="Mandatory" />
      <state max_len="7" usage="Mandatory" />
      <country max_len="20" usage="Mandatory" />
      <zipCode max_len="10" usage="Mandatory" />
      <emailAddress max_len="100" usage="Mandatory" />
  </new-patron-parameters>
</response>

The following is an example of response to patron self-registration
after successfully registration responding to HTTP PUT method.

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <reply-text>ok</reply-text>
    <reply-code>0</reply-code>
    <new-patron>
    <new-patron-id>1234567890</new-patron-id>
    <new-patron-group>123</new-patron-group>
    <new-patron-home-db-id>1@xxxxyyyyzz</new-patron-home-db-id>
    <new-patron-barcode>1234567890</new-patron-barcode>
    </new-patron>
<response>

Some examples of error response:

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <reply-text>Missing mandatory fields</reply-text>
    <reply-code>47</reply-code>
<response>

Or

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <reply-text>The service is not available</reply-text>
    <reply-code>60</reply-code>
</response>

Possible Error Codes

CodeDescription
7Missing mandatory fields
49Mailing address is empty
50Birth date field is invalid. (Only if birth date is included)
58Already registered. Please log in again or choose a different ID
60The service is not available
61Registration failed