Skip to content

Change the time off settings

PATCH
/leave-policy
curl --request PATCH \
--url https://example.com/leave-policy \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "holidayAllowance": 1, "holidayUnit": "days", "holidayYearStart": "04-01", "sicknessYearStart": "04-01", "holidayApproval": "auto", "sicknessApproval": "auto", "carryOverMax": 1, "sicknessAllowance": 1 }'
Media typeapplication/json
object
holidayAllowance
number
<= 366
holidayUnit
string
Allowed values: days weeks
holidayYearStart
string
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
Example
04-01
sicknessYearStart
string
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
Example
04-01
holidayApproval
string
Allowed values: auto manual
sicknessApproval
string
Allowed values: auto manual
carryOverMax
number
<= 366
sicknessAllowance
number | null
<= 366

Saved

Media typeapplication/json
object
holidayAllowance
required
number
<= 366
holidayUnit
required
string
Allowed values: days weeks
holidayYearStart
required
string
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
sicknessYearStart
required
string
/^(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
holidayApproval
required
string
Allowed values: auto manual
sicknessApproval
required
string
Allowed values: auto manual
carryOverMax
required
number
<= 366
sicknessAllowance
required
number | null
<= 366
updatedAt
required
string format: date-time
Example
{
"holidayUnit": "days",
"holidayYearStart": "04-01",
"sicknessYearStart": "04-01",
"holidayApproval": "auto",
"sicknessApproval": "auto"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}