Work Schedules
The work schedule object
| Attribute | Type | Description |
|---|---|---|
id |
integer | Unique ID for the work schedule. |
name |
string | Schedule name. |
is_default |
boolean | Whether this is the company fallback schedule. |
is_active |
boolean | Whether the schedule is active or deactivated. |
weekly_hours |
decimal | Total working hours across the week. |
monday_hours |
decimal | Working hours scheduled for Monday. |
tuesday_hours |
decimal | Working hours scheduled for Tuesday. |
wednesday_hours |
decimal | Working hours scheduled for Wednesday. |
thursday_hours |
decimal | Working hours scheduled for Thursday. |
friday_hours |
decimal | Working hours scheduled for Friday. |
saturday_hours |
decimal | Working hours scheduled for Saturday. |
sunday_hours |
decimal | Working hours scheduled for Sunday. |
created_at |
datetime | Date and time the schedule was created. Use the ISO 8601 Format. |
updated_at |
datetime | Date and time the schedule was last updated. Use the ISO 8601 Format. |
Required permissions
The PTO API is currently being rolled out gradually. Requests from unavailable accounts return 403 Forbidden.
Only administrators can access, create, update, and deactivate work schedules. Insufficient permissions will result in a 403 Forbidden status code.
List all work schedules
Returns a list of work schedules.
The response contains an object with a pto_work_schedules property that contains an array of up to per_page work schedules.
GET /v2/pto/work_schedules
| Parameter | Type | Description |
|---|---|---|
is_active |
boolean | Pass true to return active schedules and false to return deactivated schedules. (Default: true) |
page |
integer | The page number to use in pagination. (Default: 1) |
per_page |
integer | The number of records to return per page. Can range between 1 and 2000. (Default: 2000) |
Example Request:
curl "https://api.harvestapp.com/v2/pto/work_schedules" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"pto_work_schedules": [
{
"id": 8,
"name": "Standard Full Time",
"is_default": true,
"is_active": true,
"weekly_hours": 40.0,
"monday_hours": 8.0,
"tuesday_hours": 8.0,
"wednesday_hours": 8.0,
"thursday_hours": 8.0,
"friday_hours": 8.0,
"saturday_hours": 0.0,
"sunday_hours": 0.0,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
],
"per_page": 2000,
"total_pages": 1,
"total_entries": 1,
"next_page": null,
"previous_page": null,
"page": 1,
"links": {
"first": "https://api.harvestapp.com/v2/pto/work_schedules?page=1&per_page=2000",
"next": null,
"previous": null,
"last": "https://api.harvestapp.com/v2/pto/work_schedules?page=1&per_page=2000"
}
}Retrieve a work schedule
Retrieves the details of an existing work schedule. Returns a work schedule object and a 200 OK response code.
GET /v2/pto/work_schedules/{WORK_SCHEDULE_ID}
Example Request:
curl "https://api.harvestapp.com/v2/pto/work_schedules/8" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 8,
"name": "Standard Full Time",
"is_default": true,
"is_active": true,
"weekly_hours": 40.0,
"monday_hours": 8.0,
"tuesday_hours": 8.0,
"wednesday_hours": 8.0,
"thursday_hours": 8.0,
"friday_hours": 8.0,
"saturday_hours": 0.0,
"sunday_hours": 0.0,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}Create a work schedule
Creates a new work schedule. Returns a work schedule object and a 201 Created response code if the call succeeded. Only administrators can perform this action.
POST /v2/pto/work_schedules
| Parameter | Type | Description |
|---|---|---|
name |
string | Required. Name for the schedule. |
is_default |
boolean | Set to true to make this the company default schedule. |
monday_hours |
decimal | Monday working hours (0-24). |
tuesday_hours |
decimal | Tuesday working hours (0-24). |
wednesday_hours |
decimal | Wednesday working hours (0-24). |
thursday_hours |
decimal | Thursday working hours (0-24). |
friday_hours |
decimal | Friday working hours (0-24). |
saturday_hours |
decimal | Saturday working hours (0-24). |
sunday_hours |
decimal | Sunday working hours (0-24). |
Example Request:
curl -X POST "https://api.harvestapp.com/v2/pto/work_schedules" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"name": "Part Time 20h", "monday_hours": 4.0, "tuesday_hours": 4.0, "wednesday_hours": 4.0, "thursday_hours": 4.0, "friday_hours": 4.0}'
Example Response:
{
"id": 9,
"name": "Part Time 20h",
"is_default": false,
"is_active": true,
"weekly_hours": 20.0,
"monday_hours": 4.0,
"tuesday_hours": 4.0,
"wednesday_hours": 4.0,
"thursday_hours": 4.0,
"friday_hours": 4.0,
"saturday_hours": 0.0,
"sunday_hours": 0.0,
"created_at": "2026-09-03T12:00:00Z",
"updated_at": "2026-09-03T12:00:00Z"
}Update a work schedule
Updates an existing work schedule. Returns a work schedule object and a 200 OK response code. Only administrators can perform this action.
PATCH /v2/pto/work_schedules/{WORK_SCHEDULE_ID}
| Parameter | Type | Description |
|---|---|---|
name |
string | Updated schedule name. |
is_default |
boolean | Promote this schedule to company default. |
monday_hours |
decimal | Updated Monday hours. |
tuesday_hours |
decimal | Updated Tuesday hours. |
wednesday_hours |
decimal | Updated Wednesday hours. |
thursday_hours |
decimal | Updated Thursday hours. |
friday_hours |
decimal | Updated Friday hours. |
saturday_hours |
decimal | Updated Saturday hours. |
sunday_hours |
decimal | Updated Sunday hours. |
Example Request:
curl -X PATCH "https://api.harvestapp.com/v2/pto/work_schedules/9" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"name": "Part Time 24h", "friday_hours": 8.0}'
Example Response:
{
"id": 9,
"name": "Part Time 24h",
"is_default": false,
"is_active": true,
"weekly_hours": 24.0,
"monday_hours": 4.0,
"tuesday_hours": 4.0,
"wednesday_hours": 4.0,
"thursday_hours": 4.0,
"friday_hours": 8.0,
"saturday_hours": 0.0,
"sunday_hours": 0.0,
"created_at": "2026-09-03T12:00:00Z",
"updated_at": "2026-09-03T12:05:00Z"
}Deactivate a work schedule
Deactivates a non-default work schedule. Returns a 200 OK response code and the deactivated work schedule object with is_active set to false. Only administrators can perform this action.
DELETE /v2/pto/work_schedules/{WORK_SCHEDULE_ID}
Example Request:
curl -X DELETE "https://api.harvestapp.com/v2/pto/work_schedules/9" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 9,
"name": "Part Time 24h",
"is_default": false,
"is_active": false,
"weekly_hours": 24.0,
"monday_hours": 4.0,
"tuesday_hours": 4.0,
"wednesday_hours": 4.0,
"thursday_hours": 4.0,
"friday_hours": 8.0,
"saturday_hours": 0.0,
"sunday_hours": 0.0,
"created_at": "2026-09-03T12:00:00Z",
"updated_at": "2026-09-03T12:10:00Z"
}