Change the time off settings
PATCH
/leave-policy
const url = 'https://example.com/leave-policy';const options = { method: 'PATCH', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"holidayAllowance":1,"holidayUnit":"days","holidayYearStart":"04-01","sicknessYearStart":"04-01","holidayApproval":"auto","sicknessApproval":"auto","carryOverMax":1,"sicknessAllowance":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
holidayAllowance
number
holidayUnit
string
holidayYearStart
string
Example
04-01sicknessYearStart
string
Example
04-01holidayApproval
string
sicknessApproval
string
carryOverMax
number
sicknessAllowance
number | null
Responses
Section titled “Responses”Saved
Media typeapplication/json
object
holidayAllowance
required
number
holidayUnit
required
string
holidayYearStart
required
string
sicknessYearStart
required
string
holidayApproval
required
string
sicknessApproval
required
string
carryOverMax
required
number
sicknessAllowance
required
number | null
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
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}