Skip to main content

What is an Event

An event is any operation, alert, or notification that your system needs to deliver reliably — regardless of connectivity conditions. Events are the core primitive of the Wede platform. You send an event, Wede guarantees delivery through the best available channel.

Event Structure

{
  "type": "EMERGENCY_DISPATCH",
  "priority": "critical",
  "vertical": "healthcare",
  "idempotency_key": "dispatch-2026-05-19-amb07-001",
  "payload": {
    "unit": "AMB-PT-07",
    "location": "Hospital Santa Maria, Lisboa"
  }
}
FieldRequiredDescription
typeYesEvent type — freeform string, uppercase recommended
priorityYescritical, high, normal, or low
verticalYesIndustry vertical — see Verticals
idempotency_keyYesUnique key to prevent duplicate processing
payloadNoArbitrary JSON payload — your data, opaque to Wede
zone_codeNoTarget zone — routes to specific operational area

Priority Levels

PriorityDescriptionChannel Behaviour
criticalImmediate delivery requiredAll channels attempted in parallel
highFast delivery, minor delay acceptablePrimary + fallback channels
normalStandard deliveryPrimary channel with fallback
lowBest-effort deliveryPrimary channel only

Event Response

{
  "event_id": "0ee3dfbe-1234-abcd-5678-ef90ab12cd34",
  "status": "pending",
  "channel_selected": "rest_full",
  "created_at": "2026-05-19T10:00:00Z"
}

Event Status

StatusMeaning
pendingAccepted, awaiting delivery
deliveredSuccessfully delivered
failedDelivery failed after all retries
queued_offlineQueued for delivery when connectivity restores

Event Examples by Vertical

Healthcare:
{
  "type": "ICU_ALERT",
  "priority": "critical",
  "vertical": "healthcare",
  "idempotency_key": "icu-alert-2026-05-19-ward3b-001",
  "payload": {
    "patient_id": "PT-9821",
    "ward": "3B",
    "alert": "cardiac_arrhythmia",
    "nurse_call": true
  }
}
Banking:
{
  "type": "PAYMENT_DECLINED",
  "priority": "high",
  "vertical": "banking",
  "idempotency_key": "payment-decline-term042-20260519-001",
  "payload": {
    "terminal_id": "POS-NG-042",
    "reason": "connectivity_timeout",
    "amount": 45000,
    "currency": "NGN"
  }
}
Logistics:
{
  "type": "SHIPMENT_DELAYED",
  "priority": "normal",
  "vertical": "delivery",
  "idempotency_key": "shipment-delay-ord29841-20260519",
  "payload": {
    "order_id": "ORD-29841",
    "driver_id": "DRV-KE-019",
    "reason": "road_closure",
    "new_eta": "2026-05-19T16:30:00Z"
  }
}
Telecom:
{
  "type": "TOWER_DOWN",
  "priority": "critical",
  "vertical": "telecom",
  "idempotency_key": "tower-down-bts112-20260519-001",
  "payload": {
    "site_id": "BTS-AE-112",
    "location": "Dubai — Al Barsha",
    "cause": "power_failure",
    "affected_subscribers": 8400
  }
}
Government:
{
  "type": "CIVIL_PROTECTION_ALERT",
  "priority": "critical",
  "vertical": "gov",
  "idempotency_key": "civil-alert-maputo-norte-20260519",
  "payload": {
    "zone": "zona_norte_maputo",
    "alert_type": "flood_warning",
    "severity": "red",
    "population_affected": 34000
  }
}

Listing Events

curl https://api.wede.pt/v1/events \
  -H "x-wede-api-key: wede_live_YOUR_KEY"

Idempotency

Always provide a unique idempotency_key per logical event. If the same key is submitted twice, Wede processes it once and returns the original response. Good idempotency keys include:
  • Timestamp + entity + sequence: dispatch-2026-05-19-amb07-001
  • Your internal event ID: internal-evt-id-84729
  • UUID: 550e8400-e29b-41d4-a716-446655440000