Skip to content

Zapier Webhook Payloads for Leave Requests

Each Zapier trigger sends one enriched leave request as a JSON object. Core request data is always included, while resolved employee, leave type, and approver details are added when the related lookup succeeds.

Sample payload

Use the sample below as the shape for an approved request. It shows how identifiers, dates, day counts, and resolved names sit together in one object. Map Zapier fields from this object rather than assuming separate lookups are needed for employee, leave type, or approver.

Core fields

These values are present in every delivery and form the reliable base for mapping: id (string, unique leave request ID); companyId (string); userId (string, employee who owns the request); leaveTypeId (string); startDate and endDate (string, YYYY-MM-DD); isPartDay (boolean); status (string: OPEN, APPROVED, DENIED, CANCELLED, EXPIRED, or DELETED); workingDays and calendarDays (number); daysList (array of day, leaveHours, and workingHoursInDay); totalThisYear and totalNextYear (number, with totalNextYear covering cross-year leaves); created (string, ISO 8601 timestamp); teamId (string, employee team/department); locationId (string); leavePolicyId (string, compound locationId#leaveTypeId).

Enrichment fields

Resolved details are added from related records: userName and userEmail for the employee, userEmployeeId when set, leaveTypeName such as Paid Time Off, and approverName, approverEmail, and approverEmployeeId when applicable. If a lookup fails, that field is omitted instead of causing the webhook to fail, so downstream steps should treat enrichment fields as optional.

wasApprovedBeforeAction logic

Check wasApprovedBeforeAction to learn the state before the current event. For LEAVE_REQUEST_CANCELLED, true means the request had been approved before cancellation and false means it was still pending. For other events, true means it had been approved before the action, for example an approved request being edited, and false means it had not previously been approved. Typical values: LEAVE_REQUEST_CREATED false, LEAVE_REQUEST_ADDED false, LEAVE_REQUEST_APPROVED false, LEAVE_REQUEST_DENIED false, LEAVE_REQUEST_UPDATED true, LEAVE_REQUEST_CANCELLED true, LEAVE_REQUEST_DELETED false. Treat these as typical, not as a substitute for reading the field on each delivery.

Per-event field differences

LEAVE_REQUEST_CREATED: no approverId, approverName, or approverEmail, and no autoApproved, because approval workflow has not started. LEAVE_REQUEST_ADDED: no approver fields, but includes autoApproved: true. LEAVE_REQUEST_DELETED: no approver fields. All other events: include the full field set, including approver information. Build Zapier steps so approver fields are only referenced where the event supplies them.

Stripped fields

The following internal fields are never sent: reason (may contain sensitive information such as medical details), statusReason (internal manager note), cancelledBeforeReview (internal flag consumed to compute wasApprovedBeforeAction), originalVersion (internal previous-state snapshot), errors (internal error tracking), isResent (internal resend flag), resentLeaveRequestId (internal reference), hasWorkingHoursSchedule (internal scheduling flag), leaveDaysList (deprecated, superseded by daysList), partDayStartHour and partDayEndHour (internal hour values), and isEdited (internal edit tracking flag). Do not map these fields in Zapier.

Implementation checklist

Before publishing a Zap, test each event type separately, confirm which enrichment fields appear, and verify that approver-dependent actions are not used for created, added, or deleted events. Use wasApprovedBeforeAction to distinguish a cancellation of an approved request from a cancellation of a pending one.

Core fields
FieldTypeDescription
idstringUnique leave request ID
companyIdstringCompany ID
userIdstringID of the employee who owns the leave request
leaveTypeIdstringID of the leave type
startDatestringStart date in YYYY-MM-DD format
endDatestringEnd date in YYYY-MM-DD format
isPartDaybooleanWhether this is a partial day leave
statusstringCurrent status: OPEN , APPROVED , DENIED , CANCELLED , EXPIRED , or DELETED
workingDaysnumberNumber of working days consumed
calendarDaysnumberTotal calendar days of the leave
daysListarrayBreakdown of each day with day , leaveHours , and workingHoursInDay
totalThisYearnumberDays consumed in the current year
totalNextYearnumberDays consumed in the next year (for cross-year leaves)
createdstringISO 8601 timestamp when the request was created
teamIdstringID of the employee's team/department
locationIdstringID of the employee's location
leavePolicyIdstringCompound ID of the leave policy ( locationId#leaveTypeId )

Always present

Enrichment fields
FieldTypeDescription
userNamestringFull name of the employee
userEmailstringEmail address of the employee
userEmployeeIdstringEmployee ID (if set)
leaveTypeNamestringName of the leave type (e.g., "Paid Time Off")
approverNamestringFull name of the approver (when applicable)
approverEmailstringEmail address of the approver (when applicable)
approverEmployeeIdstringEmployee ID of the approver (when applicable)
wasApprovedBeforeActionbooleanWhether the request was in an approved state before this event occurred

Omitted if related lookup fails

wasApprovedBeforeAction by event
EventTypical value
LEAVE_REQUEST_CREATEDfalse
LEAVE_REQUEST_ADDEDfalse
LEAVE_REQUEST_APPROVEDfalse
LEAVE_REQUEST_DENIEDfalse
LEAVE_REQUEST_UPDATEDtrue
LEAVE_REQUEST_CANCELLEDtrue
LEAVE_REQUEST_DELETEDfalse

Typical values for wasApprovedBeforeAction

Stripped fields
FieldReason
reasonMay contain sensitive information (e.g., medical details)
statusReasonInternal manager note
cancelledBeforeReviewInternal flag (consumed to compute wasApprovedBeforeAction )
originalVersionInternal previous-state snapshot
errorsInternal error tracking
isResentInternal resend flag
resentLeaveRequestIdInternal reference
hasWorkingHoursScheduleInternal scheduling flag
leaveDaysListDeprecated (superseded by daysList )
partDayStartHourInternal hour value
partDayEndHourInternal hour value
isEditedInternal edit tracking flag

Never included in webhook payloads

Frequently asked questions

Zapier Integration [SVG icon] — what related developer pages are available? Answer: Triggers, Webhook Payloads, and Setup Guide.

Zapier Integration Triggers Webhook Payloads Setup Guide

{
  "id": "leaveRequest-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "companyId": "company-1234-5678-abcd",
  "userId": "user-abcd-1234-5678",
  "leaveTypeId": "leaveType-c3d4e5f6-a7b8-9012-cdef-123456789012",
  "startDate": "2026-03-20",
  "endDate": "2026-03-20",
  "isPartDay": false,
  "status": "APPROVED",
  "workingDays": 1,
  "calendarDays": 1,
  "daysList": [
    {
      "day": "2026-03-20",
      "leaveHours": 8,
      "workingHoursInDay": 8
    }
  ],
  "totalThisYear": 1,
  "totalNextYear": 0,
  "created": "2026-03-20T12:00:00.000Z",
  "teamId": "team-d4e5f6a7-b8c9-0123-defa-234567890123",
  "locationId": "location-e5f6a7b8-c9d0-1234-efab-345678901234",
  "leavePolicyId": "location-e5f6a7b8-c9d0-1234-efab-345678901234#leaveType-c3d4e5f6-a7b8-9012-cdef-123456789012",
  "wasApprovedBeforeAction": false,
  "autoApproved": false,
  "approverId": "email-f6a7b8c9-d0e1-2345-fabc-456789012345",
  "approverName": "John Manager",
  "approverEmail": "[email protected]",
  "userName": "Jane Doe",
  "userEmail": "[email protected]",
  "leaveTypeName": "Paid Time Off"
}