Read
Get Single Time Off Record
GET - /v2/companies/<company_id>/people/<person_id>/time-off/<time_off_Id>
{
"data": {
"apply_to_saturday": false,
"apply_to_sunday": false,
"batch_end_time": "3:30 PM",
"batch_start_time": "7:00 AM",
"cadence": 1,
"company_id": "a4592b47-42ae-478f-926d-e77a7f768059",
"created_at": 1698073015447,
"end_day": "11/29/23",
"id": "7263bc0c-68d5-4944-892f-72c770702cc6",
"instances": [
{
"id": "e52d54b4-1e61-4324-850d-cf8e62ac201c",
"start_day": "11/01/23",
"end_day": "11/01/23"
},
{
"id": "7d2a2e56-e028-458c-b802-99c09211e45d",
"start_day": "11/08/23",
"end_day": "11/08/23"
},
{
"id": "f30ece8e-3ca4-4595-8c36-bbfc76caf789",
"start_day": "11/15/23",
"end_day": "11/15/23"
},
{
"id": "2e3de0fd-19e9-4b6d-af14-726f01d0683f",
"start_day": "11/22/23",
"end_day": "11/22/23"
},
{
"id": "c6ada4dd-27eb-4b4a-9b70-e229c994f6d3",
"start_day": "11/29/23",
"end_day": "11/29/23"
}
],
"is_paid": true,
"person_id": "81c63107-6843-4822-be42-a40b41e75285",
"reason": "medical",
"repeat_end_day": "12/01/23",
"repeat": "weekly",
"start_day": "11/01/23"
}
}
Get All Time Off for a single Person
GET - /v2/companies/<company_id>/people/<person_id>/time-off
Required Params
Property | Data Type | Description |
---|---|---|
timezone | String | Ex: America/Chciago The timezone by which to order time off entries. |
Optional Params
Property | Data Type | Description |
---|---|---|
limit | Number | The number of time off records to be returned in a single request. By default the limit is 40 |
start_after | UUID String | Time off ID used for pagination. If there are more records than the limit , the ID of the last Time Off Record is in the list should be passed as the starting_after in the next request to find the next batch of records |
When you get a successful response, you will be returned an object that contains the following properties data
and pagination
.
The data
object contains the time off records corresponding to the person_id
specified in the path. The time off entries are sorted chronologically by start_day
.
The pagination
object returns the limit
, next_starting_after
, previous_starting_before
, and total_possible
.
{
"data": [
{
"apply_to_saturday": false,
"apply_to_sunday": false,
"batch_end_time": "3:30 PM",
"batch_start_time": "7:00 AM",
"cadence": 1,
"company_id": "a4592b47-42ae-478f-926d-e77a7f768059",
"created_at": 1698072459341,
"end_day": "11/01/23",
"id": "222df6e4-b8ea-46fd-a39c-5570d3fd5ace",
"instances": [
{
"id": "583899cc-e6a7-42f7-9ed3-e4b182732822",
"start_day": "11/01/23",
"end_day": "11/01/23"
}
],
"is_paid": true,
"person_id": "81c63107-6843-4822-be42-a40b41e75285",
"reason": "sick",
"repeat_end_day": "11/01/23",
"repeat": "weekly",
"start_day": "11/01/23",
"job_title": {
"color": "#0007ff",
"company_id": "a4592b47-42ae-478f-926d-e77a7f768059",
"created_at": "2023-08-28T20:07:59.133+00:00",
"globally_accessible": false,
"group_ids": [
"02b9fb14-0525-4c91-9885-dd27e2ce04ae",
"c626e37c-9fe1-4c4b-8db7-4e150057e142"
],
"id": "7038e7e0-ae7c-4e85-8fff-ae543b2d993a",
"name": "General Foreman",
"sequence": 1,
"type": "hourly",
"hourly_rate": 35
},
"person_name": {
"last": "Garner",
"first": "Colin"
},
"occurrences_count": 1
}
],
"pagination": {
"limit": 1,
"next_starting_after": "222df6e4-b8ea-46fd-a39c-5570d3fd5ace",
"previous_starting_before": null,
"total_possible": 8
}
}
Updated about 1 year ago
What’s Next