POST Leave type

Changed on

Permission Level: 5

post/leave-types?access_token={{token}}

Request

  • Base URL
    https://www.humanity.com/api/v2
  • Auth
    API key in query parameter access_token

Request body application/x-www-form-urlencoded

max_num_at_onceinteger

Limits maximum number of staff that can be booked at once

days_booked_in_advancinteger

Sets how many days the leave has to be booked in advance

allow_hourlyinteger

Can be 0 and 1 - if set to 0 this leave type can only have full day request, if set to 1 it will allow hourly leave requests

entitledinteger

Maximum number of days for this leave type

titlestring

Title of the leave type

descriptionstring

Leave type description

Response

200

statusinteger
tokenstring
errorunknown

Example response

{
  "status": 1,
  "data": {
    "id": "328497",
    "name": "Leave Type API TEST",
    "description": "Just a regular remote work",
    "allow_hourly": "1",
    "max_num_of_staff_at_once": 2,
    "days_booked_in_advance": 5,
    "entitled": 22,
    "created_at": "2017-09-24 21:23:09",
    "created_by": 3475050
  },
  "token": "xxxxxxx"
}

Changes