Get all calendars that match the given query
id | Array of strings <uuid> The list of calendar IDs to retrieve, sent as separate parameters (?id=aaaa&id=bbbb...). If this list is passed, calendars must have an ID in this list in addition to any additional criteria. |
servicePointId | Array of strings <uuid> Filter for calendars that are assigned to a certain service point. If this parameter is excluded, all service points will be considered/included in the response. Multiple service points may be specified with form-style query expansions; in this case, calendars that are assigned to any of the provided service points will be returned. |
startDate | string <date> The first date (YYYY-MM-DD) to consider, inclusively |
endDate | string <date> The last date (YYYY-MM-DD) to consider, inclusively |
offset | integer >= 0 Default: 0 Skip a certain number of the first values; used for pagination |
limit | integer >= 0 Default: 10 The maximum number of elements returned in the response, used for pagination. A limit of zero will not include any results (however, totalRecords will still be included) -- to include all results, use a large number such as 2147483647. |
{- "calendars": [
- {
- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
], - "totalRecords": 1
}
Create a new calendar from a provided body. If an ID is provided for the calendar, it will be ignored (and a new one generated).
id | string <uuid> A unique UUID identifying this calendar | ||||||||||
name required | string A user-provided name used to label this calendar | ||||||||||
startDate required | string <date> The first effective date (inclusive, YYYY-MM-DD) of this calendar | ||||||||||
endDate required | string <date> The first effective date (inclusive, YYYY-MM-DD) of this calendar | ||||||||||
assignments required | Array of strings <uuid> (servicePointId) A list of all service points that this calendar is assigned to | ||||||||||
required | Array of objects (normalHours) A list of objects describing when the calendar is normally open | ||||||||||
Array
| |||||||||||
required | Array of objects (exceptionRange) A list of objects describing exceptions to the normal hours | ||||||||||
Array
| |||||||||||
object (metadata) Metadata associated with the calendar. This is provided by the server on a best-effort basis; no fields are guaranteed to be present. Metadata is provided from Okapi; any metadata sent directly from the client will be ignored. | |||||||||||
|
{- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
{- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
Delete a calendar by its ID.
id required | Array of strings <uuid> non-empty A list of calendars to delete, sent as separate parameters (?id=aaaa&id=bbbb...). If any calendars are missing, a 404 will be returned and nothing modified. |
{- "value": {
- "timestamp": "2021-11-18T13:38.51-50:00",
- "status": 400,
- "errors": [
- {
- "code": "invalidRequest",
- "message": "The request could not be parsed"
}
]
}, - "summary": "The request could not be parsed/understood."
}
Get a calendar's information by its ID.
calendarId required | string <uuid> The calendar ID to retrieve |
{- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
Overwrite an existing calendar with the provided payload. The provided calendar must already exist (attempting to overwrite a calendar that does not yet exist will result in a 404). If the payload includes any IDs, they will be ignored, and the existing calendar ID reused.
calendarId required | string <uuid> The calendar ID to replace |
id | string <uuid> A unique UUID identifying this calendar | ||||||||||
name required | string A user-provided name used to label this calendar | ||||||||||
startDate required | string <date> The first effective date (inclusive, YYYY-MM-DD) of this calendar | ||||||||||
endDate required | string <date> The first effective date (inclusive, YYYY-MM-DD) of this calendar | ||||||||||
assignments required | Array of strings <uuid> (servicePointId) A list of all service points that this calendar is assigned to | ||||||||||
required | Array of objects (normalHours) A list of objects describing when the calendar is normally open | ||||||||||
Array
| |||||||||||
required | Array of objects (exceptionRange) A list of objects describing exceptions to the normal hours | ||||||||||
Array
| |||||||||||
object (metadata) Metadata associated with the calendar. This is provided by the server on a best-effort basis; no fields are guaranteed to be present. Metadata is provided from Okapi; any metadata sent directly from the client will be ignored. | |||||||||||
|
{- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
{- "name": "Sample Spring Calendar",
- "startDate": "2022-01-08",
- "endDate": "2022-05-09",
- "assignments": [
- "44444444-4444-4444-4444-444444444444",
- "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
- "dddddddd-dddd-dddd-dddd-dddddddddddd"
], - "normalHours": [
- {
- "startDay": "MONDAY",
- "startTime": "07:00:00",
- "endDay": "FRIDAY",
- "endTime": "22:00:00"
}, - {
- "startDay": "SATURDAY",
- "startTime": "07:00:00",
- "endDay": "SATURDAY",
- "endTime": "22:00:00"
}
], - "exceptions": [
- {
- "name": "Spring break (closed)",
- "startDate": "2022-03-01",
- "endDate": "2022-03-05",
- "openings": [ ]
}, - {
- "name": "Early closure",
- "startDate": "2022-04-01",
- "endDate": "2022-04-01",
- "openings": [
- {
- "startDate": "2022-04-01",
- "startTime": "07:00:00",
- "endDate": "2022-04-01",
- "endTime": "12:00:00"
}
]
}
]
}
Delete a calendar by its ID.
calendarId required | string <uuid> The calendar ID to operate on. |
{- "value": {
- "timestamp": "2021-11-18T13:38.51-50:00",
- "status": 400,
- "errors": [
- {
- "code": "invalidRequest",
- "message": "The request could not be parsed"
}
]
}, - "summary": "The request could not be parsed/understood."
}
Calculate openings nearest to a given date for a specified service point
servicePointId required | string <uuid> The service point to calculate openings on |
date required | string <date> The date (YYYY-MM-DD) to calculate openings around |
{- "openings": [
- {
- "date": "2022-05-01",
- "allDay": false,
- "open": true,
- "exceptional": true,
- "exceptionName": "Holiday (reduced hours with lunch break)",
- "openings": [
- {
- "startTime": "10:00:00",
- "endTime": "12:00:00"
}, - {
- "startTime": "13:30:00",
- "endTime": "17:00:00"
}
]
}, - {
- "date": "2022-05-02",
- "allDay": true,
- "open": false,
- "exceptional": false,
- "openings": [ ]
}, - {
- "date": "2022-05-03",
- "allDay": true,
- "open": true,
- "exceptional": false,
- "openings": [
- {
- "startTime": "00:00:00",
- "endTime": "23:59:00"
}
]
}
]
}
Calculate the opening information for each date within a range
servicePointId required | string <uuid> The service point to calculate openings on |
startDate required | string <date> The first date (YYYY-MM-DD) to include, inclusive |
endDate required | string <date> The last date (YYYY-MM-DD) to include, inclusive |
includeClosed required | boolean Whether or not the results should include days where the service point is closed. Exceptional closures will always be returned |
offset | integer >= 0 Default: 0 Skip a certain number of the first values; used for pagination |
limit | integer >= 0 Default: 10 The maximum number of elements returned in the response, used for pagination. A limit of zero will not include any results (however, totalRecords will still be included) -- to include all results, use a large number such as 2147483647. |
{- "dates": [
- {
- "date": "2022-05-01",
- "allDay": false,
- "open": true,
- "exceptional": true,
- "exceptionName": "Holiday (reduced hours with lunch break)",
- "openings": [
- {
- "startTime": "10:00:00",
- "endTime": "12:00:00"
}, - {
- "startTime": "13:30:00",
- "endTime": "17:00:00"
}
]
}, - {
- "date": "2022-05-02",
- "allDay": true,
- "open": false,
- "exceptional": false,
- "openings": [ ]
}, - {
- "date": "2022-05-03",
- "allDay": true,
- "open": true,
- "exceptional": false,
- "openings": [
- {
- "startTime": "00:00:00",
- "endTime": "23:59:00"
}
]
}
], - "totalRecords": 3
}