GET /v1/notifications in the reference) are also pushed live over a
Socket.IO connection, so a frontend doesn’t have to poll. Every notification that’s pushed live
is also persisted — a client that connects late will still see it via the REST endpoint.
Connecting
Connect through api-gateway, not directly to any backend service — exactly like every REST call. The gateway terminates the WebSocket upgrade and proxies it internally.auth payload (some Socket.IO client environments can’t), pass the
token as a token query parameter instead: ?token=<accessToken>. A connection with no token, or
an invalid/expired one, is disconnected immediately after the handshake.
Events you’ll receive
event
Sent to the connected user whenever a new in-app notification is created for them — the same
shape as an item from
GET /v1/notifications.event
Sent only to sockets authenticated as
ADMIN or SUPER_ADMIN — an ephemeral ops ping (not
persisted, not retrievable via REST) for things that need staff attention.What triggers a push
Anotification event fires for any account-affecting action with a customer-facing template —
registration, wholesale application status changes, order placed/paid/dispatched/delivered/
cancelled, password changes, and loyalty point awards (leaving a review, referring a friend,
sharing a product). See the Domain Events Catalog for the exhaustive list of
which actions currently trigger a notification versus which are defined but not yet wired.
An admin-alert fires for a smaller set of events ops needs to react to: new customer
registration, new wholesale application, new order placed, and low stock.