Scrip · Schema

EventDetailResponse

An event with its processing status and the rule evaluations it produced.

RewardsLoyaltyFintechPlatform

Properties

Name Type Description
created_at string When this event was created
error_code string 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_message string Error details if the event failed during processing
event_data object Original event data payload
event_timestamp string When the event occurred (from the ingestion request)
event_type string The name you gave the event, such as `purchase`. Rules read it as `event.type`. Absent for an event stored before events had a name.
external_id string Your system's identifier for the participant (the value provided at ingestion)
first_error_code string The event's cause: the first error_code it failed with. GET /v1/reports/failure-causes groups events by it, and GET /v1/events can filter by it. The event keeps it after a retry. Absent when the event
first_failed_at string When the event first failed (RFC 3339). The event keeps it after a retry; its latest failure is processed_at. Absent when the event never failed.
id string Unique identifier for this event
idempotency_key string Client-provided unique key for deduplication
participant_id string Participant UUID, resolved from external_id if one was provided at ingestion
processed_at string When the event finished processing (null while pending or processing)
program_id string Program this event belongs to
received_at string When Scrip received the event
recipient_id string Recipient participant UUID sent as recipient_id or recipient_external_id; rules read it as recipient.id
reversal object Whether the rewards this event issued were later reversed.
reversals array Up to 100 most recent reversals of the event's rewards, newest first (returned with `expand[]=reversals`).
rule_evaluations array Recorded rule evaluations for this event (`SKIPPED_ERROR` and `SKIPPED_TIMEOUT` are omitted unless `include_skipped=true`; false conditions and rules after `stop_after_match` are not recorded).
source string Whether you sent the event or Scrip generated it.
status string Where the event is in processing.
updated_at string When this event was last updated
View JSON Schema on GitHub

JSON Schema

