Address

General Purpose

The resource may be accessed with a GET method to retrieve a specific patron’s address information.

The resource may be accessed with a POST method to update the address information.

Product Version Compatibility

Versions 18, 20.1 and later

Interface Type

RESTful API

Hierarchy

Input Parameters

REST Resource IDs:

Patron ID: The Aleph patron system identifier.

Input URI

<Base URL>:/patron/<patron ID>/patronInformation/address

For example:

To retrieve the address infromation for the patron ID 00000036, use:

http://server.name:1892/rest-dlf/patron/00000036/patronInformation/address

Input XML

To update the patron address, use the same URL with a POST method. The input XML that is sent with the POST action must have the same format as in the below example, omitting only the fields that are labeled with the usage attribute set to Read-Only.

For example:

post_xml=<get-pat-adrs><reply-text>ok</reply-text><reply-code>0000</reply-code><address-information updateable="Y"><z304-address-1 usage="Mandatory" max_len="200">Dustin Aadland</z304-address-1><z304-address-2 usage="Optional" max_len="200">Hill Avenue</z304-address-2><z304-address-3 usage="Optional" max_len="200">Boston MA 90917</z304-address-3><z304-address-4 usage="Optional" max_len="200"></z304-address-4><z304-address-5 usage="Optional" max_len="200"></z304-address-5><z304-date-from usage="Mandatory">20010701</z304-date-from><z304-date-to usage="Mandatory">20151231</z304-date-to><z304-zip usage="Optional" max_len="9">90917</z304-zip><z304-telephone-1 usage="Optional" max_len="30"></z304-telephone-1><z304-telephone-2 usage="Optional" max_len="30"></z304-telephone-2><z304-telephone-3 usage="Optional" max_len="30"></z304-telephone-3><z304-telephone-4 usage="Optional" max_len="30"></z304-telephone-4><z304-sms-number usage="Optional" max_len="30">11111111</z304-sms-number><z303-want-sms usage="Optional">N</z303-want-sms><z303-plain-html usage="Optional" code="H">Attachment Only</z303-plain-html><z304-email-address usage="Optional" max_len="60">user.name@server.name.com</z304-email-address><mail-options usage="Read-Only"><mail-option code="P">Email Body Only</mail-option><mail-option code="H">Attachment Only</mail-option><mail-option code="B">Attachment an Email Body</mail-option><mail-option code="L">HTML Body Only</mail-option></mail-options></address-information></get-pat-adrs>

Output XML Format

The returned XML includes the patron’s holds lists per institution, or a specific hold’s information.

The information is exported as Z304 tags. Note the updateable attribute, which indicates whether or not the address may be updated in a POST action. The address may be updated only if the patron has a personal profile (Z61) that allowed updating the address.

The list of institutes can be limited to those in which the patron is active, depending on the institute’s setup of the FILTER-LIBRARY-CARD tab100 variable.

Address example:

<?xml version="1.0" encoding="UTF-8"?>
<get-pat-adrs>
  <reply-text>ok</reply-text>
  <reply-code>0000</reply-code>
  <address-information updateable="Y">
    <z304-address-1 usage="Mandatory" max_len="50">Linnie Abarca</z304-address-1>
    <z304-address-2 usage="Optional" max_len="50">Hill Avenue</z304-address-2>
    <z304-address-3 usage="Optional" max_len="50">Boston MA 90917</z304-address-3>
    <z304-address-4 usage="Optional" max_len="50">USA</z304-address-4>
    <z304-address-5 usage="Optional" max_len="50"/>
    <z304-date-from usage="Read-Only">19920716</z304-date-from>
    <z304-date-to usage="Read-Only">20031031</z304-date-to>
    <z304-zip usage="Optional" max_len="9">90917</z304-zip>
    <z304-telephone-1 usage="Optional" max_len="30">1-2-3723511</z304-telephone-1>
    <z304-telephone-2 usage="Optional" max_len="30">1-2-9998133</z304-telephone-2>
    <z304-telephone-3 usage="Optional" max_len="30"/>
    <z304-telephone-4 usage="Optional" max_len="30"/>
    <z304-sms-number usage="Optional" max_len="30">0544-593161</z304-sms-number>
    <z303-want-sms usage="Optional">N</z303-want-sms>
    <z304-email-address usage="Optional" max_len="60">patron.email@server.name</z304-email-address>
    <z303-plain-html usage="Optional">Attachment Only</z303-plain-html>
    <mail-options usage="Read-Only">
      <mail-option code="P">Email Body Only</mail-option>
      <mail-option code="H">Attachment Only</mail-option>
      <mail-option code="B">Attachment and Email Body</mail-option>
    </mail-options>
  </address-information>
</get-pat-adrs>

Note:

In Aleph 23 and later, the size (‘max_len’ attribute) of: <z304-email-address> is 200.

Possible Error Codes

02 : The patron ID is invalid

09 : Patron is not permitted to update address information

23 : Missing mandatory field(s) in address

30 : FROM date must be earlier than TO date