Skip to navigation

Add Leave Type

Adds a new leave type to your company. Shared rules: see Writing data.

  • name must be unique in the company, ignoring upper/lower case and outer spaces. A second leave type with the same name is refused with 400, so repeating is harmless.
  • leave_type is the category: privileged_leave, sick_leave, casual_leave or unpaid_leave.
  • Leave type names are matched exactly (case-sensitive) elsewhere; see GET /leave/type for the names in use.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Request

This endpoint expects an object.
namestringRequired1-255 characters
Leave type name. Unique in the company, ignoring case and outer spaces.
leave_typeenumRequired
Leave category.
Allowed values:

Response

The leave type was created.
messagestringOptional
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error