GET /api/.../patrons/{id}/messages
Returns all messages associated with the patron.
| Name | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | The unique id assigned to the patron. |
{MessageType} values: 100 - system defined, 101 - Free text.
[
{
"PatronID": 357979,
"MessageType": 101,
"MessageID": 73,
"MessageValue": "This is a free text message for this patron!",
"HasPatronRead": false,
"Organization": "Main Public Library",
"Creator": "gsmith",
"Workstation": "CIRC-01",
"CreationDate": "2013-02-28T17:11:53.8205252-05:00",
"Modifier": "jones",
"ModificationDate": "2013-04-01T17:11:53.8205252-05:00"
},
{
"PatronID": 357979,
"MessageType": 100,
"MessageID": 11,
"MessageValue": "Renew your items online at http://qa-plato/polaris",
"HasPatronRead": false
"Organization": "Main Public Library",
"Creator": "gsmith",
"Workstation": "CIRC-01",
"CreationDate": "2013-02-28T17:11:53.8205252-05:00",
"Modifier": null,
"ModificationDate": null
}
]
| Code | Description |
|---|---|
| 200 | OK. Success |
| 404 | FAILURE. Invalid PatronID. |
POST /api/.../patrons/{id}/message
Add either a library-defined or free text message for a patron.
| Name | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | The unique id assigned to the patron. |
If creating a library-defined patron message, provide the following in the form/body of the request:
| Name | Type | Required | Description |
|---|---|---|---|
| MessageType | Integer | Yes | Use value '100' (library-defined) |
| MessageID | Integer | Yes | The ID of the library-defined message (from the list returned from the System Patron Message API call) |
If creating a free text patron message, provide the following in the form/body of the request:
| Name | Type | Required | Description |
|---|---|---|---|
| MessageType | Integer | Yes | Use value '101' (free text) |
| MessageValue | String | Yes | Free text message (up to 255 characters) |
The full Patron Message is returned upon success.
{
"PatronID": 357979,
"MessageType": 101,
"MessageID": 73,
"MessageValue": "This is a free text message for this patron!",
"HasPatronRead": false,
"Organization": "Main Public Library",
"Creator": "gsmith",
"Workstation": "CIRC-01",
"CreationDate": "2013-02-28T17:11:53.8205252-05:00",
"Modifier": null,
"ModificationDate": null
}
| Code | Description |
|---|---|
| 200 | OK. Success |
| 400 | FAILURE.
|
| 404 | FAILURE. Invalid PatronID. |
| 409 | CONFLICT. Patron record is secured. |
PUT /api/.../patrons/{id}/message/{messageid}
Modify either a library-defined or free text message for a patron.
| Name | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | The unique id assigned to the patron. |
| messageid | Integer | Yes | The id of the existing message being modified. |
| Name | Type | Required | Description |
|---|---|---|---|
| MessageType | Integer | Yes | Use value '100' (library-defined) |
| MessageID | Integer | Yes | The ID of the library-defined message that should replace the {messageid} provided on the url. |
If modifying a free text patron message, provide the following in the form/body of the request:
| Name | Type | Required | Description |
|---|---|---|---|
| MessageType | Integer | Yes | Use value '101' (free text) |
| MessageValue | String | Yes | Updated free text message (up to 255 characters) |
The full, updated Patron Message is returned upon success.
{
"PatronID": 357979,
"MessageType": 101,
"MessageID": 73,
"MessageValue": "This is the updated free text message for this patron!",
"HasPatronRead": false,
"Organization": "Main Public Library",
"Creator": "gsmith",
"Workstation": "CIRC-01",
"CreationDate": "2013-02-28T17:11:53.8205252-05:00",
"Modifier": "jones",
"ModificationDate": "2013-04-01T17:11:53.8205252-05:00"
}
| Code | Description |
|---|---|
| 200 | OK. Success |
| 400 | FAILURE.
|
| 404 | FAILURE.
|
| 409 | CONFLICT. Patron record is secured. |
DELETE /api/.../patrons/{id}/message/{messagetypeid}/{messageid}
Delete either a library-defined or free text message for a patron.
| Name | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | The unique id assigned to the patron. |
| messagetypeid | Integer | Yes | '100' for library-defined, '101' for free text. |
| messageid | Integer | Yes | The unique id assigned to the message. |
| Code | Description |
|---|---|
| 200 | OK. Success |
| 404 | FAILURE.
|
| 409 | CONFLICT. Patron record is secured. |