Webhooks

Timeoff > LeaveType > Updates

Subscription_type: timeoff/leave_type/update

postWebhookWebhooks > Timeoff > LeaveType > Updates

Payload

idstring required

Identifier of the leave type

namestring required

Name of the leave type

translated_namestring

Translated name of the leave type, if available

identifierstring required

Unique identifier of the leave type

colorstring required

The color associated with this leave type

activeboolean

Whether the leave type is active

editableboolean

Whether the leave type is editable

approval_requiredboolean

Whether leaves of this type must be approved before they take effect (when false, requests are auto-approved on creation)

accruesboolean

Whether leaves of this type consume an accruing balance/allowance (vs. a non-accruing type that does not draw down a balance)

attachmentboolean required

Whether an attachment (e.g. a sick note) can be added to leaves of this type

allow_endlessboolean

Whether leaves of this type may be open-ended (created with no finish date)

restrictedboolean

Whether requesting this leave type is restricted to specific employees or conditions rather than open to everyone

visibilityboolean required

Whether the leave type is visible to employees (vs. admin-only)

workableboolean required

Whether days taken under this leave type still count as workable (working) days

payableboolean

Whether leaves of this type are paid

company_idstring required

ID of the company this leave type belongs to

is_attachment_mandatoryboolean

Whether an attachment is mandatory (not just allowed) to request this leave type

allowance_idsstring[] required

IDs of the allowances this leave type draws its balance from

half_days_units_enabledboolean

Whether leaves of this type can be requested in half-day units

max_days_in_centsinteger

Maximum number of days a single request may take, in hundredths of a day (e.g. 5000 = 50 days); null if unbounded

min_days_in_centsinteger

Minimum number of days a single request must take, in hundredths of a day (e.g. 1000 = 10 days); null if unbounded

descriptionstring

Free-text description of the leave type

details_requiredboolean required

Whether the requester must provide additional details (a reason) when requesting this leave type

Example payload

{
  "id": "1",
  "name": "Annual Leave",
  "translated_name": "Congé Annuel",
  "identifier": "annual_leave",
  "color": "red",
  "active": true,
  "approval_required": true,
  "accrues": true,
  "attachment": true,
  "visibility": true,
  "payable": true,
  "company_id": "1",
  "allowance_ids": [
    "1",
    "2"
  ],
  "half_days_units_enabled": true,
  "max_days_in_cents": 5000,
  "min_days_in_cents": 1000,
  "description": "This leave type is for annual holidays."
}

Response

Return a 200 status to indicate that the data was received successfully

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.