Zum Hauptinhalt springen
PUT
Update a leave type

Autorisierungen

X-API-KEY
string
header
erforderlich

Pfadparameter

id
string<uuid>
erforderlich
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Body

application/json
name
string
Maximum string length: 255
color
string
needs_approval
boolean
maximum_absent
boolean
leave_unit
enum<string>

When take_from_allowance is true, the unit follows the allowance: an hour or minute unit is saved as days for a days-based allowance, and days or half_days is saved as hours for an hours-based allowance. Switching between day and hour units is rejected while the leave type has requests that are not canceled or declined.

Verfügbare Optionen:
days,
half_days,
hours,
minutes_30,
minutes_15,
minutes_10,
minutes_5,
minutes_1
position
integer
Erforderlicher Bereich: -9007199254740991 <= x <= 9007199254740991
take_from_allowance
boolean
privacy_hide_leavetype
boolean
outlook_synchronization_show_as
enum<string>
Verfügbare Optionen:
free,
tentative,
busy,
oof,
workingElsewhere,
unknown
outlook_synchronization_subject
string | null
icon
enum<string>
Verfügbare Optionen:
NoIcon,
Umbrella,
Anchor,
Archive,
Award,
Briefcase,
Calendar,
Cast,
Clock,
Coffee,
Compass,
Battery,
Emoji,
Gift,
Frown,
Image,
Sun,
Home,
Zap,
Users,
TreePalm,
Plane,
Luggage,
Tent,
Mountain,
Bike,
Waves,
Snowflake,
Ship,
Map,
Camera,
Sunset,
Thermometer,
Pill,
Stethoscope,
HeartPulse,
Hospital,
Bandage,
Brain,
Syringe,
Bed,
Ambulance,
Eye,
Accessibility,
Activity,
Baby,
Heart,
HeartHandshake,
Dog,
Truck,
Milk,
HandHeart,
ToyBrick,
Cake,
Laptop,
Building2,
Presentation,
Car,
TrainFront,
RotateCcw,
Headset,
Phone,
HardHat,
Wrench,
Globe,
MapPin,
GraduationCap,
BookOpen,
School,
Languages,
Lightbulb,
PenLine,
PartyPopper,
Gem,
Flower2,
Landmark,
Vote,
Shield,
Church,
HandHelping,
Scale,
Siren,
Trophy,
Star,
Timer,
Hourglass,
CalendarOff,
Moon,
AlarmClock,
Sunrise,
CalendarDays,
CalendarHeart,
Megaphone,
CloudLightning,
Leaf,
Lock,
Ban,
CircleHelp
reason_mandatory
boolean
reason_hint_text
string | null
allowance_type_id
string | null
sync_option
enum<string>
Verfügbare Optionen:
Disabled,
All,
OnlyApproved
counts_as_leave
boolean
allow_representative_overlap
boolean
allow_request_changes
boolean

Whether pending and approved requests of this leave type can be changed.

request_shortening_needs_approval
boolean

Shortening an approved request needs approval from its approvers when this is on. Off by default: a shortened request applies at once and the days go back to the allowance. Extending or moving always needs approval. When request_cancellation_needs_approval is on and the leave type needs approval (and the cancellation approval feature is on for the workspace), the requester's own shortening needs approval too, whatever this is set to; the stored value is kept. For admins and managers of the requester, shortening follows this setting alone.

request_cancellation_needs_approval
boolean

A stored setting. It takes effect only when the cancellation approval feature is on for the workspace and the leave type needs approval: then a member who cancels their own approved request (before it starts) asks their approvers instead, and the final approval cancels it. Through the API the requester has to send accepts_cancellation_request: true to POST /requests/{id}/cancel to ask; when nobody other than the requester would have to approve, the request is cancelled at once. An admin, or a manager cancelling for someone in their department, always cancels at once. While it takes effect, the requester's own shortening of an approved request and switch to a leave type without approval need approval too; admins and managers are not affected. Turning it on without the feature is rejected with 403.

translations
object[]

Replaces the stored translations. Omit the field to leave them untouched.

Antwort

string<uuid> | null

Successful response

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$