Patrons can be blocked for many reasons. They can be pre-defined blocks set up in the system, or they can be free-text blocks.
GET /api/.../patronblocks?orgID={orgID}
Retrieve the list of library-defined blocks for a given organization ID.
none
Name | Type | Required | Description |
---|---|---|---|
orgID | Integer | Yes | ID of branch organization |
List of system-defined patron blocks
[
{
"BlockID": 1,
"Description": "See Note"
},
{
"BlockID": 2,
"Description": "Paid user fee at MEC"
},
{
"BlockID": 3,
"Description": "Paid non-resident at WAT"
}
]
Code | Description |
---|---|
200 | OK. Success |
404 | FAILURE. Invalid organization ID specified. |
GET /api/.../patrons/{id}/blockssummary?logonBranchID={logonBranchID}&associatedblocks={false}
Return summary of blocks for patron.
This call requires the PatronStatus_DisplayPatronBlocks (ID: 71) permission.
Name | Type | Required | Description |
---|---|---|---|
id | Integer | Yes | The unique id assigned to the patron. |
logonBranchID | Integer | Yes | Define this parameter in the request query string. |
associatedblocks | bool | Yes | Define this parameter in the request query string. If true, returns associated patron blocks only. |
[
{
"PatronID": 1,
"PatronFullName": "sample string 2",
"BlockType": 3,
"BlockID": 4,
"BlockDescription": "sample string 5"
},
{
"PatronID": 1,
"PatronFullName": "sample string 2",
"BlockType": 3,
"BlockID": 4,
"BlockDescription": "sample string 5"
},
{
"PatronID": 1,
"PatronFullName": "sample string 2",
"BlockType": 3,
"BlockID": 4,
"BlockDescription": "sample string 5"
}
]
Code | Description |
---|---|
200 | OK. Success |
403 | FAILURE. User or workstation is not privileged. |
404 | FAILURE. Invalid Patron ID. |
GET /api/.../patrons/{patronid}/blocks/freetext/{blockid}
Get the details about a free-text block for a patron.
This call requires the PatronStatus_DisplayPatronBlocks (ID: 71) permission.
Name | Type | Required | Description |
---|---|---|---|
patronid | Integer | Yes | The unique id assigned to the patron. |
blockid | Integer | Yes | The unique id assigned to the block. |
{
"PatronID": 588441,
"PatronFullName": "Johnson, Steve L",
"BlockID": 75248,
"BlockDescription": "Patron owes more than $50.00 in late fees.",
"CreatorID": 177,
"CreatorName": "Joe.Smith",
"CreationDate": 2016-12-11T08:43:23.743-04:00,
"OrganizationID": 14,
"OrganizationName": "Red Rock Public Library",
"WorkstationID": 842,
"WorkstationName": "JOE-PC",
"ModifierID": 1051,
"ModifierName": "Jane.Stevens",
"ModificationDate": 2017-09-17T10:42:05.816-04:00
}
Code | Description |
---|---|
200 | OK. Success |
403 | FAILURE. User or workstation is not privileged. |
404 |
FAILURE.
|
409 | CONFLICT. Patron record is secured. |
GET /api/.../patrons/{patronid}/blocks/stops/{blockid}
Get the details about a library-defined block (stop) for a patron.
This call requires the PatronStatus_DisplayPatronBlocks (ID: 71) permission.
Name | Type | Required | Description |
---|---|---|---|
patronid | Integer | Yes | The unique id assigned to the patron. |
blockid | Integer | Yes | The unique id assigned to the block |
{
"PatronID": 588441,
"PatronFullName": "Johnson, Steve L",
"BlockID": 5,
"BlockDescription": "Message at Desk",
"CreatorID": 177,
"CreatorName": "Joe.Smith",
"CreationDate": 2016-12-11T08:43:23.743-04:00,
"OrganizationID": 14,
"OrganizationName": "Red Rock Public Library",
"WorkstationID": 842,
"WorkstationName": "JOE-PC",
"ModifierID": 1051,
"ModifierName": "Jane.Stevens",
"ModificationDate": 2017-09-17T10:42:05.816-04:00
}
Code | Description |
---|---|
200 | OK. Success |
403 | FAILURE. User or workstation is not privileged. |
404 |
FAILURE.
|
409 | CONFLICT. Patron record is secured. |
POST /api/.../patrons/{id}/blocks
Add a library-defined or free-text block for a patron. The type of block is determined by the BlockType value in the posted data. A value of 1 indicates a free-text block, a value of 2 indicates a library-defined block.
This call requires the PatronStatus_CreateDeletePatronBlocks (ID: 72) permission.
Name | Type | Required | Description |
---|---|---|---|
id | Integer | Yes | The unique id assigned to the patron. |
Provide the following in the form/body of the request:
Name | Type | Required | Description |
---|---|---|---|
BlockType | Integer | Yes | 1 (or 101) - Free-text, 2 (or 100) - Library-defined |
BlockID | Integer | (see note) | If BlockType is 2, this is the ID of the library-assigned block and is required. |
BlockDescription | Integer | (see note) | If BlockType is 1, this is the text of the free-text block and is required. It cannot be longer than 255 characters. |
{
"PatronID": 1,
"PatronFullName": "sample string 2",
"BlockType": 1,
"BlockID": 434,
"BlockDescription": "sample string 5"
}
Code | Description |
---|---|
200 | OK. Success |
400 | FAILURE.
|
403 | FAILURE. User or workstation is not privileged. |
404 | FAILURE. Invalid Patron ID. |
409 | CONFLICT. Patron record is secured. |
PUT /api/.../patrons/{patronid}/blocks/{blocktype}/{blockid}
Modify a library-defined or free-text block for a patron.
This call requires the PatronStatus_CreateDeletePatronBlocks (ID: 72) permission.
Name | Type | Required | Description |
---|---|---|---|
patronid | Integer | Yes | The unique ID assigned to the patron. |
blocktype | Integer | Yes | 1 (or 101) - Free-text, 2 (or 100) - Library-defined |
blockid | Integer | Yes | The unique ID assigned to the block being modified. |
Provide the following in the form/body of the request:
Name | Type | Required | Description |
---|---|---|---|
BlockID | Integer | (see note) | If BlockType is 2, this is the new ID of the library-assigned block and is required. |
BlockDescription | Integer | (see note) | If BlockType is 1, this is the new text of the free-text block and is required. It cannot be longer than 255 characters. |
{
"PatronID": 1,
"PatronFullName": "sample string 2",
"BlockType": 1,
"BlockID": 434,
"BlockDescription": "sample string 5"
}
Code | Description |
---|---|
200 | OK. Success |
400 | FAILURE.
|
403 | FAILURE. User or workstation is not privileged. |
404 | FAILURE. Invalid Patron ID. |
409 | CONFLICT. Patron record is secured. |
DELETE /api/.../patrons/{patronid}/blocks/{blocktype}/{blockid}
Delete a library-defined or free-text block for a patron.
This call requires the PatronStatus_CreateDeletePatronBlocks (ID: 72) permission.
Name | Type | Required | Description |
---|---|---|---|
patronid | Integer | Yes | The unique id assigned to the patron. |
blocktype | Integer | Yes | 1 (or 101) - Free-text, 2 (or 100) - Library-defined |
blockid | Integer | Yes | The unique id assigned to the block. |
Code | Description |
---|---|
200 | OK. Success |
403 | FAILURE. User or workstation is not privileged. |
404 | FAILURE.
|
409 | CONFLICT. Patron record is secured. |