This service renews the loan of a given item for a given patron.
The X-Service renews the loan only if it can be done. If, for example, there is a delinquency on the patron, the service does not renew the loan.
Product Version Compatibility
Version 18 and later
1. LIBRARY – X (5).
3. DOC_NUMBER – 9 (9).
4. ITEM_SEQUENCE . 9 (6).
5. ITEM_BARCODE . X (20).
6. BOR_ID . X (12).
For REC-KEY, only one of the DOC_NUMBER or ITEM_SEQUENCE parameters is required.
- Library: The library of the loaned Item.
- Rec_Key: Document Number + Item Sequence (Key of Z30).
- Item_Barcode: ID of the item (Z30).
- Bor_Id / Identification/ Id: Borrower ID (Patron) for renewing.—Optional
Output XML Format
The XML output includes the new due date and due hour if renew goes well. If the loan is overdue, the XML includes an indication that the loan is overdue and that a fine has been incurred as a result.
To renew a loan for patron 1930 for document number 50646, item sequence 20, and item barcode 32044024520026, enter the following URL:
The following URL produces the same results since the barcode is a unique identifier just like the combination of document number and item sequence:
If successful, the XML output is:
<?xml version = "1.0" encoding = "UTF-8"?> <renew> <reply>ok</reply> <due-date>20181120</due-date> <due-hour>1156</due-hour> <session-id>B5279PR9QL5XQUJGXXBDHT7BMBT2VRT7LMQ646G8P9FS6FY8IU</session-id> </renew>
Possible Error Codes
1. If the X-Service is activated without a document number + item sequence or item barcode having been given, the following error message appears in the XML output:
< error>Both Doc number and item sequence should be filled OR item barcode
2. If the number of renewal limit has been reached, the following error message appears in the XML output:
< error-text-1>Renewal limit reached – No. of renews: 07 Limit: 05.</error-text-1>
3. If the renew request is for a loan declared lost, the following error message appears in the XML output:
< error-text-2>Loan has been declared lost.</error-text-2>
4. If a library has not been given:
< error>Library must be included in service params.</error>
5. If the document number has not been given, and the barcode has been provided (for example, 39999024520025), but it does not exist in Z30:
< error>Item barcode: 39999024520025 can not be found in library USM50</error>
6. If the given document number and item sequence (or barcode) given by user are not in the loan 1record:
< error>Doc Num: 000000444 Item sequence: 000010 is not Loaned in library
7. If the Local record (Z305) cannot be found for the patron:
< error>Patron ID: 1975 Sub Library: WID has no Local Information.</error>
8. If the item cannot be found in the library (Z30):
< error>Doc Num: 000000444 Item sequence: USM50 can not be found in library</error>
9. If the new given due date (after renewal) is earlier than the current loan’s due date:
< error>New due date must be bigger than current loan’s due date</error>
10. If the provided patron ID does not match the borrower’s ID of the given item:
< error>Item provided is not loaned by given bor_id: 000000036</error>