Create
Create a Time Off for a Person
POST - /v2/companies/<company_id>/people/<person_id>/time-off
Required Properties
Property | Data Type | Description |
---|---|---|
end_day | MM/DD/YY date string | Ex: This date represents the end date of the time off. The end day cannot be before the start_day. |
start_day | MM/DD/YY date string | Ex: This date represents the start date of the time off. |
apply_to_saturday | Boolean | Denotes whether or not the time off applies to Saturdays. |
apply_to_sunday | Boolean | Denotes whether or not the time off applies to Sundays. |
is_paid | Boolean | Denotes whether or not the time off is paid. |
reason | String | Reason for the time off. |
repeat | String | Repeat interval of the time off instances. Accepted values are When this field is |
batch_start_time | String | Ex: Time format needs to be structured as "HH:MM am/pm". Leading 0 on single digit hours is not needed. For minutes, only 15 minute increments are currently used by our scheduling system and thus, all we allow here. If you provide something other than a 15 minute increment, it will be rounded. |
batch_end_time | String | Ex: Time format needs to be structured as "HH:MM am/pm". Leading 0 on single digit hours is not needed. For minutes, only 15 minute increments are currently used by our scheduling system and thus, all we allow here. If you provide something other than a 15 minute increment, it will be rounded. |
Repeating Time Off
Time off instances can be created as repeating time off. For example, an assignable resource needs to take each Friday off in a particular month. In this case, the time off can be created in a single request by providing just a couple more fields in the request body. (Note: These fields are required if the repeat is not never
)
Property | Data Type | Description |
---|---|---|
cadence | Number | The cadence of the repeating time off. For example, if the repeat is |
repeat_end_day | DD/MM/YY Date String | Ex: The date the repeating time off ends. |
Request Body
Weekly Repeating Time Off Request
{
"apply_to_saturday": false,
"apply_to_sunday": false,
"batch_end_time": "3:30 PM",
"batch_start_time": "7:00 AM",
"cadence": 1,
"end_day": "11/01/23",
"is_paid": true,
"reason": "medical",
"repeat": "weekly",
"repeat_end_day": "12/01/23",
"start_day": "11/01/23"
}
Responses:
Successful Response
When new Time Off Is created for the specified person, you will get a returned copy of the resulting data.
{
"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"
}
}
Updated 21 days ago