Skip to main content

Overview

The DOWNSTREAM_ENTITY_LICENSE_EXPIRING webhook is triggered when one of your agencies’ licenses is 60 days from its renewal date. It exists because a lapsing agency license did not reliably reach you. Agency Compliance Status Change fires per product and state, and only when a compliance status actually flips, so a license expiring in a state you have no requirement for is silent. Nothing announced the approaching date itself. Webhook type: DOWNSTREAM_ENTITY_LICENSE_EXPIRING

Triggers

One delivery per license, on the day it is exactly 60 days from its nextRenewalDate.
Deliveries land on a daily sweep at 05:00 America/New_York, not in real time. This is a date crossing rather than a change to a record.
The 60 days here is not the 30 days in the Turris web app. The app’s own “Expiring Soon” badge appears at 30 days, so between 60 and 30 days out you will hold a license this webhook called expiring that the screen does not.Both numbers are correct for their purpose and neither is changing. Every delivery carries daysUntilExpiration and expiringWindowDays so the two surfaces reconcile. Read them rather than inferring a threshold.

What does not fire this event

Licenses marked do-not-renew DO fire

If a license has been marked do-not-renew, this event still fires. Turris suppresses its own renewal reminders in that case, because there is no point nagging about a license someone decided to drop. For a carrier the reasoning inverts: an agency deliberately letting a license lapse is one of the most actionable things you can hear about your distribution book.

Perpetual licenses never fire, and there are more than you might think

Both events are driven entirely by a range query on nextRenewalDate. A license without one cannot match, so it never produces a delivery. That is roughly 11% of agency licenses on the platform. If you reconcile deliveries against your own license count you will find a gap, and this is it. Read Get Downstream Entity Licenses for the full picture.

There is no “expired” license status to key on

status is copied verbatim from NIPR and nothing in Turris derives it from a date, so a license 60 days from expiry and one that lapsed last week both normally carry status: "active". Use daysUntilExpiration and nextRenewalDate. Do not use status to infer expiry.

Payload Example

Payload Fields

The entity fields are best-effort, and they all depend on one lookup. downstreamEntityId, legalName, downstreamEntityAssociationId, branchName and producerCode are resolved from your association with the agency. If that lookup misses — an agency archived between our read and the delivery is the realistic case — none of them arrive. If it hits, downstreamEntityId and downstreamEntityAssociationId are always present and the rest are individually best-effort.One distinction worth reading carefully: an absent producerCode key means the lookup did not resolve, whereas producerCode: null means it resolved and no producer code is assigned.
There is deliberately no expirationDate field. nextRenewalDate is the only expiry date the platform holds. (The license GET reference currently documents an expirationDate; that field does not exist on any record and no response has ever carried a value for it.)

Deduplication and volume

Each license matches the 60-day boundary on exactly one calendar day, so you receive one delivery per license per renewal cycle. No debouncing, no batching. A renewal that moves nextRenewalDate forward re-arms the event for the new date rather than cancelling anything already sent.
Size your receiver for the spike, not for the median. The two are three orders of magnitude apart. A typical sweep delivers single digits, and the 95th percentile is still under 50 — but the busiest measured sweep for a single carrier carries about 1,850 deliveries of this event alone.Return 2xx quickly and queue the work rather than processing inline. A receiver that handles the median sweep comfortably can still fall over on a peak one.
If the daily sweep does not run, that day’s licenses are not announced later. There is no catch-up pass. If you need a guarantee rather than a notification, reconcile against Get Downstream Entity Licenses on a schedule.
Webhook subscriptions are per event type. Subscribing to Agency License Expiring does not deliver Agency License Expired — register a separate webhook for each.