Patron Associations

Associated patron record functions serve to link two or more patron records in such a way that when one record is open all records associated with it can be accessed from the Associations view of Patron Status. For example, all members of a family might be associated in order to allow one record to be easily checked when another is open.

List Patron Associations

GET /api/.../patrons/{id}/associations

Returns list of patrons (children, etc.) associated with the patron. The list is sorted by ModificationDate in descending order.

Required Permissions

Permission IDs found here.

Name
AccessPatronServices_Allow
PatronStatus_Access
PatronStatus_DisplayAssociations

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.

Response Information

The associated patron list is returned upon success.

Example
application/json, text/json
[
    {
        "LinkedPatronID":249531,
        "Barcode":"1001600072547",
        "PatronName":"Melody A Roman",
        "BranchName":"Gloversville Public Library",
        "Note":null,
        "BlockMe":false,
        "AllowMe": false,
        "OrganizationID": 3
    },
    {
        "LinkedPatronID":349011,    
        "Barcode":"1000501293228",
        "PatronName":"Miriam Roman",
        "BranchName":"Saratoga Springs Public Library",
        "Note":null,
        "BlockMe":true,
        "AllowMe": false,
        "OrganizationID": 3
    }
]

Add a Patron Association

POST /api/.../patrons/{id}/associations

Add one or multiple associations for a patron.

Required Permissions

Permission IDs found here.

Name
CreatePatronAssociations_Allow

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.
POST Form Data
Name Type Required Description
associations DtoPatronAssociationInfo Yes Array of DtoPatronAssociationInfo objects
Form Data Example
* The 'Note' field is truncated to 255 characters.
[
    {
        "LinkedPatronId":189172,
        "Note":"Stepson",
        "BlockMe":false
    },
    {
        "LinkedPatronId":189171,
        "Note":"Stepdaughter",
        "BlockMe":false
    }
]

Response Information

The associated patron list is returned upon success.

Example
application/json, text/json
[
    {
        "LinkedPatronID":249531,
        "Barcode":"1001600072547",
        "PatronName":"Melody A Roman",
        "BranchName":"Gloversville Public Library",
        "Note":null,
        "BlockMe":false,
        "AllowMe": false,
        "OrganizationID": 3
    },
    {
        "LinkedPatronID":349011,    
        "Barcode":"1000501293228",
        "PatronName":"Miriam Roman",
        "BranchName":"Saratoga Springs Public Library",
        "Note":null,
        "BlockMe":true,
        "AllowMe": false,
        "OrganizationID": 3
    }
]

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE.
  • DtoPatronAssociationInfo list is null
  • Invalid linked patronID
  • Associated patron record already exists with id
404 FAILURE. Invalid PatronID.
409 CONFLICT. Patron record is secured.

Modify associated patron

PUT /api/.../patrons/{id}/associations

Modify associated patron info for a patron.

Required Permissions

Permission IDs found here.

Name
ModifyPatronAssociations_Allow

Request Information

URL Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.
PUT Form Data
Name Type Required Description
association DtoPatronAssociationInfo Yes Array of DtoPatronAssociationInfo objects
Form Data Example
[
    {
        "LinkedPatronId":18234,
        "Note":"Uncle",
        "BlockMe":false
    },
    {
        "LinkedPatronId":189171,
        "Note":"Stepson",
        "BlockMe":false
    },
    {
        "LinkedPatronId":16224,
        "Note":"",
        "BlockMe":true
    }
]

Response Information

The associated patron list is returned upon success.

Example
application/json, text/json
[
    {
        "LinkedPatronID":249531,
        "Barcode":"1001600072547",
        "PatronName":"Melody A Roman",
        "BranchName":"Gloversville Public Library",
        "Note":null,
        "BlockMe":false,
        "AllowMe": false,
        "RecordStatusID": 1,
        "OrganizationID": 3
    },
    {
        "LinkedPatronID":349011,    
        "Barcode":"1000501293228",
        "PatronName":"Miriam Roman",
        "BranchName":"Saratoga Springs Public Library",
        "Note":null,
        "BlockMe":true,
        "AllowMe": false,
        "RecordStatusID": 1,
        "OrganizationID": 3
    }
]

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE.
  • DtoPatronAssociationInfo is null
  • Invalid linked patronID
  • Associated patron record does not exist
404 FAILURE. Invalid PatronID.
409 CONFLICT. Patron record is secured.

Delete a Patron Association

DELETE /api/.../patrons/{id}/associations/{associationid},{associationid},{associationid}

Delete one or more associated patrons for a patron.

Required Permissions

Permission IDs found here.

Name
DeletePatronAssociations_Allow

Request Information

URL Parameters
Name Type Required Description
associationid Integer Yes The unique id assigned to the patron.
id Integer Yes One or more (comma separated) patron association IDs to delete

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE.
  • Invalid linked patronID
  • Associated patron record does not exist
404 FAILURE. Invalid PatronID.
409 CONFLICT. Patron record is secured.