Check Special Loan Date

Check Special Loan Date

PUT /rpc/.../circulation/checkspecialloandate

This method may be called to aid in creating a special loan due date. This method will calculate a due date adjusted by the library's operating hours and closed dates. The due date is adjusted if it falls outside of operating hours or on a closed day based on SA rules. An indication is provided if the date was adjusted due to date truncation for the permit overnight loans SA option or a closed day.

A message may be returned that should be displayed to an end user. If the 'PromptForOvernightLoan' value is set to 'true', this represents a special case where the user should be provided with a 'Yes/No' prompt. If they select 'Yes' to permit an overnight loan, use the calculated 'OvernightDueDate'. for the check out.

Request Information

Parameters
Name Type Required Description
checkSpecialLoanDateData DtoCheckSpecialLoanDateData Yes Define this parameter in the request body.
DtoCheckSpecialLoanDateData
Property Type Required Description
BranchID Int Yes The organization ID where the checkout is occurring. This must be a branch ID.
CheckedOutDate DateTime No The date and time the checkout is occurring.
LoanUnitsNum Int Yes The loan unit number. Example: if loan units type is set to days (1). A value of 6 would represent 6 days.

0 is allowed if the LoanUnitsType is set to days (1). This would create a loan due at the end of the day.
LoanUnitsType Int Yes Loan unit type:
  • 1 - Days
  • 2 - Hours
  • 3 - Minutes
Request body: Special loan due 4 days from the current server date/time.
application/json, text/json
{
    BranchID: 3,
    CheckedOutDate: null,
    LoanUnitsNum:4,
    LoanUnitsType: 1
}
Request body: Special loan due 4 days from the specified date/time.
application/json, text/json
{
    BranchID: 3,
    CheckedOutDate: "2014-02-13T10:25:00-05:00",
    LoanUnitsNum:4,
    LoanUnitsType: 1
}
Request body: Special loan due at the end of the day.
application/json, text/json
{
    BranchID: 3,
    CheckedOutDate: null,
    LoanUnitsNum:0,
    LoanUnitsType: 1
}

Response Information

DtoCheckDatesClosedResult
Property Type Description
AdjustedReason Int If the due date was adjusted, provides the reason for the adjustment.
  • 1 - ClosedDay/ClosedDate affected
  • 2 - Truncated due to hours of operation
DueDate DateTime Calculated due date.
DueDateAdjusted Boolean True indicates the supplied due date was adjusted due to operating hours or closed days.
PromptForOvernightLoan Boolean If set to 'true', the user should be provided with a prompt asking if they want to permit an overnight loan.
Message String Message to be displayed to user.
OvernightDueDate DateTime If operator chooses to permit the overnight loan, use this date.
Example: Returns simple due date. No prompts or messages need to be displayed.
application/json, text/json
{
    "AdjustedReason":0,
    "DueDate":"2014-02-15T23:59:59",
    "DueDateAdjusted":false,
    "PromptForOvernightLoan":false,
    "Message":null,
    "OvernightDueDate":null
}
Example: Due date is a closed date. Date has been adjusted.
application/json, text/json
{
    "AdjustedReason":1,
    "DueDate":"2014-02-18T23:59:59",
    "DueDateAdjusted":true,
    "PromptForOvernightLoan":false,
    "Message":"Due date is a closed date.  It will be moved to next open date.",
    "OvernightDueDate":null
}
Example: Returns a truncated date (closing time) and overnight due date if permitted.
application/json, text/json
{
    "AdjustedReason":0,
    "DueDate":"2014-02-13T20:00:00",
    "DueDateAdjusted":false,
    "PromptForOvernightLoan":true,
    "Message":"Item is due at library closing time.  Permit overnight loan?",
    "OvernightDueDate":"2014-02-14T11:00:00"
}

HTTP Response Codes

Code Description
200 OK. Success