Photo per Item

General Purpose

The resource may be accessed with a GET method to retrieve the photo request information for a specific patron and item. The photo request information includes the pickup location information and other information that the patron may submit when creating an item-level photo request.

The resource may be accessed with a PUT method to create a photo request for a specific patron and on a specific item.

Product Version Compatibility

Versions 22.01 and later.

Interface Type

RESTful API

Hierarchy

Photo per Item

 

Input Parameters

REST Resource IDs:

Patron ID: The Aleph patron system identifier.

Record ID: The Aleph BIB record identifier. The identifier is composed of the BIB library code + the system number. For example, USM01000050362

Item ID: The Aleph item record identifier. The item ID may be used to fetch a specific item’s information. The identifier is composed of the ADM library code + the item record key. For example, USM50000238843000320.

Input URI

<Base URL>:patron/<patron ID>/record/<record ID>/items/<Item ID>/photo

For example:

To retrieve the photo request information for a specific item that belongs to BIB record 00050362 and for the patron ID 00000036, use:

http://server.name:1892/rest-dlf/patron/00000036/record/USM01000028084/items/USM50000028084000010/photo 

Input XML

To create a new item-level photo request, use the same URL with a PUT method of HTTP.
The request “Body” of the “PUT” method must contain input XML with the Photo request details.

The PUT XML must have the following structure:

post_xml=<?xml version="1.0"?>
<photo-request-parameters>
  <pickup-location>WID</pickup-location>
  <pages>2</pages>
</photo-request-parameters>

Output XML Format

The returned XML includes information to enable the patron to create a photo request on the item. For example, the response includes a list of the allowed pickup locations. Every field that is marked with the usage attribute may be used by the patron for creating the photo request.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<get-item-photo>
  <reply-text>ok</reply-text>
  <reply-code>0000</reply-code>
  <photo allowed="Y">
    <pickup-locations default="Y" usage="Mandatory">
      <pickup-location code="WID">Main Library</pickup-location>
    </pickup-locations>
    <note type="info">Item is on an open shelf.</note>
    <note type="info">Item status: Regular loan (01) Call number: PQ2631.R63 T413 1993,</note>
    <note type="info">Item Description:</note>
    <sub-author usage="Optional" max_len="50"/>
    <sub-title usage="Optional" max_len="100"/>
    <pages usage="Mandatory" max_len="30"/>
    <note-1 usage="Optional" max_len="50"/>
    <note-2 usage="Optional" max_len="50"/>
    <add-info usage="Optional" max_len="600"/>
    <requester-name usage="Optional" max_len="100"/>
  </photo>
</get-item-photo>

The pickup location must be supplied as code.
If a new request was successfully created using the PUT method, a reply such as the following will be reported:

<?xml version="1.0" encoding="UTF-8"?>
<put-item-photo>
  <reply-text>ok</reply-text>
  <reply-code>0000</reply-code>
  <create-photo>
    <note type="info">Action Succeeded</note>
  </create-photo>
</put-item-photo>

Possible Error Codes

0508 Sublibrary doesn’t exist

0511 Invalid open date

0520 Record number must be numeric

0525 Invalid character set

0507 pickup location is not valid

0546 Mandatory parameters are missing

0547 Invalid update date

0548 Open date later then update date

0549 Request number must be numeric

0550 Charge must be set for photo request

0551 Error in photo request