staff.leavetypes

Get Leave Types

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
deleted (accepted)varcharDeleted

UPDATE

ParametersTypeDescription
token (required)Valid token
id (required)integer
do_not_deduct (accepted)enum (0,1)
max_num_at_once (accepted)integer
days_booked_in_advance (accepted)integer
allow_hourly (accepted)enum (0,1)

DOCUMENTATION

GET
Ping user.
Level 7 is required (all users can fetch this module)

--

Example Request:

{
   "module":"staff.leavetypes",
   "method":"GET",
   "request":{
   }
}

Example Response:

{
    "status": 1,
    "data": [
        {
            "id": "211506",
            "name": "Vacation",
            "allow_hourly": "1"
        },
        {
            "id": "310745",
            "name": "Sick leave",
            "allow_hourly": "1"
        }
    ],
    "token": "xxxxxxx"
}

UPDATE

--
Example Request:

{
   "module":"staff.leavetypes",
   "method":"UPDATE",
   "request":{
     "id":"310745",
     "allow_hourly":"0"
   }
}

Example Response:

{
    "status": 1,
    "data": "Allow hourly leave type state changed.",
    "token": "xxxxxxx"
}