Read Shiftbase rosters, timesheets, absences and availability; schedule shifts and review absences.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
WRITE: put one employee on the schedule for one date (a single, non-recurring shift) in a team, with a shift type, start/end time and break. The employee is notified only when notify is true. POST /rosters.
Date of the shift (yyyy-mm-dd).
Team (shiftbase_list_teams).
The employee to schedule.
End, 24-hour hh:mm (e.g. 17:30); earlier than start = ends the next day.
Shift type (shiftbase_list_shift_types).
Start, 24-hour hh:mm (e.g. 09:00).
Department of the team.
Notify the employee (default false).
Note shown on the shift.
Unpaid break in minutes (default 0).
Paid break in minutes (default 0).
The server marks this tool as destructive. Running it may delete or overwrite data on the server or in any account you connected with your headers.
WRITE: put one employee on the schedule for one date (a single, non-recurring shift) in a team, with a shift type, start/end time and break. The employee is notified only when notify is true. POST /rosters.
| Argument | Type | Description |
|---|---|---|
| date* | string | Date of the shift (yyyy-mm-dd). |
| notify | boolean | Notify the employee (default false). |
| team_id* | integer | Team (shiftbase_list_teams). |
| user_id* | integer | The employee to schedule. |
| end_time* | string | End, 24-hour hh:mm (e.g. 17:30); earlier than start = ends the next day. |
| shift_id* | integer | Shift type (shiftbase_list_shift_types). |
| start_time* | string | Start, 24-hour hh:mm (e.g. 09:00). |
| description | string | Note shown on the shift. |
| break_minutes | integer | Unpaid break in minutes (default 0). |
| department_id* | integer | Department of the team. |
| paid_break_minutes | integer | Paid break in minutes (default 0). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"date",
"user_id",
"department_id",
"team_id",
"shift_id",
"start_time",
"end_time"
],
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date of the shift (yyyy-mm-dd)."
},
"notify": {
"type": "boolean",
"description": "Notify the employee (default false)."
},
"team_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Team (shiftbase_list_teams).",
"exclusiveMinimum": 0
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "The employee to schedule.",
"exclusiveMinimum": 0
},
"end_time": {
"type": "string",
"description": "End, 24-hour hh:mm (e.g. 17:30); earlier than start = ends the next day."
},
"shift_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Shift type (shiftbase_list_shift_types).",
"exclusiveMinimum": 0
},
"start_time": {
"type": "string",
"description": "Start, 24-hour hh:mm (e.g. 09:00)."
},
"description": {
"type": "string",
"maxLength": 2000,
"description": "Note shown on the shift."
},
"break_minutes": {
"type": "integer",
"maximum": 1440,
"minimum": 0,
"description": "Unpaid break in minutes (default 0)."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Department of the team.",
"exclusiveMinimum": 0
},
"paid_break_minutes": {
"type": "integer",
"maximum": 1440,
"minimum": 0,
"description": "Paid break in minutes (default 0)."
}
}
}One absence by id, with the per-day hours and who reviewed it. GET /absentees/{absenteeId}.
| Argument | Type | Description |
|---|---|---|
| absence_id* | integer | Shiftbase absence (absentee) id. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"absence_id"
],
"properties": {
"absence_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Shiftbase absence (absentee) id.",
"exclusiveMinimum": 0
}
}
}The Shiftbase account this API key belongs to: company, country, time zone, working-day start/end, plan facts. GET /accounts.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}Employee availability (available / unavailable, all day or from a time) for a date range of at most 62 days, from Shiftbase's availability report. Needs the Basic plan and the "View reports" permission. POST /reports/availability (export json; reads only).
| Argument | Type | Description |
|---|---|---|
| to* | string | Last date (yyyy-mm-dd), at most 62 days after from. |
| from* | string | First date (yyyy-mm-dd). |
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| user_id | integer | Only this employee. |
| statuses | array | Only these availability types. |
| department_ids | array | Only these departments. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"from",
"to"
],
"properties": {
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last date (yyyy-mm-dd), at most 62 days after from."
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First date (yyyy-mm-dd)."
},
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only this employee.",
"exclusiveMinimum": 0
},
"statuses": {
"type": "array",
"items": {
"enum": [
"Available all day",
"Available from",
"Unavailable all day",
"Unavailable from"
],
"type": "string"
},
"maxItems": 4,
"description": "Only these availability types."
},
"department_ids": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"maxItems": 50,
"description": "Only these departments."
}
}
}How many hours an absence would cost for an employee, per day and in total (from the schedule or the contract, per the absence policy), for a period of at most 366 days. Changes nothing. POST /absentees/expected.
| Argument | Type | Description |
|---|---|---|
| user_id* | integer | The employee. |
| end_date* | string | Last day (yyyy-mm-dd). |
| start_date* | string | First day (yyyy-mm-dd). |
| absence_type_id* | integer | Absence type id (shiftbase_list_absence_types). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"user_id",
"absence_type_id",
"start_date",
"end_date"
],
"properties": {
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "The employee.",
"exclusiveMinimum": 0
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last day (yyyy-mm-dd)."
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First day (yyyy-mm-dd)."
},
"absence_type_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Absence type id (shiftbase_list_absence_types).",
"exclusiveMinimum": 0
}
}
}One scheduled shift by its occurrence_id, with the employee, shift type, team and who created/changed it. GET /rosters/{occurrenceId}.
| Argument | Type | Description |
|---|---|---|
| occurrence_id* | string | The occurrence_id from shiftbase_list_rosters: "<roster id>" or, for a recurring shift, "<roster id>:<yyyy-mm-dd>". |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"occurrence_id"
],
"properties": {
"occurrence_id": {
"type": "string",
"maxLength": 40,
"description": "The occurrence_id from shiftbase_list_rosters: \"<roster id>\" or, for a recurring shift, \"<roster id>:<yyyy-mm-dd>\"."
}
}
}One timesheet by id, with its clocked breaks. GET /timesheets/{timesheetId}.
| Argument | Type | Description |
|---|---|---|
| timesheet_id* | integer | Shiftbase timesheet id. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"timesheet_id"
],
"properties": {
"timesheet_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Shiftbase timesheet id.",
"exclusiveMinimum": 0
}
}
}One employee by user id or email address, with teams and departments. GET /users/{identifier}.
| Argument | Type | Description |
|---|---|---|
| string | Or the employee's email address. | |
| user_id | integer | Shiftbase user id. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"email": {
"type": "string",
"pattern": "^[^\\s@/?#]+@[^\\s@/?#]+\\.[^\\s@/?#]+$",
"maxLength": 254,
"description": "Or the employee's email address."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Shiftbase user id.",
"exclusiveMinimum": 0
}
}
}List absence types (e.g. Holiday, Sick, Unpaid leave): name, unit (hours or days), whether it costs leave hours, colour. Their ids are the absence_type_id for absences. GET /absentee_options.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
}
}
}List absences (leave, sick leave, other time off) overlapping a date range of at most 366 days: employee, absence type, start/end date, hours or days, status Approved/Declined/Pending and who reviewed it. Needs the Basic plan. GET /absentees.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| status | string | Only absences with this status (Pending = requests waiting for review). |
| include | string | Add related data: the per-day breakdown, the employee or the absence type. |
| user_id | integer | Only this employee. |
| max_date* | string | Last date (yyyy-mm-dd), at most 366 days after min_date. |
| min_date* | string | First date (yyyy-mm-dd). |
| only_open_ended | boolean | Only open-ended absences (no end date yet, e.g. long-term sick leave). |
Who is clocked in right now: employee, since when, their scheduled shift, team, department and location. GET /timesheets/clock.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
}
}
}List departments (sites/branches that own teams, shifts and schedules) with address and timesheet/clocking settings. GET /departments.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
}
}
}List active locations (addresses that group departments). GET /locations.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
}
}
}List open (unassigned) shifts that employees can pick up, for a date range of at most 62 days (default: today). Needs the Basic plan or higher. GET /open_shifts.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| user_id | integer | Only open shifts this employee can take. |
| max_date | string | Last date (yyyy-mm-dd). |
| min_date | string | First date (yyyy-mm-dd). Give both dates or neither (= today). |
| department_id | integer | Only open shifts in this department. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only open shifts this employee can take.",
"exclusiveMinimum": 0
},
"max_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last date (yyyy-mm-dd)."
},
"min_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First date (yyyy-mm-dd). Give both dates or neither (= today)."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only open shifts in this department.",
"exclusiveMinimum": 0
}
}
}List the schedule (rosters = shifts assigned to employees) for a date range of at most 62 days: date, start/end time, break, employee, team, shift type, department, published state, hours and cost. Each item's occurrence_id identifies it for shiftbase_get_roster and shiftbase_update_roster. GET /rosters.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| user_id | integer | Only shifts of this employee. |
| max_date* | string | Last date (yyyy-mm-dd), at most 62 days after min_date. |
| min_date* | string | First date (yyyy-mm-dd). |
| department_id | integer | Only shifts in this department. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"min_date",
"max_date"
],
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only shifts of this employee.",
"exclusiveMinimum": 0
},
"max_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last date (yyyy-mm-dd), at most 62 days after min_date."
},
"min_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First date (yyyy-mm-dd)."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only shifts in this department.",
"exclusiveMinimum": 0
}
}
}List shift types (the templates a scheduled shift uses: name, short name, default start/end time and break), optionally for one department. Their ids are the shift_id for shiftbase_create_roster. GET /shifts.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| department_id | integer | Only shift types of this department. |
| include_deleted | boolean | Also include deleted shift types. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only shift types of this department.",
"exclusiveMinimum": 0
},
"include_deleted": {
"type": "boolean",
"description": "Also include deleted shift types."
}
}
}List teams (the rows of the schedule within a department), optionally for one department. GET /teams.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| department_id | integer | Only teams of this department. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only teams of this department.",
"exclusiveMinimum": 0
}
}
}List timesheets (worked hours: clock in/out, breaks, total, status Approved/Declined/Pending, wage and surcharges) for a date range of at most 62 days. GET /timesheets.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| status | string | Only timesheets with this status. |
| user_id | integer | Only this employee. |
| max_date* | string | Last date (yyyy-mm-dd), at most 62 days after min_date. |
| min_date* | string | First date (yyyy-mm-dd). |
| department_id | integer | Only this department. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"min_date",
"max_date"
],
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"status": {
"enum": [
"Approved",
"Declined",
"Pending"
],
"type": "string",
"description": "Only timesheets with this status."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only this employee.",
"exclusiveMinimum": 0
},
"max_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last date (yyyy-mm-dd), at most 62 days after min_date."
},
"min_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First date (yyyy-mm-dd)."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only this department.",
"exclusiveMinimum": 0
}
}
}List employees (users) with their teams and departments, contact details, employee number, start/end dates and plus-min hours balance. Use it to map user ids in schedules, timesheets and absences to names. Identity, bank and birth data are never returned. GET /users.
| Argument | Type | Description |
|---|---|---|
| limit | integer | Results per page, 1-200 (default 50). The reply's total and next_offset show what is left. |
| active | boolean | true = only active employees, false = only inactive. Default: both. |
| offset | integer | Index of the first result; pass the previous reply's next_offset. |
| department_id | integer | Only employees of this department. |
| include_hidden | boolean | Also include hidden users. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"active": {
"type": "boolean",
"description": "true = only active employees, false = only inactive. Default: both."
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only employees of this department.",
"exclusiveMinimum": 0
},
"include_hidden": {
"type": "boolean",
"description": "Also include hidden users."
}
}
}WRITE: add an absence (leave/time-off request) for an employee. By default it is a Pending request for a manager to review; status Approved books it directly (needs the approve-absence permission). The hours per day come from Shiftbase's own expected-hours calculation (the same as shiftbase_get_expected_absence_hours). Needs the Basic plan. POST /absentees.
| Argument | Type | Description |
|---|---|---|
| note | string | Note from the requester. |
| status | string | Pending (default) = a request to review; Approved = book it directly. |
| user_id* | integer | The employee. |
| end_date* | string | Last day (yyyy-mm-dd), at most 366 days after start_date. |
| start_date* | string | First day (yyyy-mm-dd). |
| absence_type_id* | integer | Absence type id (shiftbase_list_absence_types). |
| notify_employee | boolean | Notify the employee (default false). |
WRITE: approve or decline an absence request. Reads the absence first and sends it back unchanged except for the status (needs the approve-absence permission). PUT /absentees/{absenteeId}.
| Argument | Type | Description |
|---|---|---|
| decision* | string | Approved or Declined. |
| absence_id* | integer | Absence (absentee) id, e.g. from shiftbase_list_absences with status Pending. |
| notify_employee | boolean | Notify the employee (default false). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"absence_id",
"decision"
],
"properties": {
"decision": {
"enum": [
"Approved",
"Declined"
],
"type": "string",
"description": "Approved or Declined."
},
"absence_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Absence (absentee) id, e.g. from shiftbase_list_absences with status Pending.",
"exclusiveMinimum": 0
},
"notify_employee": {
"type": "boolean",
"description": "Notify the employee (default false)."
}
}
}WRITE: change a scheduled shift: move it to another date, time, employee, team or shift type, or change its break or note. Reads the shift first and sends it back with your changes. For a recurring shift, scope says what changes: "occurrence" (this date only), "sequence" (this date and all later ones) or "original" (the whole series; also the right scope for a non-recurring shift). PUT /rosters/{occurrenceId}/{scope}.
| Argument | Type | Description |
|---|---|---|
| date | string | New date (yyyy-mm-dd). |
| scope* | string | "original" for a non-recurring shift; see the description for recurring ones. |
| notify | boolean | Notify the employee (default false). |
| team_id | integer | New team. |
| user_id | integer | New employee. |
| end_time | string | New end, hh:mm. |
| shift_id | integer | New shift type. |
| start_time | string | New start, hh:mm. |
| description |
| absence_type_ids | array | Only these absence types (ids from shiftbase_list_absence_types). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"min_date",
"max_date"
],
"properties": {
"limit": {
"type": "integer",
"maximum": 200,
"description": "Results per page, 1-200 (default 50). The reply's total and next_offset show what is left.",
"exclusiveMinimum": 0
},
"offset": {
"type": "integer",
"maximum": 1000000,
"minimum": 0,
"description": "Index of the first result; pass the previous reply's next_offset."
},
"status": {
"enum": [
"Approved",
"Declined",
"Pending"
],
"type": "string",
"description": "Only absences with this status (Pending = requests waiting for review)."
},
"include": {
"enum": [
"AbsenteeDay",
"User",
"AbsenteeOption"
],
"type": "string",
"description": "Add related data: the per-day breakdown, the employee or the absence type."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only this employee.",
"exclusiveMinimum": 0
},
"max_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last date (yyyy-mm-dd), at most 366 days after min_date."
},
"min_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First date (yyyy-mm-dd)."
},
"only_open_ended": {
"type": "boolean",
"description": "Only open-ended absences (no end date yet, e.g. long-term sick leave)."
},
"absence_type_ids": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"maxItems": 50,
"description": "Only these absence types (ids from shiftbase_list_absence_types)."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"user_id",
"absence_type_id",
"start_date",
"end_date"
],
"properties": {
"note": {
"type": "string",
"maxLength": 2000,
"description": "Note from the requester."
},
"status": {
"enum": [
"Pending",
"Approved"
],
"type": "string",
"description": "Pending (default) = a request to review; Approved = book it directly."
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "The employee.",
"exclusiveMinimum": 0
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last day (yyyy-mm-dd), at most 366 days after start_date."
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First day (yyyy-mm-dd)."
},
"absence_type_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Absence type id (shiftbase_list_absence_types).",
"exclusiveMinimum": 0
},
"notify_employee": {
"type": "boolean",
"description": "Notify the employee (default false)."
}
}
}| string |
| New note. |
| break_minutes | integer | New unpaid break in minutes. |
| department_id | integer | New department (when moving to a team of another department). |
| occurrence_id* | string | occurrence_id from shiftbase_list_rosters. |
| paid_break_minutes | integer | New paid break in minutes. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"occurrence_id",
"scope"
],
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "New date (yyyy-mm-dd)."
},
"scope": {
"enum": [
"original",
"occurrence",
"sequence"
],
"type": "string",
"description": "\"original\" for a non-recurring shift; see the description for recurring ones."
},
"notify": {
"type": "boolean",
"description": "Notify the employee (default false)."
},
"team_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "New team.",
"exclusiveMinimum": 0
},
"user_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "New employee.",
"exclusiveMinimum": 0
},
"end_time": {
"type": "string",
"description": "New end, hh:mm."
},
"shift_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "New shift type.",
"exclusiveMinimum": 0
},
"start_time": {
"type": "string",
"description": "New start, hh:mm."
},
"description": {
"type": "string",
"maxLength": 2000,
"description": "New note."
},
"break_minutes": {
"type": "integer",
"maximum": 1440,
"minimum": 0,
"description": "New unpaid break in minutes."
},
"department_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "New department (when moving to a team of another department).",
"exclusiveMinimum": 0
},
"occurrence_id": {
"type": "string",
"maxLength": 40,
"description": "occurrence_id from shiftbase_list_rosters."
},
"paid_break_minutes": {
"type": "integer",
"maximum": 1440,
"minimum": 0,
"description": "New paid break in minutes."
}
}
}