Skip to main content
GET
/
v1
/
events
/
{id}
/
impact
Get event impact
curl --request GET \
  --url https://api.scrip.dev/v1/events/{id}/impact \
  --header 'X-API-Key: <api-key>'
{
  "balance_impact": [
    {
      "amount": "200",
      "asset_symbol": "PTS",
      "bucket": "AVAILABLE",
      "entity_id": "550e8400-e29b-41d4-a716-446655440000",
      "entity_type": "PARTICIPANT"
    }
  ],
  "created_at": "2024-01-15T10:30:00Z",
  "error_message": "rule condition evaluation failed",
  "event_data": {},
  "event_timestamp": "2024-01-15T10:30:00Z",
  "event_type": "EXTERNAL",
  "external_id": "user_abc123",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "idempotency_key": "order-12345-completed",
  "journal_entries": [
    {
      "action_type": "HOLD",
      "created_at": "2024-01-15T10:30:00Z",
      "created_by_api_key_id": "550e8400-e29b-41d4-a716-446655440003",
      "description": "Purchase reward: 10 POINTS",
      "entry_hash": "b3a1d9f8c2e4a7b6d1e3f5a8c9b2d4e6f7a1b3c5d7e9f2a4b6c8d0e1f3a5b7c9",
      "event_id": "550e8400-e29b-41d4-a716-446655440002",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "postings": [
        {
          "amount": "100.00",
          "asset_symbol": "POINTS",
          "bucket": "AVAILABLE",
          "created_at": "2024-01-15T10:30:00Z",
          "entity_type": "PARTICIPANT",
          "group_id": "550e8400-e29b-41d4-a716-446655440011",
          "id": "550e8400-e29b-41d4-a716-446655440003",
          "participant_id": "550e8400-e29b-41d4-a716-446655440010",
          "program_id": "550e8400-e29b-41d4-a716-446655440012"
        }
      ],
      "program_id": "550e8400-e29b-41d4-a716-446655440001",
      "program_name": "Q1 Sales Bonus",
      "reference_id": "auth_12345"
    }
  ],
  "participant_id": "550e8400-e29b-41d4-a716-446655440002",
  "processed_at": "2024-01-15T10:30:02Z",
  "program_id": "550e8400-e29b-41d4-a716-446655440001",
  "received_at": "2024-01-15T10:30:01Z",
  "recipient_id": "550e8400-e29b-41d4-a716-446655440003",
  "rule_evaluations": [
    {
      "created_at": "2024-01-15T10:30:00Z",
      "error_message": "condition evaluation failed",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "reason": "OUTSIDE_TIME_WINDOW",
      "rule_history_id": "550e8400-e29b-41d4-a716-446655440003",
      "rule_id": "550e8400-e29b-41d4-a716-446655440001",
      "rule_name": "Welcome Bonus",
      "status": "SUCCESS",
      "stopped_by_rule_id": "550e8400-e29b-41d4-a716-446655440002"
    }
  ],
  "state_changes": [
    {
      "changed_at": "2024-01-15T10:30:00Z",
      "entity_id": "550e8400-e29b-41d4-a716-446655440000",
      "entity_type": "PARTICIPANT",
      "key": "lifetime_spend",
      "new_value": "575",
      "old_value": "500",
      "operation": "set",
      "program_id": "550e8400-e29b-41d4-a716-446655440002",
      "rule_id": "550e8400-e29b-41d4-a716-446655440001",
      "state_type": "counter"
    }
  ],
  "status": "COMPLETED",
  "updated_at": "2024-01-15T10:30:00Z"
}
Returns the full causal chain for a processed event. The response includes rule evaluations, journal entries with their double-entry postings, state changes (tags, counters, attributes, tiers), and an aggregated per-entity balance impact summary. Use this to understand exactly what an event did: which rules matched, what ledger movements occurred, what state changed, and the net effect on each entity’s balance. State changes include the rule_id that caused them, linking every tag, counter, attribute, and tier change back to the specific rule. The balance_impact array aggregates all postings into net changes per entity, asset, and bucket. Zero-sum entries (where credits and debits cancel out) are omitted. System accounts (SYSTEM_ISSUANCE, SYSTEM_BREAKAGE, SYSTEM_REDEMPTION) appear as counterparties to participant and group movements.
The event must be in COMPLETED or FAILED status. Events still in PENDING or PROCESSING return the event metadata with empty arrays for all impact fields.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Event ID

Response

Event impact details

balance_impact
object[]

Net balance impact per entity/asset/bucket

created_at
string<date-time>

When this event was created

Example:

"2024-01-15T10:30:00Z"

error_message
string

Error details if the event failed during processing

Example:

"rule condition evaluation failed"

event_data
object

Original event data payload

event_timestamp
string<date-time>

When the event occurred (from the ingestion request)

Example:

"2024-01-15T10:30:00Z"

event_type
string

Event type: EXTERNAL (API-ingested) or SYSTEM (internally generated)

Example:

"EXTERNAL"

external_id
string

Your system's identifier for the participant (the value provided at ingestion)

Example:

"user_abc123"

id
string<uuid>

Unique identifier for this event

Example:

"550e8400-e29b-41d4-a716-446655440000"

idempotency_key
string

Client-provided unique key for deduplication

Example:

"order-12345-completed"

journal_entries
object[]

Journal entries created by this event with their double-entry postings

participant_id
string<uuid>

Participant UUID, resolved from external_id if one was provided at ingestion

Example:

"550e8400-e29b-41d4-a716-446655440002"

processed_at
string<date-time>

When the event finished processing (null while pending or processing)

Example:

"2024-01-15T10:30:02Z"

program_id
string<uuid>

Program this event belongs to

Example:

"550e8400-e29b-41d4-a716-446655440001"

received_at
string<date-time>

When Scrip received the event

Example:

"2024-01-15T10:30:01Z"

recipient_id
string<uuid>

Reward recipient UUID, if different from the triggering participant

Example:

"550e8400-e29b-41d4-a716-446655440003"

rule_evaluations
object[]

Rules that were evaluated and their outcomes

state_changes
object[]

State changes (tags, counters, attributes, tiers) caused by this event

status
string

Processing status: RECEIVED, PENDING, PROCESSING, COMPLETED, or FAILED

Example:

"COMPLETED"

updated_at
string<date-time>

When this event was last updated

Example:

"2024-01-15T10:30:00Z"