ItemCheckoutPost
The ItemCheckout endpoint allows you to check out an item as a patron. This endpoint automatically tries to renew an item if the specified patron currently has the item checked out unless the transacting branch has renewals blocked in Polaris Administration (staff client).
| POST |
/public/1/patron/{PatronBarcode}/itemsout |
|
Authorization Required?
Yes
URI Parameters
| Name |
Required |
Description/Notes |
|
PatronBarcode |
Yes |
The patron's barcode. |
Request Body XML
<ItemCheckoutData>
<ItemBarcode>{barcode}</ItemBarcode>
<LogonBranchID>{organization-id}</LogonBranchID>
<LogonUserID>{user-id}</LogonUserID>
<LogonWorkstationID>{workstation-id}</LogonWorkstationID>
</ItemCheckoutData>
Request Body XML
|
Name |
Description/Notes |
| ItemBarcode |
Barcode of item. |
| LogonBranchID | Current branch (can default to System [1]). |
|
LogonUserID |
Current user (can default to PolarisExec). |
|
LogonWorkstationID |
Current workstation (can default to OPACDefault). |
XML Elements Returned
|
Name |
Description/Notes |
| PAPIErrorCode |
PAPI error code. Negative values represent errors and are defined here. Note: On successful completion, the PAPI error code is populated with a positive integer representing the number of rows returned. |
| ErrorMessage | Error or information message. |
| ItemRecordID | The Polaris item record identifier associated with the specified item barcode. |
| IsRenewal |
Indicates whether the item was already checked out to the specified patron.
|
| DueDate | Due date for returning the item. |
| ChargeAmount |
Charge for checking out the item. If the ChargeAmount > 0 and the PAPIErrorCode is 0 (Success), then the patron was charged the specified amount. Otherwise, the ChargeAmount is informational (in other words, the patron was not charged the specified amount if the PAPIErrorCode <> 0). |
| PatronBlockFlags |
Patron block reasons. When the PAPIErrorCode is -6101 (Checkout_Patron_Blocked), the PatronBlockFlags includes one or more of the following bit fields combined with a bitwise OR operation:
|
| ItemBlockFlags |
Item block reasons. When the PAPIErrorCode is -6112 (Checkout_Item_Blocked), the ItemBlockFlags includes one or more of the following bit fields combined with a bitwise OR operation:
|
| RenewalBlockFlags |
Renewal block reasons. When the PAPIErrorCode is -6119 (Checkout_Renewal_Blocked), the RenewalBlockFlags includes one or more of the following bit fields combined with a bitwise OR operation:
|
| MaterialTypeID | The material type code for item records (see MaterialTypesGet). |
| SelfCheckMediaTypeID | Numeric ID for the self-check media type configuration in the system. |
| IsMagnetic |
Indicates if the item is affected by magnetic fields
|
| CanDesensitize |
Indicates if the item has a security strip that can be desensitized
|
| DoubleSided |
Indicates if the item has both a spine and cover magnet to desensitize
|
| Unlocker |
Indicates if the item is stored in an AV case or security locker
|
| DDM_MediaFormatID |
For EnvisionWare RFID, this references the Danish Data Model (DDM) format for the item material type.
|
| Title | Primary title of the work. |
Example
https://localhost/REST/public/v1/1033/100/1/patron/21756003332022/itemsout
Body
<ItemCheckoutData>
<ItemBarcode>0000410443451</ItemBarcode>
<LogonBranchID>99</LogonBranchID>
<LogonUserID>1</LogonUserID>
<LogonWorkstationID>1243</LogonWorkstationID>
</ItemCheckoutData>
Return - Success
<ItemCheckoutResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PAPIErrorCode>0</PAPIErrorCode>
<ErrorMessage i:nil="true" />
<ItemRecordID>2265135</ItemRecordID>
<IsRenewal>false</IsRenewal>
<DueDate>2023-02-06T23:59:59</DueDate>
<ChargeAmount>0</ChargeAmount>
<PatronBlockFlags>0</PatronBlockFlags>
<ItemBlockFlags>0</ItemBlockFlags>
<RenewalBlockFlags>0</RenewalBlockFlags>
<MaterialTypeID>1</MaterialTypeID>
<SelfCheckMediaTypeID>1</SelfCheckMediaTypeID>
<IsMagnetic>false</IsMagnetic>
<CanDesensitize>true</CanDesensitize>
<DoubleSided>true</DoubleSided>
<Unlocker>false</Unlocker>
<DDM_MediaFormatID>1</DDM_MediaFormatID>
<Title>string</Title>
</ItemCheckoutResult>
Return - Failed
<ItemCheckoutResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PAPIErrorCode>-6112</PAPIErrorCode>
<ErrorMessage>The item cannot be checked out because the item is blocked.</ErrorMessage>
<ItemRecordID>689497</ItemRecordID>
<IsRenewal>false</IsRenewal>
<DueDate i:nil="true" />
<ChargeAmount>0</ChargeAmount>
<PatronBlockFlags>0</PatronBlockFlags>
<ItemBlockFlags>270336</ItemBlockFlags>
<RenewalBlockFlags>0</RenewalBlockFlags>
<MaterialTypeID>27</MaterialTypeID>
<SelfCheckMediaTypeID>0</SelfCheckMediaTypeID>
<IsMagnetic>false</IsMagnetic>
<CanDesensitize>false</CanDesensitize>
<DoubleSided>false</DoubleSided>
<Unlocker>false</Unlocker>
<DDM_MediaFormatID>4</DDM_MediaFormatID>
<Title>string</Title>
</ItemCheckoutResult>