Update attendance schedule
/v2/attendance_schedules/{attendance_schedule_id}Updates an attendance schedule.
Returns the updated attendance schedule.
Only pass in the fields you want to change. Use add_excluded_dates/remove_excluded_dates to modify exclusions incrementally, or excluded_dates to replace them entirely.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
attendance_schedule_idrequired | path | integer (int32) | Attendance schedule ID |
Request body
Update attendance schedule
- start_datestring
Attendance Schedule Start Date
- start_timestring
Attendance Schedule Start Time, 24 hour time in 30 minutes intervals (h:mm)
- use_time_zonestring
What time zone to use
- durationinteger
Shift duration in seconds
- minimum_timeinteger
Minimum shift time in seconds
- repeat_schedulestring
Shift repetition schedule
- repeat_untilstring
Shift end date
- weekdaysarray
Shift repetition week days
array<string>Shift repetition week days
itemsstring - excluded_datesarray
Excluded dates from the repetition schedule
array<string>Excluded dates from the repetition schedule
itemsstring(date) - add_excluded_datesarray
Excluded dates to add
array<string>Excluded dates to add
itemsstring(date) - remove_excluded_datesarray
Excluded dates to remove
array<string>Excluded dates to remove
itemsstring(date)
Responses
200An attendance schedule
- attendance_scheduleobjectobject
AttendanceSchedule model
- idinteger required
Attendance schedule ID
- user_idinteger required
User ID
- organization_idinteger required
Organization ID
- created_atstring required
When the record was created
- updated_atstring required
When the record was last updated
- start_datestring required
Shift start date
- use_time_zonestring required
What time zone to use
- start_timestring required
Shift start time (only hh:mm:ss
- durationinteger required
Shift duration
- minimum_timeinteger required
Minimum shift time
- repeat_schedulestring required
Shift repetition schedule
- repeat_untilstring
Shift end date
- weekdaysarray
Shift repetition week days
array<string>Shift repetition week days
itemsstring - excluded_datesarray
Excluded dates from the repetition schedule
array<string>Excluded dates from the repetition schedule
itemsstring(date)
{
"attendance_schedule": {
"id": 0,
"user_id": 0,
"organization_id": 0,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"start_date": "2024-01-15",
"use_time_zone": "string",
"start_time": "2024-01-15T10:30:00Z",
"duration": 0,
"minimum_time": 0,
"repeat_schedule": "string",
"repeat_until": "2024-01-15",
"weekdays": [
"string"
],
"excluded_dates": [
"2024-01-15"
]
}
}400Invalid parameters
Hubstaff_Public_V2_Entities_Error model
- codestring required
Legacy string error code for backward compatibility
- error_codeinteger
Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.
- errorstring required
Human-readable error message
- detailsarray
Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
array<string>Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}401Unauthorized
Hubstaff_Public_V2_Entities_Error model
- codestring required
Legacy string error code for backward compatibility
- error_codeinteger
Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.
- errorstring required
Human-readable error message
- detailsarray
Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
array<string>Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}403API access is only for organizations on an active plan
Hubstaff_Public_V2_Entities_Error model
- codestring required
Legacy string error code for backward compatibility
- error_codeinteger
Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.
- errorstring required
Human-readable error message
- detailsarray
Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
array<string>Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}404Could not find record
Hubstaff_Public_V2_Entities_Error model
- codestring required
Legacy string error code for backward compatibility
- error_codeinteger
Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.
- errorstring required
Human-readable error message
- detailsarray
Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
array<string>Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}429Rate limit exceeded
Hubstaff_Public_V2_Entities_Error model
- codestring required
Legacy string error code for backward compatibility
- error_codeinteger
Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.
- errorstring required
Human-readable error message
- detailsarray
Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
array<string>Per-attribute validation errors: [{attribute, error}]. Present on validation failures.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}