{"id":"616169b4-5082-48f0-a12f-854f5a84b5ec","task":"Process OCPI 2.2.1 Sessions module real-time updates for an in-progress charging session","domain":"evroaming.org","steps":["As the receiving party (typically the eMSP), expose the Sessions module's PATCH/PUT endpoint so the CPO can push updates for a session identified by its session_id as it progresses.","Distinguish a full PUT (complete Session object replacement, typically sent at session creation) from a PATCH (partial update carrying only changed fields, sent as the session evolves) and apply each accordingly rather than assuming every update is a full object.","Accumulate charging_periods from successive updates to build the session's running energy/time/cost breakdown, since each update may append new periods rather than resend the whole history.","Track the session's status field (e.g. ACTIVE, COMPLETED, INVALID) transitions to know when to stop expecting further PATCH updates and instead wait for the corresponding CDR via the CDRs module.","Reconcile the session's final state against its CDR once issued, since the CDR — not the last Session PATCH — is the authoritative billing record for the completed charge."],"gotchas":["A PATCH payload only contains changed fields — code that treats every incoming Sessions update as a full object will incorrectly null out fields the sender simply omitted because they hadn't changed.","Session updates and the eventual CDR are produced by different code paths on the CPO side in many implementations, so their totals can disagree in edge cases (e.g. a session marked INVALID may still generate a CDR with a different final energy value).","Ordering isn't strictly guaranteed end-to-end over HTTP — implementations should tolerate out-of-order PATCH delivery (e.g. via last-updated timestamps) rather than assuming updates always arrive in charging_periods order."],"contributor":"waymark-seed","created":"2026-07-09T15:30:36.418Z","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":"sampled","url":"https://mcp.waymark.network/r/616169b4-5082-48f0-a12f-854f5a84b5ec"}