Skip to content

Events — Query

Retrieve events: list with filters, fetch one by ID, list a single pass's events, and discover the distinct event types and sources in a workspace.

Auth: Bearer token. The service resolves the workspace from workspace_id / pass_id / client_id in the query (or the pass for the per-pass route) and checks the caller's membership.


List Events

GET /wallethero-api/events

Lists events matching the filters, newest first, paginated. Scope by workspace_id (or pass_id / client_id) so membership can be verified.

Auth: Bearer token — workspace member.

Query Parameters

ParameterTypeRequiredDefaultDescription
workspace_idstring (UUID)No*Workspace filter (one scope is required for auth)
client_idstring (UUID)NoFilter by client
pass_idstring (UUID)NoFilter by pass
project_idstring (UUID)NoFilter by project
pass_template_idstring (UUID)NoFilter by template
event_categorystringNoOne of field_change, transaction, engagement, loyalty, pass_lifecycle
event_typesstring (CSV)NoComma-separated event types
field_namestring (≤100)NoFilter field_change events by field name
sourcestring (≤100)NoFilter by source
from_datestring (ISO 8601)NoOn/after this time
to_datestring (ISO 8601)NoOn/before this time
limitnumberNo100Max results (1–1000)
offsetnumberNo0Pagination offset

* Provide at least one of workspace_id, pass_id, or client_id so the workspace can be resolved for the access check.

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/events?workspace_id=WORKSPACE_ID&event_category=transaction&limit=50" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    { "id": "event-1", "pass_id": "pass-1", "event_category": "transaction", "event_type": "purchase", "amount": 49.99, "currency": "USD", "event_timestamp": "2026-01-15T14:30:00Z" }
  ],
  "meta": { "total_count": 150, "returned_count": 50, "offset": 0 }
}

SDK

typescript
const events = await wh.events.list({
  workspace_id: "WORKSPACE_ID",
  event_category: "transaction",
  limit: 50,
});

Get Event by ID

GET /wallethero-api/events/:id

Fetches a single event.

Auth: Bearer token — workspace member (derived from the event's pass).

Path Parameters

ParameterTypeDescription
idstring (UUID)Event identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/events/EVENT_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": { "id": "EVENT_ID", "pass_id": "pass-1", "event_category": "transaction", "event_type": "purchase", "amount": 49.99, "currency": "USD" }
}

SDK

typescript
const event = await wh.events.get("EVENT_ID");

Get Events for a Pass

GET /wallethero-api/passes/:passId/events

Lists events for a single pass, newest first, paginated.

Auth: Bearer token — workspace member (derived from the pass).

Path Parameters

ParameterTypeDescription
passIdstring (UUID)Pass identifier

Query Parameters

ParameterTypeRequiredDefaultDescription
event_categorystringNoFilter by category
limitnumberNo100Max results (1–1000)
offsetnumberNo0Pagination offset

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/passes/PASS_ID/events?event_category=transaction&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    { "id": "event-1", "pass_id": "PASS_ID", "event_category": "transaction", "event_type": "purchase", "amount": 49.99, "currency": "USD" }
  ],
  "meta": { "total_count": 12, "returned_count": 12, "offset": 0 }
}

SDK

typescript
const passEvents = await wh.events.getByPass("PASS_ID", {
  event_category: "transaction",
  limit: 20,
});

List Distinct Event Types

GET /wallethero-api/events/types

Returns the distinct event types present in a workspace, grouped by category.

Auth: Bearer token — workspace member (the workspace_id query param).

Query Parameters

ParameterTypeRequiredDescription
workspace_idstring (UUID)YesWorkspace identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/events/types?workspace_id=WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    { "category": "transaction", "types": ["purchase", "refund"] },
    { "category": "engagement", "types": ["check_in", "visit"] }
  ]
}

SDK

typescript
const types = await wh.events.getEventTypes("WORKSPACE_ID");

List Distinct Sources

GET /wallethero-api/events/sources

Returns the distinct source values present in a workspace.

Auth: Bearer token — workspace member (the workspace_id query param).

Query Parameters

ParameterTypeRequiredDescription
workspace_idstring (UUID)YesWorkspace identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/events/sources?workspace_id=WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{ "data": ["pos-terminal-1", "online-store", "mobile-app"] }

SDK

typescript
const sources = await wh.events.getSources("WORKSPACE_ID");

WalletHero Documentation