http://localhost:9130
Storage for scheduled notices
Retrieve a list of scheduled-notice items.
GET /scheduled-notice-storage/scheduled-notices
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
loanId=188522a4-a2df-4a48-ab3d-44b62daef27f
Returns a list of scheduled-notice items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of scheduled notices",
"type": "object",
"properties": {
"scheduledNotices": {
"description": "List of items",
"id": "scheduledNotices",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Scheduled patron notice",
"properties": {
"id": {
"type": "string",
"description": "UUID of scheduled task",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"loanId": {
"type": "string",
"description": "UUID of related loan for loan notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"requestId": {
"type": "string",
"description": "UUID of related request for request notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"feeFineActionId": {
"type": "string",
"description": "UUID of related action for fee/fine notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"recipientUserId": {
"type": "string",
"description": "Id of the user to whom this notice should be sent to",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"sessionId": {
"type": "string",
"description": "UUID which is the same for all notices generated in scope of the same check-in/check-out session",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"nextRunTime": {
"type": "string",
"format": "date-time",
"description": "Next run time"
},
"triggeringEvent": {
"type": "string",
"description": "Scheduled notice triggering event",
"enum": [
"Hold expiration",
"Request expiration",
"Due date",
"Overdue fine returned",
"Overdue fine renewed",
"Due date - with reminder fee",
"Aged to lost",
"Aged to lost - fine charged",
"Aged to lost & item returned - fine adjusted",
"Aged to lost & item replaced - fine adjusted",
"Title level request expiration"
]
},
"noticeConfig": {
"type": "object",
"description": "Scheduled notice configuration",
"properties": {
"timing": {
"type": "string",
"description": "Timing represents when we need to send notice, before, at or after loan due date",
"enum": [
"Upon At",
"Before",
"After"
]
},
"recurringPeriod": {
"type": "object",
"description": "Interval for recurring events",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration of the period, number of times the interval repeats; 0 should be used with days only and means until the end of the day"
},
"intervalId": {
"type": "string",
"description": "Interval for the period, e.g. hours, days or weeks",
"enum": [
"Minutes",
"Hours",
"Days",
"Weeks",
"Months"
]
}
},
"required": [
"duration",
"intervalId"
],
"additionalProperties": false
},
"templateId": {
"type": "string",
"description": "UUID of related template",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"format": {
"type": "string",
"description": "Notice format",
"enum": [
"Email",
"SMS",
"Print"
]
},
"sendInRealTime": {
"type": "boolean",
"description": "Real time notice flag"
}
},
"additionalProperties": false,
"required": [
"timing",
"templateId",
"format"
]
},
"metadata": {
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"type": "object",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"nextRunTime",
"noticeConfig"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"scheduledNotices"
]
}
Example:
{
"scheduledNotices": [
{
"id": "4413b99a-111a-48c0-a818-fa478cb0958e",
"loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
"nextRunTime": "2018-09-01T00:00:00.000+00:00",
"noticeConfig": {
"timing": "Before",
"recurringPeriod": {
"duration": 1,
"intervalId": "Days"
},
"templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
"format": "Email",
"sendInRealTime": true
}
}
],
"totalRecords": 1
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list scheduled-notices -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list scheduled-notices -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new scheduled-notice item.
POST /scheduled-notice-storage/scheduled-notices
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Scheduled patron notice",
"properties": {
"id": {
"type": "string",
"description": "UUID of scheduled task",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"loanId": {
"type": "string",
"description": "UUID of related loan for loan notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"requestId": {
"type": "string",
"description": "UUID of related request for request notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"feeFineActionId": {
"type": "string",
"description": "UUID of related action for fee/fine notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"recipientUserId": {
"type": "string",
"description": "Id of the user to whom this notice should be sent to",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"sessionId": {
"type": "string",
"description": "UUID which is the same for all notices generated in scope of the same check-in/check-out session",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"nextRunTime": {
"type": "string",
"format": "date-time",
"description": "Next run time"
},
"triggeringEvent": {
"type": "string",
"description": "Scheduled notice triggering event",
"enum": [
"Hold expiration",
"Request expiration",
"Due date",
"Overdue fine returned",
"Overdue fine renewed",
"Due date - with reminder fee",
"Aged to lost",
"Aged to lost - fine charged",
"Aged to lost & item returned - fine adjusted",
"Aged to lost & item replaced - fine adjusted",
"Title level request expiration"
]
},
"noticeConfig": {
"type": "object",
"description": "Scheduled notice configuration",
"properties": {
"timing": {
"type": "string",
"description": "Timing represents when we need to send notice, before, at or after loan due date",
"enum": [
"Upon At",
"Before",
"After"
]
},
"recurringPeriod": {
"type": "object",
"description": "Interval for recurring events",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration of the period, number of times the interval repeats; 0 should be used with days only and means until the end of the day"
},
"intervalId": {
"type": "string",
"description": "Interval for the period, e.g. hours, days or weeks",
"enum": [
"Minutes",
"Hours",
"Days",
"Weeks",
"Months"
]
}
},
"required": [
"duration",
"intervalId"
],
"additionalProperties": false
},
"templateId": {
"type": "string",
"description": "UUID of related template",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"format": {
"type": "string",
"description": "Notice format",
"enum": [
"Email",
"SMS",
"Print"
]
},
"sendInRealTime": {
"type": "boolean",
"description": "Real time notice flag"
}
},
"additionalProperties": false,
"required": [
"timing",
"templateId",
"format"
]
},
"metadata": {
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"type": "object",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"nextRunTime",
"noticeConfig"
]
}
Example:
{
"id": "4413b99a-111a-48c0-a818-fa478cb0958e",
"loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
"nextRunTime": "2018-09-01T00:00:00.000+00:00",
"noticeConfig": {
"timing": "Before",
"recurringPeriod": {
"duration": 1,
"intervalId": "Days"
},
"templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
"format": "Email",
"sendInRealTime": true
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created scheduled-notice item
Media type: application/json
Type: any
Example:
{
"id": "4413b99a-111a-48c0-a818-fa478cb0958e",
"loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
"nextRunTime": "2018-09-01T00:00:00.000+00:00",
"noticeConfig": {
"timing": "Before",
"recurringPeriod": {
"duration": 1,
"intervalId": "Days"
},
"templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
"format": "Email",
"sendInRealTime": true
}
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to add scheduled-notice -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create scheduled-notices -- unauthorized
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Delete scheduled notices by cql query
DELETE /scheduled-notice-storage/scheduled-notices
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
loanId=188522a4-a2df-4a48-ab3d-44b62daef27f
Successful deletion
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update scheduled-notice item with given {scheduled-noticeId}
PUT /scheduled-notice-storage/scheduled-notices/{scheduled-noticeId}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Scheduled patron notice",
"properties": {
"id": {
"type": "string",
"description": "UUID of scheduled task",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"loanId": {
"type": "string",
"description": "UUID of related loan for loan notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"requestId": {
"type": "string",
"description": "UUID of related request for request notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"feeFineActionId": {
"type": "string",
"description": "UUID of related action for fee/fine notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"recipientUserId": {
"type": "string",
"description": "Id of the user to whom this notice should be sent to",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"sessionId": {
"type": "string",
"description": "UUID which is the same for all notices generated in scope of the same check-in/check-out session",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"nextRunTime": {
"type": "string",
"format": "date-time",
"description": "Next run time"
},
"triggeringEvent": {
"type": "string",
"description": "Scheduled notice triggering event",
"enum": [
"Hold expiration",
"Request expiration",
"Due date",
"Overdue fine returned",
"Overdue fine renewed",
"Due date - with reminder fee",
"Aged to lost",
"Aged to lost - fine charged",
"Aged to lost & item returned - fine adjusted",
"Aged to lost & item replaced - fine adjusted",
"Title level request expiration"
]
},
"noticeConfig": {
"type": "object",
"description": "Scheduled notice configuration",
"properties": {
"timing": {
"type": "string",
"description": "Timing represents when we need to send notice, before, at or after loan due date",
"enum": [
"Upon At",
"Before",
"After"
]
},
"recurringPeriod": {
"type": "object",
"description": "Interval for recurring events",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration of the period, number of times the interval repeats; 0 should be used with days only and means until the end of the day"
},
"intervalId": {
"type": "string",
"description": "Interval for the period, e.g. hours, days or weeks",
"enum": [
"Minutes",
"Hours",
"Days",
"Weeks",
"Months"
]
}
},
"required": [
"duration",
"intervalId"
],
"additionalProperties": false
},
"templateId": {
"type": "string",
"description": "UUID of related template",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"format": {
"type": "string",
"description": "Notice format",
"enum": [
"Email",
"SMS",
"Print"
]
},
"sendInRealTime": {
"type": "boolean",
"description": "Real time notice flag"
}
},
"additionalProperties": false,
"required": [
"timing",
"templateId",
"format"
]
},
"metadata": {
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"type": "object",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"nextRunTime",
"noticeConfig"
]
}
Example:
{
"id": "4413b99a-111a-48c0-a818-fa478cb0958e",
"loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
"nextRunTime": "2018-09-01T00:00:00.000+00:00",
"noticeConfig": {
"timing": "Before",
"recurringPeriod": {
"duration": 1,
"intervalId": "Days"
},
"templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
"format": "Email",
"sendInRealTime": true
}
}
Item successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to update scheduled-notice -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"scheduled-notice not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Retrieve scheduled-notice item with given {scheduled-noticeId}
GET /scheduled-notice-storage/scheduled-notices/{scheduled-noticeId}
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Scheduled patron notice",
"properties": {
"id": {
"type": "string",
"description": "UUID of scheduled task",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"loanId": {
"type": "string",
"description": "UUID of related loan for loan notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"requestId": {
"type": "string",
"description": "UUID of related request for request notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"feeFineActionId": {
"type": "string",
"description": "UUID of related action for fee/fine notices",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"recipientUserId": {
"type": "string",
"description": "Id of the user to whom this notice should be sent to",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"sessionId": {
"type": "string",
"description": "UUID which is the same for all notices generated in scope of the same check-in/check-out session",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"nextRunTime": {
"type": "string",
"format": "date-time",
"description": "Next run time"
},
"triggeringEvent": {
"type": "string",
"description": "Scheduled notice triggering event",
"enum": [
"Hold expiration",
"Request expiration",
"Due date",
"Overdue fine returned",
"Overdue fine renewed",
"Due date - with reminder fee",
"Aged to lost",
"Aged to lost - fine charged",
"Aged to lost & item returned - fine adjusted",
"Aged to lost & item replaced - fine adjusted",
"Title level request expiration"
]
},
"noticeConfig": {
"type": "object",
"description": "Scheduled notice configuration",
"properties": {
"timing": {
"type": "string",
"description": "Timing represents when we need to send notice, before, at or after loan due date",
"enum": [
"Upon At",
"Before",
"After"
]
},
"recurringPeriod": {
"type": "object",
"description": "Interval for recurring events",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration of the period, number of times the interval repeats; 0 should be used with days only and means until the end of the day"
},
"intervalId": {
"type": "string",
"description": "Interval for the period, e.g. hours, days or weeks",
"enum": [
"Minutes",
"Hours",
"Days",
"Weeks",
"Months"
]
}
},
"required": [
"duration",
"intervalId"
],
"additionalProperties": false
},
"templateId": {
"type": "string",
"description": "UUID of related template",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"format": {
"type": "string",
"description": "Notice format",
"enum": [
"Email",
"SMS",
"Print"
]
},
"sendInRealTime": {
"type": "boolean",
"description": "Real time notice flag"
}
},
"additionalProperties": false,
"required": [
"timing",
"templateId",
"format"
]
},
"metadata": {
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"type": "object",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"additionalProperties": false,
"required": [
"nextRunTime",
"noticeConfig"
]
}
Example:
{
"id": "4413b99a-111a-48c0-a818-fa478cb0958e",
"loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
"nextRunTime": "2018-09-01T00:00:00.000+00:00",
"noticeConfig": {
"timing": "Before",
"recurringPeriod": {
"duration": 1,
"intervalId": "Days"
},
"templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
"format": "Email",
"sendInRealTime": true
}
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"scheduled-notice not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete scheduled-notice item with given {scheduled-noticeId}
DELETE /scheduled-notice-storage/scheduled-notices/{scheduled-noticeId}
Item deleted successfully
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to delete scheduled-notice -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"scheduled-notice not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator