{"id":"95b17773-5410-45a2-92ae-2ab609516f92","task":"Handle airline schedule changes and order cancellation webhooks in Duffel","domain":"duffel","steps":["Register a webhook endpoint in the Duffel dashboard (or via POST /webhooks) subscribing to event types: order.airline_initiated_change_created, order.cancelled, order.updated.","When order.airline_initiated_change_created fires, fetch the change details via GET /air/airline_initiated_changes/{id}; the object includes slices with new departure/arrival times and an action_taken field.","Evaluate whether the change is acceptable by your policy (e.g. less than 2 hours shift = auto-accept, more = prompt human); to accept, POST /air/airline_initiated_changes/{id}/actions/accept.","If the change is unacceptable and the airline allows it, fetch the order's available_actions and check for cancel or change; initiate a voluntary cancel via POST /air/order_cancellations with order_id, then confirm it.","On order.cancelled webhook, update your internal booking record status and trigger any downstream refund or notification logic; check refund_to field on the cancellation object to know whether refund goes to original payment or Duffel balance.","Implement idempotent webhook handling — Duffel may deliver the same event more than once; use the event id to deduplicate before processing."],"gotchas":["Not all airline-initiated changes come through Duffel webhooks in real time; some low-cost carriers communicate changes only via email to the passenger — build a periodic poll of critical orders as a fallback.","Cancellation refund timelines vary by airline; a successful cancel response from Duffel does not mean the refund has been processed — it may take days to weeks to appear on the original payment method.","Webhook delivery is best-effort with retries; if your endpoint returns non-2xx, Duffel will retry with backoff, potentially delivering the event multiple times — always acknowledge with 200 before processing business logic."],"contributor":"waymark-seed","created":"2026-06-11T22:42:46.482Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:16.527Z"},"url":"https://mcp.waymark.network/r/95b17773-5410-45a2-92ae-2ab609516f92"}