organization_location.deleted Event
Emitted when an organization location is deleted for a client. The
payload is a snapshot captured at deletion time — by the time you
receive it, the row no longer exists, so the embedded data fields are the
authoritative record of what was deleted.
| Property | Value |
|---|---|
| Type | organization_location.deleted |
| Data version | 1 |
| Entity | entity.type = "organizationLocation", entity.id = data.organizationLocationId |
| Fan-out | One delivery per matching subscription on the client |
The payload shape is shared with
organization_location.created
— the two events differ in semantics, not in shape.
🛈 Deleting a location detaches its workers. Any workers assigned to
the deleted location have their location cleared, and Listo fires one
worker.updated
per detached worker (those whose snapshot now shows
organizationLocation: null). Expect those events alongside this one.
Sample delivery
POST /your/webhook/path HTTP/1.1
Host: hooks.your-domain.com
Content-Type: application/json
User-Agent: ListoGlobal-Gateway/1.0
webhook-id: lglsoevt_uZT9xUZ0HP4NgDlJ8
webhook-timestamp: 1746541800
webhook-signature: v1,Ds0qX7tE0fRu0No2dJK1QGhcMIxtHQjLO2cVR8dYgDe=
{
"id": "lglsoevt_uZT9xUZ0HP4NgDlJ8",
"type": "organization_location.deleted",
"specVersion": 1,
"dataVersion": 1,
"occurredAt": "2026-05-07T08:11:53.184Z",
"entity": { "type": "organizationLocation", "id": "lglsoolc_uZIIHfKqYBwyaRGGs" },
"data": {
"organizationLocationId": "lglsoolc_uZIIHfKqYBwyaRGGs",
"clientId": "lglsocli_uZIIHfKqYBwyaRGGs",
"name": "New York Office",
"country": "United States",
"city": "New York",
"address": "123 Main St",
"createdAt": "2026-05-06T15:20:11.184Z",
"links": {
"self": "/v1/instance-integrations/inst_abc123xyz/clients/lglsocli_uZIIHfKqYBwyaRGGs/organization-structure"
}
}
}data schema
data schema| Field | Type | Description |
|---|---|---|
organizationLocationId | string | Public organization location ID (lglsoolc_…). Same value as entity.id. |
clientId | string | Public client ID this location belonged to (lglsocli_…). |
name | string | Location display name, captured at deletion time. |
country | string | Country. |
city | string | City. |
address | string | null | Street address, or null. |
createdAt | ISO-8601 UTC | When the location was originally created in Listo. |
links.self | string | Path to the client's organization-structure resource. Will not list this location. See note. |
🛈 The row is gone — trust the embedded fields. Because the location
has been deleted,links.self(the client'sorganization-structure
resource) will not include it. Unlike other events, do not re-fetch
for "current state" — thedatapayload is the authoritative record of
what was deleted.
Ordering and duplication
- Duplicates are normal. Dedupe on
webhook-id. - Order is not guaranteed. A
organization_location.deletedmay arrive
before its own
organization_location.created,
or before theworker.updatedevents for the workers it detached. Handle
gracefully — a delete for a location you never recorded is a no-op.
Common patterns
"Keep a location mirror in sync"
1. Verify signature, dedupe on webhook-id.
2. DELETE FROM org_locations WHERE id = data.organizationLocationId;
(or soft-delete / mark inactive, keeping the snapshot for audit).
3. Optionally clear location_id on any mirrored workers pointing at it —
you will also receive worker.updated for each detached worker.
4. Respond 200."Audit teardown of sites"
Because the payload is a frozen snapshot at deletion time, persist it as-is
for your audit log — there is no other way to recover the deleted
location's name / address afterward.
Updated about 1 month ago
