Skip to content

holiday.updated webhook event

The holiday.updated event fires when a holiday belonging to a location is changed.

When the event fires and what it requires

A delivery is produced when a holiday of a location changes. The webhook owner must hold the holidays:read scope for the event to be sent. The event type in the body is one of "holiday.created" or "holiday.updated"; for this event it is "holiday.updated". A test delivery uses webhook.test, which cannot be subscribed to, so a receiver should not treat it as a real holiday change.

Headers to read before the body

Every delivery carries a set of headers that let a receiver verify authenticity, identify the webhook, de-duplicate and count retries. The exact header contracts are preserved in the protected modules referenced below; the reader-facing summary is: VT-Signature carries the timestamp and HMAC entries used for verification, VT-Webhook-Id identifies which webhook the delivery belongs to, VT-Event-Id matches the body id and is the de-duplication key, VT-Event-Type matches the body type, VT-Delivery-Id stays constant across retries of one delivery, and VT-Delivery-Attempt starts at 1 and increases on each retry. The User-Agent value is fixed by the platform.

Body shape of a holiday.updated delivery

The body is a HolidayWebhookEvent object. It carries an event id, the event type, an apiVersion of "2", a createdAt timestamp, the companyId, the data object describing the affected holiday, and an optional apiClient object that is present only when the change was made through the API. The data object is the same shape the matching GET endpoint returns, so a receiver that already parses holiday records can reuse that parser. The exact field list and types are preserved in the protected schema modules referenced below.

Field map for the holiday data object

The holiday data object has required fields id, locationId, name, date, isHalfDay, type, recurring, and optional fields multiDayId and transferredFrom. A few of these carry meaning that is easy to miss on a first read. multiDayId is shared by every day of a multi-day holiday and is left out for a single-day holiday, so a receiver that keys on id alone may treat each day of a multi-day holiday as a separate record. transferredFrom is present only when the holiday originally fell on a non-working day and was moved to the date in this delivery. The type field is "custom" for a holiday created in the product or through the API, and "imported" for one imported from the holiday library; imported holidays can only be renamed or made non-recurring. The date field is a YYYY-MM-DD date, not a timestamp.

Receiver checklist for a holiday.updated delivery

A practical order of operations for handling one delivery:

  1. Read VT-Event-Type and confirm it is "holiday.updated".
  2. Verify VT-Signature against the raw request body before parsing JSON. During a secret rotation window, a second v1 entry signed with the previous secret may also be present.
  3. Read VT-Event-Id and compare it with the body id; if the pair has already been processed, acknowledge and stop.
  4. Use VT-Delivery-Id to group retries of the same delivery and VT-Delivery-Attempt to see how many attempts have been made.
  5. Parse the HolidayWebhookEvent body and route on data.multiDayId and data.transferredFrom before applying the change.
  6. If data.apiClient is present, record the keyId and ownerId so the change can be attributed to the API key that made it.
  7. Acknowledge the delivery so retries stop.

Worked example: a multi-day holiday that moved

Suppose a three-day holiday is moved because its first day fell on a non-working day. The delivery arrives with type "holiday.updated" and apiVersion "2". Inside data, the three days share one multiDayId, each day has its own id and date, and the moved day carries transferredFrom set to the original date. A receiver that keys on id alone will see three separate records; a receiver that keys on multiDayId will see one holiday with three days. The same delivery may also carry apiClient if the move was made through the API, in which case keyId and ownerId identify the key and its owner.

Frequently asked questions

What scope does the webhook owner need for holiday.updated?

The webhook owner needs holidays:read. Without that scope the event is not delivered to that webhook.

How do I avoid processing the same holiday.updated delivery twice?

Use VT-Event-Id, which matches the body id. The id is deterministic, so the same change always produces the same id; store processed ids and skip repeats. VT-Delivery-Id stays the same across retries of one delivery, so it can also be used to group attempts.

What does VT-Signature contain?

The header holds a timestamp and one or more v1 entries. Each v1 entry is a hex HMAC-SHA256 computed over the timestamp, a literal dot, and the raw request body, with the timestamp taken in Unix seconds. When a secret has been rotated, deliveries sent within the following 24 hours include an extra v1 entry produced with the previous secret, so a receiver can accept either signature during that window.

Why do several deliveries share one holiday id?

The days of a multi-day holiday can share one id, and the earliest day represents the holiday in GET /v2/locations/{id}/holidays/{holidayId}. The days also share a multiDayId, which is left out for a single-day holiday.

Where can I get help with this event?

Contact the developer support address listed on the developer documentation site.

VT-Signature

FieldTypeRequiredDescriptionConstraints
VT-SignaturestringYest= ,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

FieldTypeRequiredDescriptionConstraints
VT-Webhook-IdstringYesthe ID of the webhook the delivery is for.

VT-Event-Id

FieldTypeRequiredDescriptionConstraints
VT-Event-IdstringYesthe event ID, the same as id in the body. Use it to skip duplicate deliveries.

VT-Event-Type

FieldTypeRequiredDescriptionConstraints
VT-Event-TypestringYesthe event type, the same as type in the body.Allowed values: $3b

VT-Delivery-Id

FieldTypeRequiredDescriptionConstraints
VT-Delivery-IdstringYesthe delivery ID, unique per delivery and kept across retries of the same delivery.

VT-Delivery-Attempt

FieldTypeRequiredDescriptionConstraints
VT-Delivery-AttemptintegerYesthe attempt number of this delivery, starting at 1.1 <= value