Handling the holiday.deleted Webhook Event
This event tells an integration that one location holiday has been removed. It is a deletion notice rather than a full holiday record: the useful work is to remove the identified holiday from local state, deduplicate repeat deliveries, and avoid trying to reconstruct details that were not sent.
When to use this event
Subscribe only if your integration needs to react when a location holiday disappears. The webhook owner requires holidays:read. When this event arrives, use it as a removal signal: find the local holiday by the identifier in data, delete that entry, and then reconcile any derived calendars or caches that depended on it. Because the former holiday details are not included, keep any display information you still need from your own earlier synchronisation rather than expecting to recover it from this payload.
Verify and route the delivery
Verify the delivery before acting on it. VT-Signature carries the timestamp and HMAC-SHA256 signature material; during the 24 hours after a secret rotation, a second signature entry may be present for the previous secret. VT-Webhook-Id identifies the configured webhook, VT-Event-Id matches the body's id, and VT-Event-Type matches the body's type. VT-Delivery-Id remains the same across retries of one delivery, while VT-Delivery-Attempt starts at 1 and increases for later attempts. These distinctions let you verify authenticity, route the event, and separate delivery retries from genuinely repeated changes.
Process the identifier-only payload
The JSON body uses API version 2 and includes the event id, type, creation timestamp, companyId and data. For this deletion event, data follows the deleted-resource shape: id is required, while userId and locationId are present only when known. The event id is deterministic for the same change, so store processed event IDs and skip a repeat instead of deleting the same local record twice. If apiClient is present, it identifies the API key that made the change; its absence means the change was not made through the API.
Implementation checklist
Confirm the event type is holiday.deleted before applying deletion logic. Confirm the signature using the raw body and timestamp. Check the processed-event store using the deterministic id. Remove the holiday identified by data.id and use data.locationId, when supplied, to scope the removal or refresh the affected location view. Record the delivery attempt for diagnostics without treating a retry as a new deletion. Finally, return a successful response only after the local removal and bookkeeping are complete.
Single deletion versus bulk holiday changes
A single holiday removal uses holiday.deleted and carries the deleted holiday's identifiers. A bulk import or whole-year change is a different signal: it identifies the location and requires a fresh read of that location's holidays. Do not use the bulk flow for one deletion, and do not expect this single-deletion payload to enumerate a changed set. Keeping those two paths separate prevents an integration from either missing a bulk refresh or making an unnecessary fetch after every individual deletion.
| Field or header | Use in this handler | Important qualification |
|---|---|---|
| VT-Event-Id / body id | Deduplicate the underlying change | Deterministic for the same change; matches across header and body |
| VT-Delivery-Id | Track retries of one delivery | Unique per delivery and retained across its retries |
| VT-Delivery-Attempt | Diagnose retry progression | Starts at 1 |
| data.id | Locate the local holiday to remove | Required identifier of the deleted resource |
| data.locationId | Scope removal or refresh | Present only when known |
| apiClient | Attribute an API-made change | Present only when the change was made through the API |
Exact types, requiredness and allowed values are defined by the accompanying protected contract modules.
Frequently asked questions
How should duplicate holiday.deleted deliveries be handled?
Use the deterministic event ID from the body, matching VT-Event-Id, to recognise a repeat. Keep VT-Delivery-Id separate: it stays constant across retries of one delivery, while the event ID identifies the underlying change.
What information can be relied on from data?
Treat the payload as an identifier-only notice. Read data.id for the deleted holiday and, when present, data.locationId for its location. Do not expect the holiday name, date or other former fields in this event.
Which permission and optional provenance information apply?
The webhook owner needs holidays:read. If the deletion was made through the API, apiClient may also identify the key used; it is absent for changes made outside the API.
VT-Signature
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Signature | string | Yes | t= ,v1= . "> . For 24 hours after a secret rotation it carries a second v1 entry signed with the previous secret. See Signature verification at the top of this document. |
VT-Webhook-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Webhook-Id | string | Yes | the ID of the webhook the delivery is for. |
VT-Event-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Event-Id | string | Yes | the event ID, the same as id in the body. Use it to skip duplicate deliveries. |
VT-Event-Type
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Event-Type | string | Yes | the event type, the same as type in the body. | Allowed values: $3b |
VT-Delivery-Id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Delivery-Id | string | Yes | the delivery ID, unique per delivery and kept across retries of the same delivery. |
VT-Delivery-Attempt
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| VT-Delivery-Attempt | integer | Yes | the attempt number of this delivery, starting at 1. | 1 <= value |