https://github.com/folio-org/mod-calendar
This module provides a backend for the calendar functionalities
List actual opening hours including exceptions for custom date range. Mainly used by calendar display and provides opening information for loan rules. The response contains only the openings closed times are not included.
GET /calendar/periodsFilter for service point. In case of parameter absence all service point will be included in response.
Filter for start date (ISO 8601 date format). The parameter is inclusive.
Example:
2018-05-01Filter for end date (ISO 8601 date format). The parameter is inclusive.
Example:
2018-05-31In case of true all days will have value even if it is closing time or not
In case of true exceptional openings are overriding regular opening and in this case regular opening is not included in the response
Skip over a number of elements by specifying an offset value for the query
Example:
0Limit the number of elements returned in the response
Example:
10Requested language. Optional. [lang=en]
Returns a list of period items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hours collection",
"type": "object",
"description": "List actual opening hours",
"properties": {
"openingPeriods": {
"type": "array",
"description": "Opening sor a specific date",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hours",
"javaType": "org.folio.rest.jaxrs.model.OpeningHoursPeriod",
"description": "Description of an opening of for a specific date.",
"properties": {
"openingDay": {
"description": "Description of opening",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
},
"date": {
"type": "string",
"description": "Date when the openingDay is valid",
"format": "date-time"
}
},
"additionalProperties": false
}
},
"totalRecords": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"openingPeriods",
"totalRecords"
]
}Example:
{
"openingPeriods": [
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-10-01T00:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-10-08T00:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-10-15T00:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-10-22T00:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-10-29T01:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-11-05T01:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-11-12T01:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-11-19T01:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": false
},
"date": "2018-11-26T01:00:00.000+00:00"
},
{
"openingDay": {
"openingHour": [
{
"startTime": "10:00",
"endTime": "12:00"
},
{
"startTime": "14:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true,
"exceptional": true
},
"date": "2019-08-01T00:00:00.000+00:00"
}
],
"totalRecords": 40
}
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 periods -- malformed parameter 'query', syntax error at column 6Not found. There is no service point with the given ID
Internal server error
Media type: text/plain
Type: any
Example:
internal server error, contact administratorList library hours period. The default response contains the period names and its dates.
GET /calendar/periods/{servicePointId}/periodInclude opening days in response.
Include past openings in response.
Filter for exceptional library hours periods.
Requested language. Optional. [lang=en]
Returns a list of period items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening collection",
"type": "object",
"description": "List of opening periods",
"properties": {
"openingPeriods": {
"type": "array",
"description": "Opening period",
"id": "Openings",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening",
"description": "Descriptor an opening period.",
"properties": {
"id": {
"type": "string",
"description": "Period's internal id."
},
"servicePointId": {
"type": "string",
"description": "Service point ID."
},
"name": {
"type": "string",
"description": "Name of the period"
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "End date of the period."
},
"openingDays": {
"type": "array",
"description": "List opening hours within the period.",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day include weekdays",
"javaType": "org.folio.rest.jaxrs.model.OpeningDayWeekDay",
"description": "Description of an opening of for a specific week day.",
"properties": {
"weekdays": {
"type": "object",
"description": "Day of week",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Weekdays",
"properties": {
"day": {
"description": "Day of week",
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"additionalProperties": false
},
"openingDay": {
"type": "object",
"description": "Description of an opening of the week day.",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"startDate"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"openingPeriods",
"totalRecords"
]
}Example:
{
"openingPeriods": [
{
"id": "fa9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test1",
"startDate": "2018-06-01T00:00:00.000+00:00",
"endDate": "2018-08-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "MONDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "05:00",
"endTime": "11:00"
},
{
"startTime": "14:00",
"endTime": "18:00"
}
],
"allDay": false,
"open": true
}
}
]
},
{
"id": "ha9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test2",
"startDate": "2018-09-01T00:00:00.000+00:00",
"endDate": "2018-10-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "THURSDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "09:00",
"endTime": "12:00"
},
{
"startTime": "13:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true
}
}
]
}
],
"totalRecords": 2
}
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 period -- malformed parameter 'query', syntax error at column 6Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list period -- unauthorizedNot found. There is no service point with the given ID
Internal server error
Media type: text/plain
Type: any
Example:
internal server error, contact administratorSaves the new library period
POST /calendar/periods/{servicePointId}/periodRequested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening",
"type": "object",
"description": "Descriptor an opening period.",
"properties": {
"id": {
"type": "string",
"description": "Period's internal id."
},
"servicePointId": {
"type": "string",
"description": "Service point ID."
},
"name": {
"type": "string",
"description": "Name of the period"
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "End date of the period."
},
"openingDays": {
"type": "array",
"description": "List opening hours within the period.",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day include weekdays",
"javaType": "org.folio.rest.jaxrs.model.OpeningDayWeekDay",
"description": "Description of an opening of for a specific week day.",
"properties": {
"weekdays": {
"type": "object",
"description": "Day of week",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Weekdays",
"properties": {
"day": {
"description": "Day of week",
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"additionalProperties": false
},
"openingDay": {
"type": "object",
"description": "Description of an opening of the week day.",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"startDate"
]
}Example:
{
"id": "ha9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test2",
"startDate": "2018-09-01T00:00:00.000+00:00",
"endDate": "2018-10-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "THURSDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "09:00",
"endTime": "12:00"
},
{
"startTime": "13:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true
}
}
]
}
Returns with the created period
URI to the created period item
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening",
"type": "object",
"description": "Descriptor an opening period.",
"properties": {
"id": {
"type": "string",
"description": "Period's internal id."
},
"servicePointId": {
"type": "string",
"description": "Service point ID."
},
"name": {
"type": "string",
"description": "Name of the period"
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "End date of the period."
},
"openingDays": {
"type": "array",
"description": "List opening hours within the period.",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day include weekdays",
"javaType": "org.folio.rest.jaxrs.model.OpeningDayWeekDay",
"description": "Description of an opening of for a specific week day.",
"properties": {
"weekdays": {
"type": "object",
"description": "Day of week",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Weekdays",
"properties": {
"day": {
"description": "Day of week",
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"additionalProperties": false
},
"openingDay": {
"type": "object",
"description": "Description of an opening of the week day.",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"startDate"
]
}Example:
{
"id": "ha9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test2",
"startDate": "2018-09-01T00:00:00.000+00:00",
"endDate": "2018-10-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "THURSDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "09:00",
"endTime": "12:00"
},
{
"startTime": "13:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true
}
}
]
}
Bad request
Media type: text/plain
Type: any
Example:
"unable to add period -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create period -- unauthorizedUnprocessable Entity
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"description": "An error",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "List of key/value parameters of an error",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorList opening hours for given periodId.
GET /calendar/periods/{servicePointId}/period/{periodId}Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening",
"type": "object",
"description": "Descriptor an opening period.",
"properties": {
"id": {
"type": "string",
"description": "Period's internal id."
},
"servicePointId": {
"type": "string",
"description": "Service point ID."
},
"name": {
"type": "string",
"description": "Name of the period"
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "End date of the period."
},
"openingDays": {
"type": "array",
"description": "List opening hours within the period.",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day include weekdays",
"javaType": "org.folio.rest.jaxrs.model.OpeningDayWeekDay",
"description": "Description of an opening of for a specific week day.",
"properties": {
"weekdays": {
"type": "object",
"description": "Day of week",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Weekdays",
"properties": {
"day": {
"description": "Day of week",
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"additionalProperties": false
},
"openingDay": {
"type": "object",
"description": "Description of an opening of the week day.",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"startDate"
]
}Example:
{
"id": "ha9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test2",
"startDate": "2018-09-01T00:00:00.000+00:00",
"endDate": "2018-10-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "THURSDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "09:00",
"endTime": "12:00"
},
{
"startTime": "13:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true
}
}
]
}
Library hours period or service point with the given ID is not found
Media type: text/plain
Type: any
Example:
"period not found"
Internal server error
Media type: text/plain
Type: any
Example:
internal server error, contact administratorDelete Opening hours by Id
DELETE /calendar/periods/{servicePointId}/period/{periodId}Requested language. Optional. [lang=en]
Library hours period was 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 period -- constraint violation"
Library hours period or service point with the given ID is not found
Media type: text/plain
Type: any
Example:
"period not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorUpdate library period by periodId
PUT /calendar/periods/{servicePointId}/period/{periodId}Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening",
"type": "object",
"description": "Descriptor an opening period.",
"properties": {
"id": {
"type": "string",
"description": "Period's internal id."
},
"servicePointId": {
"type": "string",
"description": "Service point ID."
},
"name": {
"type": "string",
"description": "Name of the period"
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "End date of the period."
},
"openingDays": {
"type": "array",
"description": "List opening hours within the period.",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day include weekdays",
"javaType": "org.folio.rest.jaxrs.model.OpeningDayWeekDay",
"description": "Description of an opening of for a specific week day.",
"properties": {
"weekdays": {
"type": "object",
"description": "Day of week",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Weekdays",
"properties": {
"day": {
"description": "Day of week",
"type": "string",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"additionalProperties": false
},
"openingDay": {
"type": "object",
"description": "Description of an opening of the week day.",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening day",
"properties": {
"openingHour": {
"type": "array",
"description": "List of opening and closing time pairs within a day",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Opening hour",
"description": "Opening time frame",
"properties": {
"startTime": {
"type": "string",
"description": "Start of opening"
},
"endTime": {
"type": "string",
"description": "End of opening"
}
},
"additionalProperties": false
}
},
"date": {
"type": "string",
"description": "Date for opening day"
},
"allDay": {
"type": "boolean",
"description": "True if service point is open all the day."
},
"open": {
"type": "boolean",
"description": "True if service point is open. False if service point is closed."
},
"exceptional": {
"type": "boolean",
"description": "True if opening is exceptional. False if opening is regular."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"startDate"
]
}Example:
{
"id": "ha9927e8-5f79-498e-94ea-8b5b474795c8",
"servicePointId": "1",
"name": "test2",
"startDate": "2018-09-01T00:00:00.000+00:00",
"endDate": "2018-10-01T00:00:00.000+00:00",
"openingDays": [
{
"weekdays": {
"day": "THURSDAY"
},
"openingDay": {
"openingHour": [
{
"startTime": "09:00",
"endTime": "12:00"
},
{
"startTime": "13:00",
"endTime": "17:00"
}
],
"allDay": false,
"open": true
}
}
]
}
Library period 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 period -- malformed JSON at 13:4"
Library period id or service point with the given ID is not found
Media type: text/plain
Type: any
Example:
"period not found"
Unprocessable Entity
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"description": "An error",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "List of key/value parameters of an error",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"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 administratorThis endpoint helps to calculate due date. The response contains three openings: the requested day, next and previous dates openings which are closest to the requested day.
GET /calendar/periods/{servicePointId}/calculateopeningrequested date
Example:
2019-01-31Requested language. Optional. [lang=en]
Media type: application/json
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
Not found
Media type: text/plain
Type: any
Internal server error
Media type: text/plain
Type: any