Events

Get event impact

Returns the full causal chain for a processed event: rule evaluations, journal entries with postings, state changes, and per-entity balance impact.

get/v1/events/{event_id}/impact

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/events/{event_id}/impact
  • Auth: HTTP bearer

Path parameters

event_idstring uuid required

The event's id.

Response

Event impact details

created_atstring date-time

When this event was created

error_codestring

Why a FAILED event failed, as a code from the Errors page, such as program_inactive, participant_inactive or unknown_participant. Absent when the event did not fail or the failure has no code.

error_messagestring

Error details if the event failed during processing

event_dataobject

Original event data payload

event_timestampstring date-time

When the event occurred (from the ingestion request)

event_type'EXTERNAL' | 'SYSTEM' | 'OPERATIONAL'

Whether you sent the event or Scrip generated it.

external_idstring

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

idstring uuid

Unique identifier for this event

idempotency_keystring

Client-provided unique key for deduplication

participant_idstring uuid

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

processed_atstring date-time

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

program_idstring uuid

Program this event belongs to

received_atstring date-time

When Scrip received the event

recipient_idstring uuid

Recipient participant UUID sent as recipient_id or recipient_external_id; rules read it as recipient.id

status'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED'

Where the event is in processing.

updated_atstring date-time

When this event was last updated

Example response

{
  "balance_impact": [
    {
      "amount": "200",
      "asset_symbol": "PTS",
      "bucket": "AVAILABLE",
      "entity_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
      "entity_type": "PARTICIPANT"
    }
  ],
  "created_at": "2027-01-15T10:30:00Z",
  "error_code": "program_not_found",
  "error_message": "rule condition evaluation failed",
  "event_data": {
    "amount": 120,
    "type": "purchase"
  },
  "event_timestamp": "2027-01-15T10:30:00Z",
  "event_type": "EXTERNAL",
  "external_id": "user_123",
  "id": "e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05",
  "idempotency_key": "order-1001-completed",
  "journal_entries": [
    {
      "action_type": "HOLD",
      "created_at": "2027-01-15T10:30:00Z",
      "description": "Purchase reward: 10 POINTS",
      "entry_hash": "b3a1d9f8c2e4a7b6d1e3f5a8c9b2d4e6f7a1b3c5d7e9f2a4b6c8d0e1f3a5b7c9",
      "event_id": "e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05",
      "id": "657a0312-1aaa-4ba7-842b-edfbb39edf14",
      "postings": [
        {
          "amount": "100.00",
          "asset_symbol": "POINTS",
          "bucket": "AVAILABLE",
          "created_at": "2027-01-15T10:30:00Z",
          "entity_type": "PARTICIPANT",
          "group_id": "0b9e7d3c-5a41-4f68-a2c7-81e4d6b3f907",
          "id": "8c1e3a5b-7d92-4f04-a6b8-d0f2c4e6a826",
          "participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
          "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
        }
      ],
      "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
      "program_name": "Q1 Sales Bonus",
      "reference_id": "auth_12345",
      "rule_id": "c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03"
    }
  ],
  "participant_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
  "processed_at": "2027-01-15T10:30:00Z",
  "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
  "received_at": "2027-01-15T10:30:00Z",
  "recipient_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b007",
  "rule_evaluations": [
    {
      "created_at": "2027-01-15T10:30:00Z",
      "error_message": "condition evaluation failed",
      "id": "b8d4f6a0-2c1e-4a73-9e5b-d7f9a1c3e517",
      "reason": "OUTSIDE_TIME_WINDOW",
      "rule_history_id": "c2e6a8b4-4d70-4f19-8a3c-e5b7d9f1a318",
      "rule_id": "c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03",
      "rule_name": "Welcome Bonus",
      "rule_set_id": "d4735e3a-265e-4f16-b1a5-4c8e9d6f0a04",
      "status": "SUCCESS",
      "stopped_by_rule_id": "c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03"
    }
  ],
  "state_changes": [
    {
      "changed_at": "2027-01-15T10:30:00Z",
      "entity_id": "f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006",
      "entity_type": "PARTICIPANT",
      "key": "lifetime_spend",
      "new_value": "575",
      "old_value": "500",
      "operation": "SET",
      "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
      "rule_id": "c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03",
      "state_type": "COUNTER"
    }
  ],
  "status": "COMPLETED",
  "updated_at": "2027-01-15T10:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.