Patron Notice API version v1.1
https://github.com/folio-org/mod-notify
mod-notify API
This documents the API calls that can be made to post patron notices for users
Patron Notice
API for sendig Patron Notices
post
Send patron notice
post /patron-notice
Send patron notice
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Patron Notice",
"additionalProperties": false,
"properties": {
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"deliveryChannel": {
"description": "delivery channel",
"type": "string"
},
"templateId": {
"description": "The UUID of the notice template",
"type": "string"
},
"outputFormat": {
"description": "Output format e.g email",
"type": "string",
"default": "text/html"
},
"lang": {
"description": "Notice language",
"type": "string",
"default": "en"
},
"context": {
"type": "object",
"description": "Context object"
}
},
"required": [
"recipientId",
"templateId",
"deliveryChannel",
"outputFormat"
]
}
Example:
{
"recipientId": "e5f5a317-10a3-44e7-a944-0c3ac5a15940",
"deliveryChannel": "email",
"templateId": "e5f5a317-10a3-44e7-a944-0c3ac5a15940",
"outputFormat": "text/html"
}
HTTP status code 200
Patron notice successfully sent
HTTP status code 422
Unprocessable entity, e.g. incorrect template id or recipient id
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
HTTP status code 500
Internal Server Error
Body
Media type: text/plain
Type: any
Example:
Internal server error