scrip-dev-event-detail-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrip-dev/json-schema/scrip-dev-event-detail-response-schema.json",
  "title": "EventDetailResponse",
  "description": "An event with its processing status and the rule evaluations it produced.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrip-dev-openapi.json#/components/schemas/EventDetailResponse",
  "properties": {
    "created_at": {
      "description": "When this event was created",
      "format": "date-time",
      "type": "string"
    },
    "error_code": {
      "description": "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.",
      "type": "string"
    },
    "error_message": {
      "description": "Error details if the event failed during processing",
      "type": "string"
    },
    "event_data": {
      "description": "Original event data payload",
      "type": "object"
    },
    "event_timestamp": {
      "description": "When the event occurred (from the ingestion request)",
      "format": "date-time",
      "type": "string"
    },
    "event_type": {
      "description": "The name you gave the event, such as `purchase`. Rules read it as `event.type`. Absent for an event stored before events had a name.",
      "type": "string"
    },
    "external_id": {
      "description": "Your system's identifier for the participant (the value provided at ingestion)",
      "type": "string"
    },
    "first_error_code": {
      "description": "The event's cause: the first error_code it failed with. GET /v1/reports/failure-causes groups events by it, and GET /v1/events can filter by it. The event keeps it after a retry. Absent when the event never failed with a code.",
      "type": "string"
    },
    "first_failed_at": {
      "description": "When the event first failed (RFC 3339). The event keeps it after a retry; its latest failure is processed_at. Absent when the event never failed.",
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for this event",
      "format": "uuid",
      "type": "string"
    },
    "idempotency_key": {
      "description": "Client-provided unique key for deduplication",
      "type": "string"
    },
    "participant_id": {
      "description": "Participant UUID, resolved from external_id if one was provided at ingestion",
      "format": "uuid",
      "type": "string"
    },
    "processed_at": {
      "description": "When the event finished processing (null while pending or processing)",
      "format": "date-time",
      "type": "string"
    },
    "program_id": {
      "description": "Program this event belongs to",
      "format": "uuid",
      "type": "string"
    },
    "received_at": {
      "description": "When Scrip received the event",
      "format": "date-time",
      "type": "string"
    },
    "recipient_id": {
      "description": "Recipient participant UUID sent as recipient_id or recipient_external_id; rules read it as recipient.id",
      "format": "uuid",
      "type": "string"
    },
    "reversal": {
      "$ref": "#/$defs/EventReversalSummary",
      "description": "Whether the rewards this event issued were later reversed."
    },
    "reversals": {
      "description": "Up to 100 most recent reversals of the event's rewards, newest first (returned with `expand[]=reversals`).",
      "items": {
        "$ref": "#/$defs/EventReversalRecord"
      },
      "type": "array"
    },
    "rule_evaluations": {
      "description": "Recorded rule evaluations for this event (`SKIPPED_ERROR` and `SKIPPED_TIMEOUT` are omitted unless `include_skipped=true`; false conditions and rules after `stop_after_match` are not recorded).",
      "items": {
        "$ref": "#/$defs/RuleEvaluationResponse"
      },
      "type": "array"
    },
    "source": {
      "description": "Whether you sent the event or Scrip generated it.",
      "enum": [
        "EXTERNAL",
        "SYSTEM",
        "OPERATIONAL"
      ],
      "type": "string"
    },
    "status": {
      "description": "Where the event is in processing.",
      "enum": [
        "PENDING",
        "PROCESSING",
        "COMPLETED",
        "FAILED"
      ],
      "type": "string"
    },
    "updated_at": {
      "description": "When this event was last updated",
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "ActorResponse": {
      "description": "Who caused an audited change: a dashboard user, an API key, a rule, Scrip itself, or a subject that a trusted integration asserted.",
      "properties": {
        "actor_source": {
          "description": "How the change was made.",
          "enum": [
            "DIRECT_USER",
            "DIRECT_API_KEY",
            "RULE",
            "SYSTEM",
            "ASSERTED"
          ],
          "type": "string"
        },
        "api_key_id": {
          "description": "API key that made the change; present for DIRECT_API_KEY.",
          "format": "uuid",
          "type": "string"
        },
        "external_subject": {
          "description": "Subject identifier the integration asserted; present for ASSERTED.",
          "type": "string"
        },
        "external_subject_type": {
          "description": "What kind of identifier `external_subject` is; present for ASSERTED.",
          "enum": [
            "OAUTH_SUBJECT",
            "EMAIL"
          ],
          "type": "string"
        },
        "rule_id": {
          "description": "Rule whose action made the change; present for RULE.",
          "format": "uuid",
          "type": "string"
        },
        "user_id": {
          "description": "Dashboard user who made the change; present for DIRECT_USER.",
          "format": "uuid",
          "type": "string"
        },
        "via_api_key_id": {
          "description": "API key the asserting integration used; present for ASSERTED.",
          "format": "uuid",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventReversalLineResponse": {
      "description": "How much of one original award a reversal asked for, recovered and could not recover.",
      "properties": {
        "asset_id": {
          "description": "Asset of the award",
          "format": "uuid",
          "type": "string"
        },
        "ledger_entity_id": {
          "description": "Ledger entity that was originally credited",
          "format": "uuid",
          "type": "string"
        },
        "original_amount": {
          "description": "Amount the original award credited",
          "type": "string"
        },
        "original_journal_entry_id": {
          "description": "Journal entry of the original award",
          "format": "uuid",
          "type": "string"
        },
        "recovered_amount": {
          "description": "Amount actually recovered from value still traceable to the original award",
          "type": "string"
        },
        "requested_amount": {
          "description": "Amount this reversal asked to claw back from this line",
          "type": "string"
        },
        "reversal_journal_entry_id": {
          "description": "REVERSAL journal entry that debited the recovered value; absent when nothing was recovered",
          "format": "uuid",
          "type": "string"
        },
        "shortfall_amount": {
          "description": "Requested value that could not be recovered (spent, expired, transferred, or held)",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventReversalRecord": {
      "description": "One reversal of an event's rewards: when and why it was made, who made it, and what each original award gave back.",
      "properties": {
        "actor": {
          "$ref": "#/$defs/ActorResponse",
          "description": "Who made the reversal. Absent only on some older reversals that recovered nothing."
        },
        "created_at": {
          "description": "When the reversal was made (RFC 3339).",
          "format": "date-time",
          "type": "string"
        },
        "event_id": {
          "description": "The event whose rewards were reversed.",
          "format": "uuid",
          "type": "string"
        },
        "fraction": {
          "description": "The fraction of each award the request reversed, such as `0.5`. Absent when the request reversed all remaining value.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier for this reversal.",
          "format": "uuid",
          "type": "string"
        },
        "idempotency_key": {
          "description": "The key sent with the reversal request.",
          "type": "string"
        },
        "lines": {
          "description": "For each original award, the amount requested, recovered and not recovered.",
          "items": {
            "$ref": "#/$defs/EventReversalLineResponse"
          },
          "type": "array"
        },
        "reason": {
          "description": "Why the event was reversed, as sent with the request.",
          "type": "string"
        },
        "shortfall_policy": {
          "description": "What Scrip did with value it could not recover.",
          "enum": [
            "report"
          ],
          "type": "string"
        },
        "status": {
          "description": "The outcome of the reversal.",
          "enum": [
            "COMPLETED"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "EventReversalSummary": {
      "description": "Whether the rewards an event issued were reversed, and when. Read each reversal with GET /v1/events/{event_id}?expand[]=reversals.",
      "properties": {
        "last_reversed_at": {
          "description": "When the latest reversal was made (RFC 3339). Absent when status is NONE.",
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "description": "Reversal state: `NONE` (not reversed), `PARTIAL` (partially reversed), or `FULL` (all reversible awards recovered).",
          "enum": [
            "NONE",
            "PARTIAL",
            "FULL"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "RuleEvaluationResponse": {
      "description": "The outcome of one rule for one event, and why.",
      "properties": {
        "created_at": {
          "description": "When the evaluation occurred",
          "format": "date-time",
          "type": "string"
        },
        "error_message": {
          "description": "Details of a failure or skip (e.g. budget usage and reset time for `PARTICIPANT_BUDGET_EXCEEDED`, or the conflicting key for `SHARED_STATE_CHANGED`).",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier for this evaluation record",
          "format": "uuid",
          "type": "string"
        },
        "reason": {
          "description": "Skip classification for `SKIPPED` evaluations (`OUTSIDE_TIME_WINDOW`, `BUDGET_EXCEEDED`, `PARTICIPANT_BUDGET_EXCEEDED`, or `SHARED_STATE_CHANGED`), or `REFERENCE_ALREADY_SETTLED` on a `SUCCESS` evaluation. Absent otherwise.",
          "type": "string"
        },
        "rule_history_id": {
          "description": "Snapshot of the rule version that was active when this evaluation occurred",
          "format": "uuid",
          "type": "string"
        },
        "rule_id": {
          "description": "Rule that was evaluated",
          "format": "uuid",
          "type": "string"
        },
        "rule_name": {
          "description": "The name of the rule when it was evaluated.",
          "type": "string"
        },
        "rule_set_id": {
          "description": "Rule set that contained the rule when this evaluation occurred",
          "format": "uuid",
          "type": "string"
        },
        "status": {
          "description": "The recorded result of the evaluation.",
          "enum": [
            "SUCCESS",
            "FAILED",
            "SKIPPED",
            "SKIPPED_ERROR",
            "SKIPPED_TIMEOUT"
          ],
          "type": "string"
        },
        "stopped_by_rule_id": {
          "description": "Earlier rule whose `stop_after_match` skipped this rule (present only in rule configuration simulations).",
          "format": "uuid",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/scrip-dev-event-detail-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.