List weekly hours
const url = 'https://api.keptslot.com/v1/staff/working-hours';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.keptslot.com/v1/staff/working-hours \ --header 'Authorization: Bearer <token>'This endpoint gives the weekly hours of every ACTIVE calendar in one call. An inactive calendar is not in the response.
Use it instead of one request per calendar.
Authorizations
Section titled “ Authorizations ”Responses
Section titled “ Responses ”The weekly hours, grouped by calendar.
object
object
object
The day of the week. 0 is Sunday.
Minutes after midnight, in the workspace timezone.
Minutes after midnight, in the workspace timezone.
Example generated
{ "data": [ { "staff_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "working_hours": [ { "weekday": 1, "start_minute": 1, "end_minute": 1 } ] } ]}The key is missing, malformed or revoked.
object
object
A stable machine-readable code. Match on this.
A sentence for a person. Do not match on this.
The field that caused the refusal, if one field did.
The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.
The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.
The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.
Example generated
{ "error": { "type": "example", "message": "example", "param": "example", "dimension": "example", "used": 1, "limit": 1 }}