> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# `GET /api/v1/events/stream` — SSE endpoint.

> Each frame carries a monotonic `id`. Supports:
- `?filter=order.*` — event type filtering (prefix match with wildcard). - `Last-Event-ID` request header (or `?last_event_id=`) — replays buffered events with a greater id from a bounded server-side ring before resuming the live stream. The header takes precedence over the query parameter.
If the requested resume id has already been evicted from the bounded buffer (a gap), a single `event: stream_reset` frame is emitted before whatever remains is replayed, signaling the client to reconcile state out-of-band.

Each frame carries a monotonic `id`. Supports:

* `?filter=order.*` — event type filtering (prefix match with wildcard).
* `Last-Event-ID` request header (or `?last_event_id=`) — replays buffered
  events with a greater id from a bounded server-side ring before resuming
  the live stream. The header takes precedence over the query parameter.

If the requested resume id has already been evicted from the bounded buffer
(a gap), a single `event: stream_reset` frame is emitted before whatever
remains is replayed, signaling the client to reconcile state out-of-band.

### Query parameters

<ParamField query="filter" type="string">
  Optional event type filter (e.g. `order.*`).
</ParamField>

<ParamField query="last_event_id" type="integer (int64)">
  Resume the stream after this event id. Equivalent to the standard SSE
  `Last-Event-ID` request header; the header takes precedence when both
  are supplied. Events with a greater id are replayed from the bounded
  server-side buffer before the live stream resumes.
</ParamField>

### Responses

<ResponseField name="200" type="string">
  Server-Sent Events stream of commerce events. Each frame carries a monotonic `id`; clients may resume after a drop via the `Last-Event-ID` header. On a replay gap a `stream_reset` frame is emitted first.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.stateset.com/api/v1/events/stream' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  "string"
  ```
</ResponseExample>
