Leave types

Update a leave type

Changed on

Update a leave type. Omitted fields keep their current value, so a request that only sends name renames the leave type and changes nothing else.

put/leave_types/{id}

Request

  • Base URL
    https://api.absentify.com/api/v1
  • URL
    https://api.absentify.com/api/v1/leave_types/{id}
  • Auth
    API key in header X-API-KEY

Path parameters

idstring uuid required

Request body

namestring
colorstring
needs_approvalboolean
maximum_absentboolean
leave_unit'days' | 'half_days' | 'hours' | 'minutes_30' | 'minutes_15' | 'minutes_10' | 'minutes_5' | 'minutes_1'

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.

positioninteger
take_from_allowanceboolean
privacy_hide_leavetypeboolean
outlook_synchronization_show_as'free' | 'tentative' | 'busy' | 'oof' | 'workingElsewhere' | 'unknown'
outlook_synchronization_subjectstring nullable
icon'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_mandatoryboolean
reason_hint_textstring nullable
allowance_type_idstring nullable
sync_option'Disabled' | 'All' | 'OnlyApproved'
counts_as_leaveboolean
allow_representative_overlapboolean
allow_request_changesboolean

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

request_shortening_needs_approvalboolean

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.

Response

Successful response

string uuid nullable required

Changes

    • info

      added the new optional request property

    • info

      added the new Accessibility enum value to the request property

    • info

      added the new Activity enum value to the request property

    • info

      added the new AlarmClock enum value to the request property

    • info

      added the new Ambulance enum value to the request property

    • info

      added the new Baby enum value to the request property

    • info

      added the new Ban enum value to the request property

    • info

      added the new Bandage enum value to the request property

    • info

      added the new Bed enum value to the request property

    • info

      added the new Bike enum value to the request property

    • info

      added the new BookOpen enum value to the request property

    • info

      added the new Brain enum value to the request property

    • info

      added the new Building2 enum value to the request property

    • info

      added the new Cake enum value to the request property

    • info

      added the new CalendarDays enum value to the request property

    • info

      added the new CalendarHeart enum value to the request property

    • info

      added the new CalendarOff enum value to the request property

    • info

      added the new Camera enum value to the request property

    • info

      added the new Car enum value to the request property

    • info

      added the new Church enum value to the request property

    • info

      added the new CircleHelp enum value to the request property

    • info

      added the new CloudLightning enum value to the request property

    • info

      added the new Dog enum value to the request property

    • info

      added the new Eye enum value to the request property

    • info

      added the new Flower2 enum value to the request property

    • info

      added the new Gem enum value to the request property

    • info

      added the new Globe enum value to the request property

    • info

      added the new GraduationCap enum value to the request property

    • info

      added the new HandHeart enum value to the request property

    • info

      added the new HandHelping enum value to the request property

    • info

      added the new HardHat enum value to the request property

    • info

      added the new Headset enum value to the request property

    • info

      added the new Heart enum value to the request property

    • info

      added the new HeartHandshake enum value to the request property

    • info

      added the new HeartPulse enum value to the request property

    • info

      added the new Hospital enum value to the request property

    • info

      added the new Hourglass enum value to the request property

    • info

      added the new Landmark enum value to the request property

    • info

      added the new Languages enum value to the request property

    • info

      added the new Laptop enum value to the request property

    • info

      added the new Leaf enum value to the request property

    • info

      added the new Lightbulb enum value to the request property

    • info

      added the new Lock enum value to the request property

    • info

      added the new Luggage enum value to the request property

    • info

      added the new Map enum value to the request property

    • info

      added the new MapPin enum value to the request property

    • info

      added the new Megaphone enum value to the request property

    • info

      added the new Milk enum value to the request property

    • info

      added the new Moon enum value to the request property

    • info

      added the new Mountain enum value to the request property

    • info

      added the new PartyPopper enum value to the request property

    • info

      added the new PenLine enum value to the request property

    • info

      added the new Phone enum value to the request property

    • info

      added the new Pill enum value to the request property

    • info

      added the new Plane enum value to the request property

    • info

      added the new Presentation enum value to the request property

    • info

      added the new RotateCcw enum value to the request property

    • info

      added the new Scale enum value to the request property

    • info

      added the new School enum value to the request property

    • info

      added the new Shield enum value to the request property

    • info

      added the new Ship enum value to the request property

    • info

      added the new Siren enum value to the request property

    • info

      added the new Snowflake enum value to the request property

    • info

      added the new Star enum value to the request property

    • info

      added the new Stethoscope enum value to the request property

    • info

      added the new Sunrise enum value to the request property

    • info

      added the new Sunset enum value to the request property

    • info

      added the new Syringe enum value to the request property

    • info

      added the new Tent enum value to the request property

    • info

      added the new Thermometer enum value to the request property

    • info

      added the new Timer enum value to the request property

    • info

      added the new ToyBrick enum value to the request property

    • info

      added the new TrainFront enum value to the request property

    • info

      added the new TreePalm enum value to the request property

    • info

      added the new Trophy enum value to the request property

    • info

      added the new Truck enum value to the request property

    • info

      added the new Vote enum value to the request property

    • info

      added the new Waves enum value to the request property

    • info

      added the new Wrench enum value to the request property

    • info

      added the new optional request property